diff --git a/CHANGELOG.md b/CHANGELOG.md index 47784ffa1d16e12323ef469129fce3e407f7bdca..e96604ad3007109e2c60b5ffc7818625f54e3b80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -133,6 +133,9 @@ v4.4.2 - Updated PETSc to 3.7.7 (!916) - Fix typcase to an integer which set Lz < 1 to zero when postprocess hdf5 output (!9922) +**IncNavierStokesSolver** +- Add a test for imaginary shift to be only used with Homogenous and SingleMode on. (!928) + **NekMesh** - Fix missing periodic boundary meshing and boundary layer mesh adjustment configurations in 2D (!859) @@ -142,6 +145,7 @@ v4.4.2 - Fix sign of the viscous term in the velocity correction scheme equations in the user guide (!856) - Fixed anonymous clone URL (!909) +- Add information on the limitations of Imaginary Shift for stability. (!928) **FieldConvert** - Allow passing input name with trailing separator (!879) diff --git a/docs/user-guide/solvers/incompressible-ns.tex b/docs/user-guide/solvers/incompressible-ns.tex index 6bb83c0cbdcf5a8bf312fd346338592f81755ee3..a18d2fc0b927c892c759e0b94c88d62d1401038d 100644 --- a/docs/user-guide/solvers/incompressible-ns.tex +++ b/docs/user-guide/solvers/incompressible-ns.tex @@ -1165,8 +1165,9 @@ The following parameters can be specified in the \texttt{PARAMETERS} section of \item \inltt{Re}: sets the Reynolds number \item \inltt{Kinvis}: sets the kinematic viscosity $\nu$. \item \inltt{kdim}: sets the dimension of the Krylov subspace $\kappa$. Can be used in: \inltt{ModifiedArnoldi} and \inltt{Arpack}. Default value: 16. -\item \inltt{evtol}: sets the tolerance of the eigenvalues. Can be used in: \item \inltt{imagShift}: provide an imaginary shift to the direct sovler eigenvalue problem by the specified value. -ltt{ModifiedArnoldi} and \inltt{Arpack}. Default value: $10^{-6}$. +\item \inltt{evtol}: sets the tolerance of the eigenvalues. Can be used in: \item \inltt{imagShift}: +provide an imaginary shift to the direct solver eigenvalue problem by the specified value. +\inltt{ModifiedArnoldi} and \inltt{Arpack}. Default value: $0.0$. Works only with \inltt{Homogeneous} set to \inltt{1D} and inltt{ModeType} set to \inltt{SingleMode}. \item \inltt{nits}: sets the maximum number of iterations. Can be used in: \inltt{ModifiedArnoldi} and \inltt{Arpack}. Default value: 500. \item \inltt{LZ}: sets the length in the spanswise direction $L_z$. Can be used in \inltt{Homogeneous} set to \inltt{1D}. Default value: 1. \item \inltt{HomModesZ}: sets the number of planes in the homogeneous directions. Can be used in \inltt{Homogeneous} set to \inltt{1D} and \inltt{ModeType} set to \inltt{MultipleModes}. diff --git a/library/SolverUtils/DriverArnoldi.cpp b/library/SolverUtils/DriverArnoldi.cpp index 8555a4822e749d01fea31d3227381bc8f2ace1f9..0e64a619d476a28437136c3a3095bd839cdf759a 100644 --- a/library/SolverUtils/DriverArnoldi.cpp +++ b/library/SolverUtils/DriverArnoldi.cpp @@ -109,7 +109,21 @@ void DriverArnoldi::v_InitObject(ostream &out) m_session->LoadParameter("realShift", m_realShift, 0.0); m_equ[0]->SetLambda(m_realShift); - m_session->LoadParameter("imagShift", m_imagShift, 0.0); + m_session->LoadParameter("imagShift",m_imagShift,0.0); + + // The imaginary shift is applied at system assembly + // Only if using HOMOGENEOUS expansion and ModeType set to SingleMode + if(m_imagShift != 0.0) + { + if(!m_session->DefinesSolverInfo("HOMOGENEOUS")&&!m_session->DefinesSolverInfo("ModeType")) + { + NEKERROR(ErrorUtil::efatal, "Imaginary shift only supported with HOMOGENEOUS expansion and ModeType set to SingleMode"); + } + else if(!boost::iequals(m_session->GetSolverInfo("ModeType"),"SingleMode")) + { + NEKERROR(ErrorUtil::efatal, "Imaginary shift only supported with HOMOGENEOUS expansion and ModeType set to SingleMode"); + } + } }