Commit dbb6cb15 by Chris Cantwell

### Merge branch 'fix/InitAdaptiveSFD' into 'master'

Fix/init adaptive sfd

See merge request !452
parents de267a40 7e08c509
 ... ... @@ -244,7 +244,7 @@ where $\sigma=\left\| \mathbf{u'}(\tau)\right\|$. This is no other that the sing \subsection{Steady-state solver} \label{SectionSFD} To compute linear stability analysis, the choice of the base flow, around which the system will be linearised, is crucial. If one wants to use the steady-state solution of the Navier-Stokes equations as base flow, a steady-state solver is implemented in \nekpp. The method used is the encapsulated formulation of the Selective Frequency Damping method \cite{JoCoSh14}. Unstable steady base flows can be obtained with this method. The SFD method is based on the filtering and the control of the unstable temporal frequencies within the flow. The time continuous formulation of the SFD method is To compute linear stability analysis, the choice of the base flow, around which the system will be linearised, is crucial. If one wants to use the steady-state solution of the Navier-Stokes equations as base flow, a steady-state solver is implemented in \nekpp. The method used is the encapsulated formulation of the Selective Frequency Damping method \cite{JoCoSh14}. Unstable steady base flows can be obtained with this method. The SFD method is based on the filtering and control of unstable temporal frequencies within the flow. The time continuous formulation of the SFD method is \begin{cases} \dot{q}=NS(q)-\chi (q-\bar{q}), \\ ... ... @@ -357,7 +357,7 @@ Direct solver & \texttt{CoupledLinearisedNS} & 2D, Quasi-3D, 3D &CG\\ {Driver} & {Description} &{Dimensions}&{Projections} \\ \midrule \texttt{Standard} & Time integration of the equations & All & CG, DG \\ \texttt{SteadyState} & Steady-state solver (see Sec. \ref{SectionSFD}) & All & CG \\ \texttt{SteadyState} & Steady-state solver (see Sec. \ref{SectionSFD}) & All & CG, DG \\ \bottomrule \end{tabular} \end{center} ... ... @@ -580,6 +580,7 @@ forces for each computational plane are projected along the Cartesian axes and t \section{Stability analysis Session file configuration} \label{SecStabFile} The type of equation which is to be solved is specified through the \inltt {EqType} option in the session file. This can be set to any of the following: ... ... @@ -692,7 +693,7 @@ The following parameters can be specified in the \texttt{PARAMETERS} section of \label{SectionSFD_XML} In this section, we detail how to use the steady-state solver (that implements the selective frequency damping method, see Sec. \ref{SectionSFD}). Two cases are detailed here: the execution of the classical SFD method and the adaptive SFD method, where the control coefficient $\chi$ and the filter width $\Delta$ of the SFD method will be updated all along the solver execution. For the second case, the parameters of the SFD method do not need to be defined by the user (they will be automatically calculated all along the solver execution) but several session files must be defined in a very specific way. Two cases are detailed here: the execution of the classical SFD method and the \textit{adaptive} SFD method, where the control coefficient $\chi$ and the filter width $\Delta$ of the SFD method are updated all along the solver execution. For the second case, the parameters of the SFD method do not need to be defined by the user (they will be automatically calculated all along the solver execution) but several session files must be defined in a very specific way. \subsection{Execution of the classical steady-state solver} ... ... @@ -705,34 +706,40 @@ The definition of \inltt{Eqtype}, \inltt{TimeIntegrationMethod} and \inltt{Proj The following parameters can be specified in the \texttt{PARAMETERS} section of the session file: \begin{itemize} \item \inltt{Re}: sets the Reynolds number \item \inltt{Kinvis}: sets the kinematic viscosity $\nu$ \item \inltt{ControlCoeff}: sets the control coefficient $\chi$ of the SFD method \item \inltt{FilterWidth}: sets the filter width $\Delta$ of the SFD method \item \inltt{GrowthRateEV} and \inltt{FrequencyEV}: if the growth rate and the frequency of the dominant eigenvalue are known, they can be given given as input and the code will automatically select the optimum parameters $\chi$ and $\Delta$ (and overwrite the values that may be given in the session file) \item \inltt{TOL}: sets the tolerance of the SFD method. The code will run until $||q-\bar{q}||_{inf} \end{lstlisting} As the adaptive SFD method used is coupled with a stability analysis method, \inltt{kdim}, \inltt{nvec}, \inltt{evtol} and \inltt{nits} must be defined into the \inltt{PARAMETERS} section of \inlsh{Session.xml}. To define the linear problem executed by the stability analysis method, another file, that must be called \inlsh{Session\_LinNS.xml}, has to be defined. This file can be a copy paste of \inlsh{Session.xml}, only three things have to be modified: The adaptive SFD method used is coupled with a stability analysis method. Then \inltt{kdim}, \inltt{nvec}, \inltt{evtol} and \inltt{nits} should be defined into the \inltt{PARAMETERS} section of \inlsh{Session.xml}. If not, these parameters will take the default values presented in Sec. \ref{SecStabFile}. The goal of running the stability analysis is to evaluate the dominant eigenvalue of a partially converged'' steady base flow. This approximation is then used by the steady-state solver to select a control coefficient$\chi$and a filter width$\Delta\$ then ensure a fast convergence towards a steady-state solution. To define the linear stability problem, another file, that must be called \inlsh{Session\_LinNS.xml}, has to be defined. This file \textbf{must be an exact copy/paste of} \inlsh{Session.xml}, only three things have to be modified: \begin{enumerate} \item The boundary conditions must be modified to be homogeneous (\textit{i.e.} equal to zero) at the inflow boundary. \item A random non-zero function \inltt{InitialConditions} has to be defined. \item A random function \inltt{BaseFlow} has to be defined (it will be overwritten all along the solver execution). \item The boundary conditions must be modified to be homogeneous (\textit{i.e.} equal to zero) at all inflow boundaries. \item A non-zero function \inltt{InitialConditions} has to be defined. \item A random function \inltt{BaseFlow} has to be defined (it will be overwritten all along the solver execution). We recommend it to be a copy of \inltt{InitialConditions}. \end{enumerate} Once these three files (the \inltt{Geometry} in \inlsh{Session.gz}, the nonlinear problem definition in \inlsh{Session.xml} and the homogeneous linear problem in \inlsh{Session\_LinNS.xml}) are correctly defined, the adaptive SFD method must be ran using: Once these three files (the \inltt{Geometry} in \inlsh{Session.xml.gz}, the nonlinear problem definition in \inlsh{Session.xml} and the homogeneous linear problem in \inlsh{Session\_LinNS.xml}) are correctly defined, the adaptive SFD method must be executed using: \begin{lstlisting}[style=BashInputStyle] IncNavierStokesSolver Session.gz Session.xml IncNavierStokesSolver Session.xml.gz Session.xml \end{lstlisting} ... ...
 ... ... @@ -406,7 +406,7 @@ namespace Nektar // Load metadata ImportFieldMetaData(infile,fieldmetadatamap); if(ElementIDs == NullInt1DArray) //load all fields { for(int i = 0; i < filenames.size(); ++i) ... ...
This diff is collapsed.


TimeStep = 0.01

NumSteps = 1.0/TimeStep

IO_CheckSteps = 25.0/TimeStep

IO_InfoSteps = 0.5/TimeStep

IO_CFLSteps = IO_InfoSteps

Re = 100.0

Kinvis = 1.0/Re

TOL = 0.000279

kdim = 16

nvec = 2

evtol = 1e-1

nits = 1000

u v p C[2] C[3] C[4]
This diff is collapsed.


TimeStep = 0.01

NumSteps = 1.0/TimeStep

IO_CheckSteps = 1.0/TimeStep

IO_InfoSteps = 0.25/TimeStep

IO_CFLSteps = 100

Re = 100.0

Kinvis = 1.0/Re

u v p C[2] C[3] C[4]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!