42 string RinglebFlow::className =
44 "RinglebFlow", RinglebFlow::create,
45 "Euler equations for Ringleb flow.");
47 RinglebFlow::RinglebFlow(
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;
140 J11 = 39062.5 / pow(par1, 3.5) * (1.0 / VV - 2.0 / VV * ss) *
141 V + 1562.5 / pow(par1, 2.5) * (-2.0 / (VV * V) + 4.0 /
142 (VV * V) * ss) + 12.5 / pow(par1, 1.5) * V + 312.5 /
143 pow(par1, 2.5) * V + 7812.5 / pow(par1, 3.5) * V -
144 0.25 * (-1.0 / pow(par1, 0.5) * V/(1.0 - 0.2 *
145 pow(par1, 0.5)) - (1.0 + 0.2 * pow(par1, 0.5)) /
146 pow((1.0 - 0.2 * pow(par1, 0.5)), 2.0) /
147 pow(par1, 0.5) * V) / (1.0 + 0.2 * pow(par1, 0.5)) *
148 (1.0 - 0.2 * pow(par1, 0.5));
150 J12 = -6250.0 / pow(par1, 2.5) / VV * sint * cos(theta);
151 J21 = -6250.0 / (VV * V) * sint /
152 pow(par1, 2.5) * pow((1.0 - ss), 0.5) +
153 78125.0 / V * sint / pow(par1, 3.5) *
154 pow((1.0 - ss), 0.5);
157 if(abs(y[i])<toll && abs(cos(theta))<toll)
159 J22 = -39062.5 / pow(par1, 3.5) / V + 3125 /
160 pow(par1, 2.5) / (VV * V) + 12.5 / pow(par1, 1.5) *
161 V + 312.5 / pow(par1, 2.5) * V + 7812.5 /
162 pow(par1, 3.5) * V - 0.25 * (-1.0 / pow(par1, 0.5) *
163 V / (1.0 - 0.2 * pow(par1, 0.5)) - (1.0 + 0.2 *
164 pow(par1, 0.5)) / pow((1.0 - 0.2 *
165 pow(par1, 0.5)), 2.0) / pow(par1, 0.5) * V) /
166 (1.0 + 0.2 * pow(par1, 0.5)) * (1.0 - 0.2 *
170 dV = -1.0 / J22 * Fx;
176 J22 = 3125.0 / VV * cos(theta) / pow(par1, 2.5) *
177 pow((1.0 - ss), 0.5) - 3125.0 / VV * ss /
178 pow(par1, 2.5) / pow((1.0 - ss), 0.5) * cos(theta);
180 det = -1.0 / (J11 * J22 - J12 * J21);
183 dV = det * ( J22 * Fx - J12 * Fy);
184 dtheta = det * (-J21 * Fx + J11 * Fy);
188 theta = theta + dtheta;
191 errTheta = abs(dtheta);
195 c = sqrt(1.0 - gamma_1_2 * VV);
196 r = pow(c, 1.0 / gamma_1_2);
199 rhou[i] = rho[i] * V * cos(theta);
200 rhov[i] = rho[i] * V * sin(theta);
201 P = (c * c) * rho[i] / gamma;
202 E[i] = P / (gamma - 1.0) + 0.5 *
203 (rhou[i] * rhou[i] / rho[i] + rhov[i] * rhov[i] / rho[i]);
227 ASSERTL0(
false,
"Error in variable number!");
#define ASSERTL0(condition, msg)
std::vector< std::pair< std::string, std::string > > SummaryList
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
SOLVER_UTILS_EXPORT int GetTotPoints()
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
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.
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.
virtual ~RinglebFlow()
Destructor for EulerCFE class.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.