Commit 7e534371 authored by Gianmarco Mengaldo's avatar Gianmarco Mengaldo
Browse files

Characteristic bcs added. Other minor modifications.

parent 7c3f3b5d
......@@ -78,6 +78,8 @@ namespace Nektar
eRterminal,
eCRterminal,
eRCRterminal,
eInflowCFE,
eOutflowCFE,
eNoUserDefined
};
......@@ -104,6 +106,8 @@ namespace Nektar
known_type["Symmetry"] = eSymmetry;
known_type["TimeDependent"] = eTimeDependent;
known_type["IsentropicVortex"] = eIsentropicVortex;
known_type["InflowCFE"] = eInflowCFE;
known_type["OutflowCFE"] = eOutflowCFE;
known_type["NoUserDefined"] = eNoUserDefined;
std::map<const std::string, BndUserDefinedType>::const_iterator it = known_type.find(userDefined);
......
......@@ -89,6 +89,11 @@ namespace Nektar
SolverUtils::AdvectionSharedPtr m_advection;
Array<OneD, NekDouble> m_velLoc;
NekDouble m_gamma;
NekDouble m_rho0;
NekDouble m_rhou0;
NekDouble m_rhov0;
NekDouble m_rhow0;
NekDouble m_E0;
NekDouble m_gasConstant;
CompressibleFlowSystem(
......@@ -111,6 +116,14 @@ namespace Nektar
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void InflowCFE(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void OutflowCFE(
int bcRegion,
int cnt,
Array<OneD, Array<OneD, NekDouble> > &physarray);
void GetVelocityVector(
const Array<OneD, Array<OneD, NekDouble> > &physfield,
Array<OneD, Array<OneD, NekDouble> > &velocity);
......
......@@ -90,7 +90,6 @@ namespace Nektar
*/
EulerCFE::~EulerCFE()
{
}
/**
......@@ -237,6 +236,26 @@ namespace Nektar
m_fields[i]->EvaluateBoundaryConditions(time);
}
}
// Inflow boundary condition based on characteristics
if (m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
SpatialDomains::eInflowCFE)
{
for (int i = 0; i < nvariables; ++i)
{
InflowCFE(n, cnt, inarray);
}
}
// Outflow boundary condition based on characteristics
if (m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
SpatialDomains::eOutflowCFE)
{
for (int i = 0; i < nvariables; ++i)
{
OutflowCFE(n, cnt, inarray);
}
}
// Isentropic Vortex Boundary Condition
if (m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
......
......@@ -222,7 +222,7 @@ namespace Nektar
NekDouble uaux, aaux, paux;
NekDouble chi = 0.0;
NekDouble EPSILON = 1.0e-6;
unsigned int iter, max_iter = 1000;
unsigned int iter, max_iter = 1000000;
/* Configuration (pattern) 1.
* ------------------------------------------------------
......@@ -251,7 +251,7 @@ namespace Nektar
++iter;
ASSERTL0(iter != max_iter,
"Exact Riemann solver exceeds maximum numer of "
"iterations (10000000000) in pattern 1 (RCS)")
"iterations (1000000) in pattern 1 (RCS)")
}
p_int = (p_intL + p_intR) / 2.0;
......@@ -351,7 +351,7 @@ namespace Nektar
++iter;
ASSERTL0(iter != max_iter,
"Exact Riemann solver exceeds maximum numer of "
"iterations (10000000000) in pattern 2 (SCR)")
"iterations (1000000) in pattern 2 (SCR)")
}
p_int = (p_intL + p_intR) / 2.0;
......@@ -447,7 +447,7 @@ namespace Nektar
++iter;
ASSERTL0(iter != max_iter,
"Exact Riemann solver exceeds maximum numer of "
"iterations (1000) in pattern 3 (SCS)")
"iterations (1000000) in pattern 3 (SCS)")
}
p_int = (p_intL + p_intR) / 2.0;
......@@ -533,7 +533,7 @@ namespace Nektar
++iter;
ASSERTL0(iter != max_iter,
"Exact Riemann solver exceeds maximum numer of "
"iterations (1000) in pattern 4 (RCR)")
"iterations (1000000) in pattern 4 (RCR)")
}
p_int = (p_intL + p_intR) / 2.0;
......
......@@ -744,6 +744,10 @@
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> rho0 = 1.225 </P>
<P> rhou0 = 0.1225 </P>
<P> rhov0 = 0.0 </P>
<P> E0 = 0.149875 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
......@@ -771,16 +775,16 @@
<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="rho0" />
<D VAR="rhou" VALUE="rhou0" />
<D VAR="rhov" VALUE="rhov0" />
<D VAR="E" VALUE="E0" />
</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="rho0" />
<D VAR="rhou" VALUE="rhou0" />
<D VAR="rhov" VALUE="rhov0" />
<D VAR="E" VALUE="E0" />
</REGION>
<REGION REF="2">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0"/>
......
......@@ -729,7 +729,11 @@
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 0.02 </P>
<P> rho0 = 1.225 </P>
<P> rhou0 = 0.1225 </P>
<P> rhov0 = 0.0 </P>
<P> E0 = 0.149875 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
<SOLVERINFO>
......@@ -756,16 +760,16 @@
<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="rho0" />
<D VAR="rhou" VALUE="rhou0" />
<D VAR="rhov" VALUE="rhov0" />
<D VAR="E" VALUE="E0" />
</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="rho0" />
<D VAR="rhou" VALUE="rhou0" />
<D VAR="rhov" VALUE="rhov0" />
<D VAR="E" VALUE="E0" />
</REGION>
<REGION REF="2">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0"/>
......
......@@ -728,6 +728,10 @@
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> rho0 = 1.225 </P>
<P> rhou0 = 0.1225 </P>
<P> rhov0 = 0.0 </P>
<P> E0 = 0.149875 </P>
<P> CFL = 1.0 </P>
</PARAMETERS>
......@@ -755,16 +759,16 @@
<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="rho0" />
<D VAR="rhou" VALUE="rhou0" />
<D VAR="rhov" VALUE="rhov0" />
<D VAR="E" VALUE="E0" />
</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="rho0" />
<D VAR="rhou" VALUE="rhou0" />
<D VAR="rhov" VALUE="rhov0" />
<D VAR="E" VALUE="E0" />
</REGION>
<REGION REF="2">
<D VAR="rho" USERDEFINEDTYPE="Wall" VALUE="0"/>
......
......@@ -1119,13 +1119,17 @@
<CONDITIONS>
<PARAMETERS>
<P> FinTime = 0 </P>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 1000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 0.02 </P>
<P> FinTime = 0 </P>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 1000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> rho0 = 1.225 </P>
<P> rhou0 = 0.1225 </P>
<P> rhov0 = 0.0 </P>
<P> E0 = 0.149875 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
<SOLVERINFO>
......
......@@ -1119,13 +1119,17 @@
<CONDITIONS>
<PARAMETERS>
<P> FinTime = 0 </P>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 1000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 0.02 </P>
<P> FinTime = 0 </P>
<P> TimeStep = 0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 1000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> rho0 = 1.225 </P>
<P> rhou0 = 0.1225 </P>
<P> rhov0 = 0.0 </P>
<P> E0 = 0.149875 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
<SOLVERINFO>
......
......@@ -333,13 +333,17 @@
<CONDITIONS>
<PARAMETERS>
<P> TimeStep = 0 </P>
<P> FinTime = 0.0 </P>
<P> NumSteps = 10 </P>
<P> IO_CheckSteps = 10000 </P>
<P> IO_InfoSteps = 100 </P>
<P> Gamma = 1.4 </P>
<P> CFL = 0.02 </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> Gamma = 1.4 </P>
<P> rho0 = 1.225 </P>
<P> rhou0 = 0.1225 </P>
<P> rhov0 = 0.0 </P>
<P> E0 = 0.149875 </P>
<P> CFL = 0.02 </P>
</PARAMETERS>
<SOLVERINFO>
......
......@@ -332,13 +332,17 @@
<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> Gamma = 1.4 </P>
<P> CFL = 0.4 </P>
<P> TimeStep = 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> rho0 = 1.225 </P>
<P> rhou0 = 0.1225 </P>
<P> rhov0 = 0.0 </P>
<P> E0 = 0.149875 </P>
<P> CFL = 0.4 </P>
</PARAMETERS>
<SOLVERINFO>
......
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