Commit fda40e6f authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'feature/SVVnewoption' into 'master'

Add option to use SVV only in the spectral/hp expanions

This MR adds a new option `SpectralVanishingViscositySpectralHP` that activates SVV in the spectral/hp expansion, but not in the homogeneous direction (the option `SpectralVanishingViscosityHomo1D` was already available).

The behaviour when using the option `SpectralVanishingViscosity` remains the same.

See merge request !623
parents 4c098748 9045d645
......@@ -592,11 +592,15 @@ the advection term using the pressure inverse mass matrix. It can be used just i
\item \inltt{SpectralVanishingViscosity}: activates a stabilization technique
which increases the viscosity on the highest Fourier frequencies of a Quasi-3D approach.
which increases the viscosity on the modes with the highest frequencies.
\begin{lstlisting}[style=XMLStyle]
<I PROPERTY="SpectralVanishingViscosity" VALUE="True"/>
\end{lstlisting}
In a Quasi-3D simulation, this will affect both the Fourier and the spectral/hp expansions.
To activate them independently, use \inltt{SpectralVanishingViscositySpectralHP}
and \inltt{SpectralVanishingViscosityHomo1D}.
\item \inltt{DEALIASING}: activates the 3/2 padding rule on the advection term
of a Quasi-3D simulation.
\begin{lstlisting}[style=XMLStyle]
......
......@@ -111,27 +111,25 @@ namespace Nektar
// Load parameters for Spectral Vanishing Viscosity
m_session->MatchSolverInfo("SpectralVanishingViscosity","True",
m_useSpecVanVisc,false);
m_useSpecVanVisc, false);
m_useHomo1DSpecVanVisc = m_useSpecVanVisc;
if(m_useSpecVanVisc == false)
{
m_session->MatchSolverInfo("SpectralVanishingViscositySpectralHP",
"True", m_useSpecVanVisc, false);
m_session->MatchSolverInfo("SpectralVanishingViscosityHomo1D",
"True", m_useHomo1DSpecVanVisc, false);
}
m_session->LoadParameter("SVVCutoffRatio",m_sVVCutoffRatio,0.75);
m_session->LoadParameter("SVVDiffCoeff", m_sVVDiffCoeff, 0.1);
// Needs to be set outside of next if so that it is turned off by default
m_session->MatchSolverInfo("SpectralVanishingViscosityHomo1D","True",
m_useHomo1DSpecVanVisc,false);
m_session->MatchSolverInfo("SPECTRALHPDEALIASING","True",
m_specHP_dealiasing,false);
if(m_HomogeneousType == eHomogeneous1D)
{
ASSERTL0(m_nConvectiveFields > 2,"Expect to have three velocity fields with homogenous expansion");
if(m_useHomo1DSpecVanVisc == false)
{
m_session->MatchSolverInfo("SpectralVanishingViscosity","True",m_useHomo1DSpecVanVisc,false);
}
if(m_useHomo1DSpecVanVisc)
{
Array<OneD, unsigned int> planes;
......@@ -208,7 +206,7 @@ namespace Nektar
}
string smoothing = m_useSpecVanVisc ? "spectral/hp" : "";
if (m_useHomo1DSpecVanVisc)
if (m_useHomo1DSpecVanVisc && (m_HomogeneousType == eHomogeneous1D))
{
smoothing += (smoothing == "" ? "" : " + ") + string("Homogeneous1D");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment