35 #include <boost/core/ignore_unused.hpp>
43 string RinglebFlow::className =
45 "RinglebFlow", RinglebFlow::create,
46 "Euler equations for Ringleb flow.");
78 boost::ignore_unused(time);
101 NekDouble c, k, phi, r, J, VV, pp, sint,
P, ss;
115 NekDouble gamma_1_2 = (gamma - 1.0) / 2.0;
117 for (
int i = 0; i < nTotQuadPoints; ++i)
119 while ((
abs(errV) > toll) || (
abs(errTheta) > toll))
123 c =
sqrt(1.0 - gamma_1_2 * VV);
127 J = 1.0 / c + 1.0 / (3.0 * c * c * c) +
128 1.0 / (5.0 * c * c * c * c * c) -
129 0.5 *
log((1.0 + c) / (1.0 - c));
131 r = pow(c, 1.0 / gamma_1_2);
132 xi = 1.0 / (2.0 * r) * (1.0 / VV - 2.0 * pp) + J / 2.0;
133 yi = phi / (r * V) *
sqrt(1.0 - VV * pp);
134 par1 = 25.0 - 5.0 * VV;
141 39062.5 / pow(par1, 3.5) * (1.0 / VV - 2.0 / VV * ss) * V +
142 1562.5 / pow(par1, 2.5) *
143 (-2.0 / (VV * V) + 4.0 / (VV * V) * ss) +
144 12.5 / pow(par1, 1.5) * V + 312.5 / pow(par1, 2.5) * V +
145 7812.5 / pow(par1, 3.5) * V -
147 (-1.0 / pow(par1, 0.5) * V / (1.0 - 0.2 * pow(par1, 0.5)) -
148 (1.0 + 0.2 * pow(par1, 0.5)) /
149 pow((1.0 - 0.2 * pow(par1, 0.5)), 2.0) /
150 pow(par1, 0.5) * V) /
151 (1.0 + 0.2 * pow(par1, 0.5)) * (1.0 - 0.2 * pow(par1, 0.5));
153 J12 = -6250.0 / pow(par1, 2.5) / VV * sint * cos(theta);
154 J21 = -6250.0 / (VV * V) * sint / pow(par1, 2.5) *
155 pow((1.0 - ss), 0.5) +
156 78125.0 / V * sint / pow(par1, 3.5) * pow((1.0 - ss), 0.5);
159 if (
abs(y[i]) < toll &&
abs(cos(theta)) < toll)
161 J22 = -39062.5 / pow(par1, 3.5) / V +
162 3125 / pow(par1, 2.5) / (VV * V) +
163 12.5 / pow(par1, 1.5) * V + 312.5 / pow(par1, 2.5) * V +
164 7812.5 / pow(par1, 3.5) * V -
166 (-1.0 / pow(par1, 0.5) * V /
167 (1.0 - 0.2 * pow(par1, 0.5)) -
168 (1.0 + 0.2 * pow(par1, 0.5)) /
169 pow((1.0 - 0.2 * pow(par1, 0.5)), 2.0) /
170 pow(par1, 0.5) * V) /
171 (1.0 + 0.2 * pow(par1, 0.5)) *
172 (1.0 - 0.2 * pow(par1, 0.5));
175 dV = -1.0 / J22 * Fx;
181 J22 = 3125.0 / VV * cos(theta) / pow(par1, 2.5) *
182 pow((1.0 - ss), 0.5) -
183 3125.0 / VV * ss / pow(par1, 2.5) / pow((1.0 - ss), 0.5) *
186 det = -1.0 / (J11 * J22 - J12 * J21);
189 dV = det * (J22 * Fx - J12 * Fy);
190 dtheta = det * (-J21 * Fx + J11 * Fy);
194 theta = theta + dtheta;
197 errTheta =
abs(dtheta);
200 c =
sqrt(1.0 - gamma_1_2 * VV);
201 r = pow(c, 1.0 / gamma_1_2);
204 rhou[i] = rho[i] * V * cos(theta);
205 rhov[i] = rho[i] * V * sin(theta);
206 P = (c * c) * rho[i] / gamma;
207 E[i] =
P / (gamma - 1.0) +
208 0.5 * (rhou[i] * rhou[i] / rho[i] + rhov[i] * rhov[i] / rho[i]);
214 V = kExt * sin(theta);
232 ASSERTL0(
false,
"Error in variable number!");
#define ASSERTL0(condition, msg)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
virtual ~RinglebFlow()
Destructor for EulerCFE class.
virtual void v_EvaluateExactSolution(unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time=0.0) override
Get the exact solutions for isentropic vortex and Ringleb flow problems.
void GetExactRinglebFlow(int field, Array< OneD, NekDouble > &outarray)
Ringleb Flow Test Case.
virtual void v_GenerateSummary(SolverUtils::SummaryList &s) override
Print a summary of time stepping parameters.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT int GetTotPoints()
Base class for unsteady solvers.
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s) override
Print a summary of time stepping parameters.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< std::pair< std::string, std::string > > SummaryList
EquationSystemFactory & GetEquationSystemFactory()
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
The above copyright notice and this permission notice shall be included.
scalarT< T > log(scalarT< T > in)
scalarT< T > abs(scalarT< T > in)
scalarT< T > sqrt(scalarT< T > in)