35 #include <boost/core/ignore_unused.hpp> 43 string RinglebFlow::className =
45 "RinglebFlow", RinglebFlow::create,
46 "Euler equations for Ringleb flow.");
48 RinglebFlow::RinglebFlow(
81 boost::ignore_unused(time);
105 NekDouble c, k, phi, r, J, VV, pp, sint,
P, ss;
119 NekDouble gamma_1_2 = (gamma - 1.0) / 2.0;
121 for (
int i = 0; i < nTotQuadPoints; ++i)
123 while ((abs(errV) > toll) || (abs(errTheta) > toll))
127 c = sqrt(1.0 - gamma_1_2 * VV);
131 J = 1.0 / c + 1.0 / (3.0 * c * c * c) +
132 1.0 / (5.0 * c * c * c * c * c) -
133 0.5 * log((1.0 + c) / (1.0 - c));
135 r = pow(c, 1.0 / gamma_1_2);
136 xi = 1.0 / (2.0 * r) * (1.0 / VV - 2.0 * pp) + J / 2.0;
137 yi = phi / (r * V) * sqrt(1.0 - VV * pp);
138 par1 = 25.0 - 5.0 * VV;
144 J11 = 39062.5 / pow(par1, 3.5) * (1.0 / VV - 2.0 / VV * ss) *
145 V + 1562.5 / pow(par1, 2.5) * (-2.0 / (VV * V) + 4.0 /
146 (VV * V) * ss) + 12.5 / pow(par1, 1.5) * V + 312.5 /
147 pow(par1, 2.5) * V + 7812.5 / pow(par1, 3.5) * V -
148 0.25 * (-1.0 / pow(par1, 0.5) * V/(1.0 - 0.2 *
149 pow(par1, 0.5)) - (1.0 + 0.2 * pow(par1, 0.5)) /
150 pow((1.0 - 0.2 * pow(par1, 0.5)), 2.0) /
151 pow(par1, 0.5) * V) / (1.0 + 0.2 * pow(par1, 0.5)) *
152 (1.0 - 0.2 * pow(par1, 0.5));
154 J12 = -6250.0 / pow(par1, 2.5) / VV * sint * cos(theta);
155 J21 = -6250.0 / (VV * V) * sint /
156 pow(par1, 2.5) * pow((1.0 - ss), 0.5) +
157 78125.0 / V * sint / pow(par1, 3.5) *
158 pow((1.0 - ss), 0.5);
161 if(abs(y[i])<toll && abs(cos(theta))<toll)
163 J22 = -39062.5 / pow(par1, 3.5) / V + 3125 /
164 pow(par1, 2.5) / (VV * V) + 12.5 / pow(par1, 1.5) *
165 V + 312.5 / pow(par1, 2.5) * V + 7812.5 /
166 pow(par1, 3.5) * V - 0.25 * (-1.0 / pow(par1, 0.5) *
167 V / (1.0 - 0.2 * pow(par1, 0.5)) - (1.0 + 0.2 *
168 pow(par1, 0.5)) / pow((1.0 - 0.2 *
169 pow(par1, 0.5)), 2.0) / pow(par1, 0.5) * V) /
170 (1.0 + 0.2 * pow(par1, 0.5)) * (1.0 - 0.2 *
174 dV = -1.0 / J22 * Fx;
180 J22 = 3125.0 / VV * cos(theta) / pow(par1, 2.5) *
181 pow((1.0 - ss), 0.5) - 3125.0 / VV * ss /
182 pow(par1, 2.5) / pow((1.0 - ss), 0.5) * cos(theta);
184 det = -1.0 / (J11 * J22 - J12 * J21);
187 dV = det * ( J22 * Fx - J12 * Fy);
188 dtheta = det * (-J21 * Fx + J11 * Fy);
192 theta = theta + dtheta;
195 errTheta = abs(dtheta);
199 c = sqrt(1.0 - gamma_1_2 * VV);
200 r = pow(c, 1.0 / gamma_1_2);
203 rhou[i] = rho[i] * V * cos(theta);
204 rhov[i] = rho[i] * V * sin(theta);
205 P = (c * c) * rho[i] / gamma;
206 E[i] = P / (gamma - 1.0) + 0.5 *
207 (rhou[i] * rhou[i] / rho[i] + rhov[i] * rhov[i] / rho[i]);
231 ASSERTL0(
false,
"Error in variable number!");
#define ASSERTL0(condition, msg)
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::vector< std::pair< std::string, std::string > > SummaryList
SOLVER_UTILS_EXPORT int GetTotPoints()
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
Base class for unsteady solvers.
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
void GetExactRinglebFlow(int field, Array< OneD, NekDouble > &outarray)
Ringleb Flow Test Case.
EquationSystemFactory & GetEquationSystemFactory()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
virtual void v_EvaluateExactSolution(unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time=0.0)
Get the exact solutions for isentropic vortex and Ringleb flow problems.
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
virtual ~RinglebFlow()
Destructor for EulerCFE class.