Skip to content
Snippets Groups Projects
Commit e5abb64b authored by Gianmarco Mengaldo's avatar Gianmarco Mengaldo
Browse files

Deleted UnsteadySystem from cfs. Solved some bugs. Put a new convention for cfl computation in cfs.

parent 89e3bdbb
No related branches found
No related tags found
No related merge requests found
Showing
with 478 additions and 980 deletions
This diff is collapsed.
......@@ -56,16 +56,7 @@ namespace Nektar
/// CFL safety factor (comprise between 0 to 1).
NekDouble m_cflSafetyFactor;
/// Function to calculate the stability limit for DG/CG.
SOLVER_UTILS_EXPORT NekDouble GetStabilityLimit(int n);
/// Function to calculate the stability limit for DG/CG (a vector
/// of them).
SOLVER_UTILS_EXPORT Array<OneD,NekDouble>
GetStabilityLimitVector(
const Array<OneD,int> &ExpOrder);
protected:
/// Number of time steps between outputting status information.
int m_infosteps;
......
......@@ -738,14 +738,14 @@
<CONDITIONS>
<PARAMETERS>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> FinTime = 0 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 1.0 </P>
<P> TimeStep = 0 </P>
<P> FinTime = 0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
<SOLVERINFO>
......@@ -772,22 +772,22 @@
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875" />
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875"/>
</REGION>
<REGION REF="1">
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875" />
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875"/>
</REGION>
<REGION REF="2">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0"/>
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0"/>
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0"/>
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0"/>
</REGION>
</BOUNDARYCONDITIONS>
......
......@@ -723,23 +723,23 @@
<CONDITIONS>
<PARAMETERS>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> FinTime = 0.0 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 1.0 </P>
<P> TimeStep = 0 </P>
<P> FinTime = 0.0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4" />
<I PROPERTY="UpwindType" VALUE="Exact" />
<I PROPERTY="ProblemType" VALUE="General" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="Exact" />
<I PROPERTY="ProblemType" VALUE="General" />
</SOLVERINFO>
<VARIABLES>
......@@ -757,22 +757,22 @@
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875" />
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875"/>
</REGION>
<REGION REF="1">
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875" />
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875"/>
</REGION>
<REGION REF="2">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0"/>
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0"/>
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0"/>
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0"/>
</REGION>
</BOUNDARYCONDITIONS>
......
......@@ -722,14 +722,14 @@
<CONDITIONS>
<PARAMETERS>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> FinTime = 0 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 1.0 </P>
<P> TimeStep = 0 </P>
<P> FinTime = 0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 1.0 </P>
</PARAMETERS>
<SOLVERINFO>
......@@ -756,22 +756,22 @@
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875" />
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875"/>
</REGION>
<REGION REF="1">
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875" />
<D VAR="rho" VALUE="1.225" />
<D VAR="rhou" VALUE="0.1225" />
<D VAR="rhov" VALUE="0.0" />
<D VAR="E" VALUE="0.149875"/>
</REGION>
<REGION REF="2">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0"/>
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0"/>
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0"/>
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0"/>
</REGION>
</BOUNDARYCONDITIONS>
......
......@@ -1119,14 +1119,14 @@
<CONDITIONS>
<PARAMETERS>
<P> TimeStep = 0.0 </P>
<P> NumSteps = 10 </P>
<P> FinTime = 0 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 1.0 </P>
<P> IO_CheckTime = 100 </P>
<P> FinTime = 0 </P>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 1000 </P>
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
<SOLVERINFO>
......@@ -1151,18 +1151,18 @@
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" USERDEFINEDTYPE="IsentropicVortex" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="IsentropicVortex" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="IsentropicVortex" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="IsentropicVortex" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="IsentropicVortex" VALUE="0"/>
<D VAR="rhou" USERDEFINEDTYPE="IsentropicVortex" VALUE="0"/>
<D VAR="rhov" USERDEFINEDTYPE="IsentropicVortex" VALUE="0"/>
<D VAR="E" USERDEFINEDTYPE="IsentropicVortex" VALUE="0"/>
</REGION>
</BOUNDARYCONDITIONS>
<FUNCTION NAME="InitialConditions">
<E VAR="rho" VALUE="1" />
<E VAR="rhou" VALUE="1" />
<E VAR="rhov" VALUE="1" />
<E VAR="E" VALUE="1" />
<E VAR="rho" VALUE="1"/>
<E VAR="rhou" VALUE="1"/>
<E VAR="rhov" VALUE="1"/>
<E VAR="E" VALUE="1"/>
</FUNCTION>
</CONDITIONS>
......
......@@ -1119,14 +1119,14 @@
<CONDITIONS>
<PARAMETERS>
<P> TimeStep = 0.0 </P>
<P> NumSteps = 10 </P>
<P> FinTime = 0 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 1.0 </P>
<P> IO_CheckTime = 100 </P>
<P> FinTime = 0 </P>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 1000 </P>
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
<SOLVERINFO>
......@@ -1151,18 +1151,18 @@
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" USERDEFINEDTYPE="IsentropicVortex" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="IsentropicVortex" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="IsentropicVortex" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="IsentropicVortex" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="IsentropicVortex" VALUE="0"/>
<D VAR="rhou" USERDEFINEDTYPE="IsentropicVortex" VALUE="0"/>
<D VAR="rhov" USERDEFINEDTYPE="IsentropicVortex" VALUE="0"/>
<D VAR="E" USERDEFINEDTYPE="IsentropicVortex" VALUE="0"/>
</REGION>
</BOUNDARYCONDITIONS>
<FUNCTION NAME="InitialConditions">
<E VAR="rho" VALUE="1" />
<E VAR="rhou" VALUE="1" />
<E VAR="rhov" VALUE="1" />
<E VAR="E" VALUE="1" />
<E VAR="rho" VALUE="1"/>
<E VAR="rhou" VALUE="1"/>
<E VAR="rhov" VALUE="1"/>
<E VAR="E" VALUE="1"/>
</FUNCTION>
</CONDITIONS>
......
......@@ -334,13 +334,13 @@
<PARAMETERS>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> FinTime = 0.0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 1.0 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
<SOLVERINFO>
......@@ -368,28 +368,28 @@
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
</REGION>
<REGION REF="1">
<D VAR="rho" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
</REGION>
<REGION REF="2">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
</REGION>
<REGION REF="3">
<D VAR="rho" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
</REGION>
</BOUNDARYCONDITIONS>
......
......@@ -339,16 +339,16 @@
<P> IO_InfoSteps = 100 </P>
<P> IO_CheckTime = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 1.0 </P>
<P> CFL = 0.4 </P>
</PARAMETERS>
<SOLVERINFO>
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="DiscontinuousApproach" VALUE="StandardDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4" />
<I PROPERTY="UpwindType" VALUE="Exact" />
<I PROPERTY="ProblemType" VALUE="RinglebFlow" />
<I PROPERTY="EQType" VALUE="EulerCFE" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4"/>
<I PROPERTY="UpwindType" VALUE="Exact" />
<I PROPERTY="ProblemType" VALUE="RinglebFlow" />
</SOLVERINFO>
<VARIABLES>
......@@ -367,22 +367,22 @@
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
</REGION>
<REGION REF="1">
<D VAR="rho" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
</REGION>
<REGION REF="2">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhou" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="Wall" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="Wall" VALUE="0" />
</REGION>
<REGION REF="3">
<D VAR="rho" USERDEFINEDTYPE="RinglebFlow" VALUE="0" />
......
CompressibleFlowSolver
==========================================
Test_IsentropicVortex16_m3.xml
L 2 error (variable rho): 0.137274
L inf error (variable rho): 0.130329
L 2 error (variable rhou): 0.222511
L inf error (variable rhou): 0.153607
L 2 error (variable rhov): 0.303939
L inf error (variable rhov): 0.229933
L 2 error (variable E): 0.39357
L inf error (variable E): 0.431074
L 2 error (variable rho): 0.00868368
L inf error (variable rho): 0.0155196
L 2 error (variable rhou): 0.00702714
L inf error (variable rhou): 0.0167377
L 2 error (variable rhov): 0.181591
L inf error (variable rhov): 0.114085
L 2 error (variable E): 0.104563
L inf error (variable E): 0.143785
----------------------------------------
Test_IsentropicVortex16_m8.xml
L 2 error (variable rho): 0.0351889
L inf error (variable rho): 0.0315969
L 2 error (variable rhou): 0.0569376
L inf error (variable rhou): 0.0362279
L 2 error (variable rhov): 0.0775479
L inf error (variable rhov): 0.0547527
L 2 error (variable E): 0.100569
L inf error (variable E): 0.0964763
L 2 error (variable rho): 8.8147e-05
L inf error (variable rho): 0.00103674
L 2 error (variable rhou): 0.000249094
L inf error (variable rhou): 0.00319355
L 2 error (variable rhov): 0.0148193
L inf error (variable rhov): 0.00836934
L 2 error (variable E): 0.00829906
L inf error (variable E): 0.011468
----------------------------------------
Test_CylinderSubsonic_m3.xml
L 2 error (variable rho): 42.8519
......@@ -44,29 +44,29 @@ Test_CylinderSubsonicMix.xml
L 2 error (variable rho): 42.8519
L inf error (variable rho): 1.32074
L 2 error (variable rhou): 4.28832
L inf error (variable rhou): 0.198898
L 2 error (variable rhov): 0.0808749
L inf error (variable rhov): 0.114009
L inf error (variable rhou): 0.200515
L 2 error (variable rhov): 0.0812541
L inf error (variable rhov): 0.358852
L 2 error (variable E): 5.24313
L inf error (variable E): 0.159723
----------------------------------------
Test_RinglebFlow_m3.xml
L 2 error (variable rho): 0.000570422
L inf error (variable rho): 0.00546563
L 2 error (variable rho): 0.000570417
L inf error (variable rho): 0.00546575
L 2 error (variable rhou): 0.00113894
L inf error (variable rhou): 0.0171894
L 2 error (variable rhov): 0.000469775
L inf error (variable rhou): 0.0171896
L 2 error (variable rhov): 0.000469772
L inf error (variable rhov): 0.00163612
L 2 error (variable E): 0.000999988
L inf error (variable E): 0.00892634
L 2 error (variable E): 0.000999995
L inf error (variable E): 0.0089269
----------------------------------------
Test_RinglebFlow_m8.xml
L 2 error (variable rho): 0.000990993
L inf error (variable rho): 0.0204555
L 2 error (variable rhou): 0.003264
L inf error (variable rhou): 0.040774
L 2 error (variable rhov): 0.000278132
L inf error (variable rhov): 0.00525138
L 2 error (variable E): 0.0016556
L inf error (variable E): 0.0324037
L 2 error (variable rho): 0.000991036
L inf error (variable rho): 0.0204617
L 2 error (variable rhou): 0.00326397
L inf error (variable rhou): 0.0407716
L 2 error (variable rhov): 0.000278189
L inf error (variable rhov): 0.00526011
L 2 error (variable E): 0.00165554
L inf error (variable E): 0.0324235
----------------------------------------
......@@ -4,7 +4,6 @@ SET(CompressibleFlowSolverSource
./EquationSystems/EulerCFE.cpp
./EquationSystems/EulerArtificialDiffusionCFE.cpp
./EquationSystems/NavierStokesCFE.cpp
./EquationSystems/UnsteadySystem.cpp
./RiemannSolvers/CompressibleSolver.cpp
./RiemannSolvers/AverageSolver.cpp
./RiemannSolvers/ExactSolver.cpp)
......
......@@ -53,6 +53,9 @@ namespace Nektar
{
}
/**
* Initialization object for CompressibleFlowSystem class.
*/
void CompressibleFlowSystem::v_InitObject()
{
UnsteadySystem::v_InitObject();
......@@ -94,18 +97,25 @@ namespace Nektar
m_advection->SetRiemannSolver(m_riemannSolver);
}
/**
* Destructor for CompressibleFlowSystem class.
*/
CompressibleFlowSystem::~CompressibleFlowSystem()
{
}
/**
* Print out a summary with some relevant information.
*/
void CompressibleFlowSystem::v_PrintSummary(std::ostream &out)
{
UnsteadySystem::v_PrintSummary(out);
}
//----------------------------------------------------
/**
* Wall boundary conditions for compressible flow problems.
*/
void CompressibleFlowSystem::WallBoundary(
int b,
int cnt,
......@@ -127,7 +137,8 @@ namespace Nektar
// user defined boundaries into account
int e, id1, id2, npts;
for(e = 0; e < m_fields[0]->GetBndCondExpansions()[b]->GetExpSize();++e)
for(e = 0; e < m_fields[0]->
GetBndCondExpansions()[b]->GetExpSize(); ++e)
{
npts = m_fields[0]->GetBndCondExpansions()[b]->
GetExp(e)->GetNumPoints(0);
......@@ -139,7 +150,7 @@ namespace Nektar
switch(m_expdim)
{
// Special case for 2D
// Special case for 2D
case 2:
{
Array<OneD, NekDouble> tmp_n(npts);
......@@ -194,7 +205,7 @@ namespace Nektar
break;
}
// For 1D/3D, define: v* = v - (v.n)n so that v*.n = 0
// For 1D/3D, define: v* = v - (v.n)n so that v*.n = 0
case 1:
case 3:
{
......@@ -225,17 +236,21 @@ namespace Nektar
}
default:
ASSERTL0(false,"Illegal expansion dimension");
break;
}
// copy boundary adjusted values into the boundary expansion
for (i = 0; i < nvariables; ++i)
{
Vmath::Vcopy(npts, &Fwd[i][id2], 1, &(m_fields[i]->
GetBndCondExpansions()[b]->UpdatePhys())[id1], 1);
GetBndCondExpansions()[b]->UpdatePhys())[id1], 1);
}
}
}
/**
* Wall boundary conditions for compressible flow problems.
*/
void CompressibleFlowSystem::SymmetryBoundary(
int bcRegion,
int cnt,
......@@ -255,7 +270,8 @@ namespace Nektar
int e, id1, id2, npts;
for(e = 0; e < m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize(); ++e)
for(e = 0; e < m_fields[0]->
GetBndCondExpansions()[bcRegion]->GetExpSize(); ++e)
{
npts = m_fields[0]->GetBndCondExpansions()[bcRegion]->
GetExp(e)->GetNumPoints(0);
......@@ -269,7 +285,8 @@ namespace Nektar
case 1:
{
ASSERTL0(false,
"1D not yet implemented for Compressible Flow Equations");
"1D not yet implemented for Compressible "
"Flow Equations");
}
break;
case 2:
......@@ -314,10 +331,11 @@ namespace Nektar
break;
case 3:
ASSERTL0(false,
"3D not yet implemented for Compressible Flow Equations");
"3D not yet implemented for Compressible "
"Flow Equations");
break;
default:
ASSERTL0(false,"Illegal expansion dimension");
ASSERTL0(false, "Illegal expansion dimension");
}
// copy boundary adjusted values into the boundary expansion
......@@ -389,8 +407,8 @@ namespace Nektar
/**
* @brief Calculate the pressure field \f$ p =
* (\gamma-1)(E-\frac{1}{2}\rho\| \mathbf{v} \|^2) \f$ assuming an ideal gas
* law.
* (\gamma-1)(E-\frac{1}{2}\rho\| \mathbf{v} \|^2) \f$ assuming an ideal
* gas law.
*
* @param physfield Input momentum.
* @param pressure Computed pressure field.
......@@ -553,9 +571,9 @@ namespace Nektar
minLength = sqrt(Area);
}
tstep[n] = alpha * minLength
/ (stdVelocity[n] * cLambda
* (ExpOrder[n] - 1) * (ExpOrder[n] - 1));
tstep[n] = m_cflSafetyFactor * alpha * minLength
/ (stdVelocity[n] * cLambda
* (ExpOrder[n] - 1) * (ExpOrder[n] - 1));
}
// Get the minimum time-step limit and return the time-step
......@@ -563,7 +581,14 @@ namespace Nektar
m_comm->AllReduce(TimeStep, LibUtilities::ReduceMin);
return TimeStep;
}
/**
* @brief Compute the advection velocity in the standard space
* for each element of the expansion.
*
* @param inarray Momentum field.
* @param stdV Standard velocity field.
*/
void CompressibleFlowSystem::GetStdVelocity(
const Array<OneD, const Array<OneD, NekDouble> > &inarray,
Array<OneD, NekDouble> &stdV)
......@@ -586,9 +611,9 @@ namespace Nektar
velocity [i] = Array<OneD, NekDouble>(nTotQuadPoints);
stdVelocity[i] = Array<OneD, NekDouble>(nTotQuadPoints, 0.0);
}
GetVelocityVector(inarray,velocity);
GetPressure (inarray,pressure);
GetSoundSpeed (inarray,pressure,soundspeed);
GetVelocityVector(inarray, velocity);
GetPressure (inarray, pressure);
GetSoundSpeed (inarray, pressure, soundspeed);
for(int el = 0; el < n_element; ++el)
{
......@@ -642,4 +667,63 @@ namespace Nektar
}
}
}
/**
* @brief Set the denominator to compute the time step when a cfl
* control is employed. This function is no longer used but is still
* here for being utilised in the future.
*
* @param n Order of expansion element by element.
*/
NekDouble CompressibleFlowSystem::GetStabilityLimit(int n)
{
if (n > 20)
{
ASSERTL0(false,
"Illegal modes dimension for CFL calculation "
"(P has to be less then 20)");
}
NekDouble CFLDG[21] = { 2.0000, 6.0000, 11.8424, 19.1569,
27.8419, 37.8247, 49.0518, 61.4815,
75.0797, 89.8181, 105.6700, 122.6200,
140.6400, 159.7300, 179.8500, 201.0100,
223.1800, 246.3600, 270.5300, 295.6900,
321.8300}; //CFLDG 1D [0-20]
NekDouble CFLCG[2] = {1.0, 1.0};
NekDouble CFL;
if (m_projectionType == MultiRegions::eDiscontinuous)
{
CFL = CFLDG[n];
}
else
{
ASSERTL0(false,
"Continuos Galerkin stability coefficients "
"not introduced yet.");
}
return CFL;
}
/**
* @brief Compute the vector of denominators to compute the time step
* when a cfl control is employed. This function is no longer used but
* is still here for being utilised in the future.
*
* @param ExpOrder Order of expansion element by element.
*/
Array<OneD, NekDouble> CompressibleFlowSystem::GetStabilityLimitVector(
const Array<OneD,int> &ExpOrder)
{
int i;
Array<OneD,NekDouble> returnval(m_fields[0]->GetExpSize(), 0.0);
for (i =0; i<m_fields[0]->GetExpSize(); i++)
{
returnval[i] = GetStabilityLimit(ExpOrder[i]);
}
return returnval;
}
}
......@@ -75,6 +75,14 @@ namespace Nektar
static std::string className;
virtual ~CompressibleFlowSystem();
/// Function to calculate the stability limit for DG/CG.
NekDouble GetStabilityLimit(int n);
/// Function to calculate the stability limit for DG/CG
/// (a vector of them).
Array<OneD, NekDouble> GetStabilityLimitVector(
const Array<OneD,int> &ExpOrder);
protected:
SolverUtils::RiemannSolverSharedPtr m_riemannSolver;
......
///////////////////////////////////////////////////////////////////////////////
//
// File UnsteadySystem.cpp
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Generic timestepping for unsteady compressible flow solvers
//
///////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <CompressibleFlowSolver/EquationSystems/UnsteadySystem.h>
namespace Nektar
{
/**
* @class UnsteadySystem
*
* Provides the underlying timestepping framework for unsteady compressible
* flow solvers including the general timestepping routines. This class is not
* intended to be directly instantiated, but rather is a base class on which
* to define compressible flow solvers, e.g. Euler, Euler with artificial
* diffusion, Navier-Stokes.
*
* For details on implementing unsteady solvers see
* \ref sectionADRSolverModuleImplementation
*/
/**
* Processes SolverInfo parameters from the session file and sets up
* timestepping-specific code.
* @param pSession Session object to read parameters from.
*/
/*
UnsteadySystem::UnsteadySystem(
const LibUtilities::SessionReaderSharedPtr& pSession)
: EquationSystem(pSession)
{
}
void UnsteadySystem::v_InitObject()
{
EquationSystem::v_InitObject();
// Load SolverInfo parameters
m_session->MatchSolverInfo("DIFFUSIONADVANCEMENT","Explicit",
m_explicitDiffusion,true);
m_session->MatchSolverInfo("ADVECTIONADVANCEMENT","Explicit",
m_explicitAdvection,true);
// Determine TimeIntegrationMethod to use.
ASSERTL0(m_session->DefinesSolverInfo("TIMEINTEGRATIONMETHOD"),
"No TIMEINTEGRATIONMETHOD defined in session.");
int i;
for (i = 0; i < (int)LibUtilities::SIZE_TimeIntegrationMethod; ++i)
{
bool match;
m_session->MatchSolverInfo("TIMEINTEGRATIONMETHOD",
LibUtilities::TimeIntegrationMethodMap[i], match, false);
if (match)
{
m_timeIntMethod = (LibUtilities::TimeIntegrationMethod) i;
break;
}
}
ASSERTL0(i != (int) LibUtilities::SIZE_TimeIntegrationMethod,
"Invalid time integration type.");
// if discontinuous Galerkin determine numerical flux to use
if (m_projectionType == MultiRegions::eDiscontinuous)
{
ASSERTL0(m_session->DefinesSolverInfo("UPWINDTYPE"),
"No UPWINDTYPE defined in session.");
int i;
for (i = 0; i < (int)SIZE_UpwindType; ++i)
{
bool match;
m_session->MatchSolverInfo("UPWINDTYPE",
UpwindTypeMap[i], match, false);
if (match)
{
m_upwindType = (UpwindType) i;
break;
}
}
ASSERTL0(i != (int) SIZE_UpwindType,
"Invalid upwind type.");
}
else
{
ASSERTL0(false,"No Continuous Galerkin implemented for compressible flow solver.");
}
m_session->LoadParameter("Gamma",m_gamma,1.4);
m_session->LoadParameter("GasConstant",m_GasConstant,287.058);
m_session->LoadParameter("CFLParameter",m_cflSafetyFactor,0.0);
// Load generic input parameters
m_session->LoadParameter("IO_InfoSteps", m_infosteps, 0);
}
UnsteadySystem::~UnsteadySystem()
{
}
void UnsteadySystem::v_DoSolve()
{
int i, n, nchk = 0;
int nq = m_fields[0]->GetTotPoints();
int ncoeffs = m_fields[0]->GetNcoeffs();
int nvariables = m_fields.num_elements();
int n_elements = m_fields[0]->GetExpSize();
// Set up wrapper to fields data storage.
Array<OneD, Array<OneD, NekDouble> > fields(nvariables);
Array<OneD, Array<OneD, NekDouble> > fieldsOld(nvariables);
Array<OneD, Array<OneD, NekDouble> > tmp(nvariables);
for(i = 0; i < nvariables; ++i)
{
m_fields[i]->SetPhysState(false);
fields[i] = m_fields[i]->UpdatePhys();
fieldsOld[i] = Array<OneD, NekDouble>(nq);
}
// Saving initial condition and starting residuals file
NekDouble Rsd;
std::string outname = m_sessionName + ".rsd";
ofstream outfile(outname.c_str());
outfile << "# it rho rhou rhov E" << endl;
WriteTecplotFile(-1,"tec",false);
// CFL parameters definition
// Declaring the DG-CFL limit
Array<OneD,NekDouble> CFL(n_elements,0.0);
const Array<OneD,int> ExpOrder = GetNumExpModesPerExp();
Array<OneD,NekDouble> DGStability = GetStabilityLimitVector(ExpOrder);
// Declare an array of TimeIntegrationSchemes For multi-stage
// methods, this array will have just one entry containing the
// actual multi-stage method...
// For multi-steps method, this can have multiple entries
// - the first scheme will used for the first timestep (this
// is an initialization scheme)
// - the second scheme will used for the second timestep
// (this is an initialization scheme)
// - ...
// - the last scheme will be used for all other time-steps
// (this will be the actual scheme)
Array<OneD, LibUtilities::TimeIntegrationSchemeSharedPtr> IntScheme;
LibUtilities::TimeIntegrationSolutionSharedPtr u;
int numMultiSteps;
NekDouble RKStability;
switch(m_timeIntMethod)
{
case LibUtilities::eForwardEuler:
case LibUtilities::eClassicalRungeKutta4:
{
numMultiSteps = 1;
RKStability = 2.784 * m_cflSafetyFactor;
Vmath::Sdiv(n_elements, RKStability, DGStability, 1, CFL, 1);
IntScheme = Array<OneD, LibUtilities::
TimeIntegrationSchemeSharedPtr>(numMultiSteps);
LibUtilities::TimeIntegrationSchemeKey IntKey(m_timeIntMethod);
IntScheme[0] = LibUtilities::TimeIntegrationSchemeManager()[IntKey];
u = IntScheme[0]->InitializeScheme(m_timestep, fields,
m_time, m_ode);
break;
}
case LibUtilities::eAdamsBashforthOrder2:
{
numMultiSteps = 2;
RKStability = m_cflSafetyFactor;
Vmath::Sdiv(n_elements, RKStability, DGStability, 1, CFL, 1);
IntScheme = Array<OneD, LibUtilities::
TimeIntegrationSchemeSharedPtr>(numMultiSteps);
// Used in the first time step to initalize the scheme
LibUtilities::TimeIntegrationSchemeKey IntKey0(
LibUtilities::eClassicalRungeKutta4);
// Used for all other time steps
LibUtilities::TimeIntegrationSchemeKey IntKey1(m_timeIntMethod);
IntScheme[0] = LibUtilities::TimeIntegrationSchemeManager()[IntKey0];
IntScheme[1] = LibUtilities::TimeIntegrationSchemeManager()[IntKey1];
// Initialise the scheme for the actual time integration scheme
u = IntScheme[1]->InitializeScheme(m_timestep, fields,
m_time, m_ode);
break;
}
default:
{
ASSERTL0(false, "populate switch statement for integration scheme");
}
}
outname = m_session->GetFilename() + ".his";
std::ofstream hisFile (outname.c_str());
n = 0;
// Check final condition
if(m_fintime>0.0 && m_steps>0)
ASSERTL0(false,"Final condition not unique: fintime>0.0 & Nsteps>0");
// Check Timestep condition
if(m_timestep>0.0 && m_cflSafetyFactor>0.0)
ASSERTL0(false,"Timestep not unique: timestep>0.0 & CFL>0.0");
// Perform integration in time.
while(n < m_steps || m_time < m_fintime)
{
// Save old solution
for(i = 0; i < nvariables; ++i)
Vmath::Vcopy(nq,fields[i],1,fieldsOld[i],1);
if(m_cflSafetyFactor>0.0)
m_timestep = GetTimeStep(fields, ExpOrder, CFL, RKStability);
// Integrate over timestep.
if( n < numMultiSteps-1)
{
// Use initialisation schemes if time step is less than the
// number of steps in the scheme.
fields = IntScheme[n]->TimeIntegrate(m_timestep,u,m_ode);
}
else
{
fields = IntScheme[numMultiSteps-1]->TimeIntegrate(m_timestep,u,m_ode);
}
// Increment time.
if(m_time+m_timestep>m_fintime && m_fintime>0.0)
m_timestep = m_fintime - m_time;
m_time += m_timestep;
// Write out status information.
if((!((n+1)%m_infosteps) || n==m_steps || m_time==m_fintime) && m_comm->GetRank() == 0)
{
cout << "Steps: " << n+1 << "\t Time: " << m_time << "\t TimeStep: " << m_timestep << endl;
}
// Write out checkpoint files.
if((n && (!((n+1)%m_checksteps))) || (n==m_steps && m_steps!=0) || (m_time>=m_fintime && m_fintime>0.0))
{
// update m_fields
for(i = 0; i < nvariables; ++i)
{
Vmath::Vcopy(nq,fields[i],1,m_fields[i]->UpdatePhys(),1);
}
for(i = 0; i < nvariables; ++i)
{
m_fields[i]->FwdTrans(m_fields[i]->GetPhys(),m_fields[i]->UpdateCoeffs());
}
Checkpoint_Output(nchk++);
}
// Calculate and save residuals
outfile << n << " ";
for(i = 0; i < nvariables; ++i)
{
Vmath::Vsub(nq,fields[i],1,fieldsOld[i],1,fieldsOld[i],1);
Vmath::Vmul(nq,fieldsOld[i],1,fieldsOld[i],1,fieldsOld[i],1);
Rsd = sqrt(Vmath::Vsum(nq,fieldsOld[i],1));
outfile << Rsd << " ";
}
outfile << endl;
n++;
}
}
void UnsteadySystem::v_DoInitialise()
{
SetInitialConditions();
}
void UnsteadySystem::v_PrintSummary(std::ostream &out)
{
EquationSystem::v_PrintSummary(out);
out << "\tUpwind Type : " << UpwindTypeMap[m_upwindType] << endl;
out << "\tAdvection : " << (m_explicitAdvection ? "explicit" : "implicit") << endl;
out << "\tIntegration Type: " << LibUtilities::TimeIntegrationMethodMap[m_timeIntMethod] << endl;
out << "\tTime Step : " << m_timestep << endl;
out << "\tNo. of Steps : " << m_steps << endl;
out << "\tFinal Time : " << m_fintime << endl;
out << "\tCFL safety factor : " << m_cflSafetyFactor << endl;
out << "\tCheckpoints : " << m_checksteps << " steps" << endl;
out << "\tVariables : rho should be in field[0]" <<endl;
out << "\t rhou should be in field[1]" <<endl;
out << "\t rhov should be in field[2]" <<endl;
out << "\t E (rhoe) should be in field[3]" <<endl;
}
void UnsteadySystem::v_NumericalFlux(
Array<OneD, Array<OneD, NekDouble> > &physfield,
Array<OneD, Array<OneD, NekDouble> > &numflux)
{
ASSERTL0(false, "This function is not implemented for this equation.");
}
void UnsteadySystem::v_NumericalFlux(
Array<OneD, Array<OneD, NekDouble> > &physfield,
Array<OneD, Array<OneD, NekDouble> > &numfluxX,
Array<OneD, Array<OneD, NekDouble> > &numfluxY )
{
ASSERTL0(false, "This function is not implemented for this equation.");
}
void UnsteadySystem::v_GetFluxVector(const int i, const int j,
Array<OneD, Array<OneD, NekDouble> > &physfield,
Array<OneD, Array<OneD, NekDouble> > &flux)
{
for(int k = 0; k < flux.num_elements(); ++k)
{
Vmath::Zero(GetNpoints(), flux[k], 1);
}
Vmath::Vcopy(GetNpoints(), physfield[i], 1, flux[j], 1);
}
*/
}
///////////////////////////////////////////////////////////////////////////////
//
// File UnsteadySystem.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Generic timestepping for unsteady compressible flow solvers
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_UNSTEADYSYSTEM_H
#define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_UNSTEADYSYSTEM_H
#include <LibUtilities/TimeIntegration/TimeIntegrationScheme.h>
#include <SolverUtils/EquationSystem.h>
namespace Nektar
{
/*
enum UpwindType
{
eNotSet, ///< flux not defined
eAverage, ///< averaged (or centred) flux
eLLF, ///< local Lax-Friedrich flux
eHLL, ///< Harten-Lax-Leer flux
eHLLC, ///< Harten-Lax-Leer Contact corrected flux
eAUSM, ///< Advection-Upstream-Splitting-Method flux
eAUSMPlus, ///< Advection-Upstream-Splitting-Method flux with reduced pressure oscillations
eAUSMPlusUp, ///< Advection-Upstream-Splitting-Method flux for low Mach flows
eAUSMPlusUpAllSpeed, ///< Advection-Upstream-Splitting-Method flux for all Mach flows
eExact, ///< Exact flux
SIZE_UpwindType ///< Length of enum list
};
const char* const UpwindTypeMap[] =
{
"NoSet",
"Average",
"LF",
"HLL",
"HLLC",
"AUSM",
"AUSMPlus",
"AUSMPlusUp",
"AUSMPlusUpAllSpeed",
"Exact"
};
class UnsteadySystem: public SolverUtils::EquationSystem
{
public:
/// Destructor
virtual ~UnsteadySystem();
/// GetTimeStep.
NekDouble GetTimeStep(const Array<OneD, Array<OneD,NekDouble> > physarray, const Array<OneD,int> ExpOrder, const Array<OneD,NekDouble> CFLDG, NekDouble timeCFL)
{
NekDouble TimeStep = v_GetTimeStep(physarray, ExpOrder, CFLDG, timeCFL);
return TimeStep;
}
protected:
///< numerical upwind flux selector
UpwindType m_upwindType;
/// Number of time steps between outputting status information.
int m_infosteps;
/// The time integration method to use.
LibUtilities::TimeIntegrationMethod m_timeIntMethod;
/// The time integration scheme operators to use.
LibUtilities::TimeIntegrationSchemeOperators m_ode;
/// Indicates if explicit or implicit treatment of diffusion is used.
bool m_explicitDiffusion;
/// Indicates if explicit or implicit treatment of advection is used.
bool m_explicitAdvection;
/// Indicates if variables are primitive or conservative
bool m_primitive;
/// Cp/Cv ratio gamma
NekDouble m_gamma;
/// Gas Constant
NekDouble m_GasConstant;
/// Initialises UnsteadySystem class members.
UnsteadySystem(const LibUtilities::SessionReaderSharedPtr& pSession);
virtual void v_InitObject();
/// Solves an unsteady problem.
virtual void v_DoSolve();
/// Sets up initial conditions.
virtual void v_DoInitialise();
/// Print a summary of time stepping parameters.
virtual void v_PrintSummary(std::ostream &out);
///
virtual void v_NumericalFlux(
Array<OneD, Array<OneD, NekDouble> > &physfield,
Array<OneD, Array<OneD, NekDouble> > &numflux);
///
virtual void v_NumericalFlux(
Array<OneD, Array<OneD, NekDouble> > &physfield,
Array<OneD, Array<OneD, NekDouble> > &numfluxX,
Array<OneD, Array<OneD, NekDouble> > &numfluxY );
virtual void v_GetFluxVector(const int i, const int j,
Array<OneD, Array<OneD, NekDouble> > &physfield,
Array<OneD, Array<OneD, NekDouble> > &flux);
virtual void v_SetInitialConditions(NekDouble initialtime = 0.0,
bool dumpInitialConditions = true) = 0;
virtual NekDouble v_GetTimeStep(const Array<OneD, Array<OneD,NekDouble> > physarray,
const Array<OneD,int> ExpOrder,
const Array<OneD,NekDouble> CFLDG, NekDouble timeCFL) = 0;
virtual void v_EvaluateExactSolution(unsigned int field,
Array<OneD, NekDouble> &outfield,
const NekDouble time)
{
}
private:
///< CFL parameter selection
NekDouble m_cflSafetyFactor;
};
*/
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment