63 Real V, M, rho, gamma, dwdx, dwdt;
73 v0 = dwdx + (M*M-2)/(M*M-1)*dwdt/V,
74 v1 = V*V*dwdx + (M*M-2)/(M*M-1)*V*dwdt,
75 v2 = pow(V*dwdx + (M*M-2)/(M*M-1)*dwdt, 2),
82 m += (gamma+1)/12.*M*M*v3;
84 m += (gamma+1)/4.*M*v2;
87 m *= rho/sqrt(M*M-1.);
95 const libMesh::Point& p,
99 Real V, M, rho, gamma, dwdx, dwdt, dV, dM, drho, dgamma, ddwdx, ddwdt;
108 Mf = (M*M-2)/(M*M-1),
109 dMf = 2*M*dM/(M*M-1) - (M*M-2)/pow(M*M-1,2)*2*M*dM,
111 v0 = dwdx + Mf*dwdt/V,
112 v1 = V*V*dwdx + Mf*V*dwdt,
113 v2 = pow(V*dwdx + Mf*dwdt, 2),
118 v2dw = 2.*(V*dwdx + Mf*dwdt)*V*ddwdx,
119 v3dw = v0*v2dw+v0dw*v2,
123 v2dwt = 2.*(V*dwdx + Mf*dwdt)*Mf*ddwdt,
124 v3dwt = v0dwt*v2+v0*v2dwt,
126 dv0dV = -Mf*dwdt/(V*V)*dV,
127 dv1dV = (2.*V*dwdx + Mf*dwdt)*dV,
128 dv2dV = 2.*(V*dwdx + Mf*dwdt)*dwdx*dV,
129 dv3dV = dv0dV*v2+v0*dv2dV,
133 dv2dM = 2.*(V*dwdx + Mf*dwdt)*dMf*dwdt,
134 dv3dM = dv0dM*v2+v0*dv2dM,
136 f1 = rho/sqrt(M*M-1.),
137 df1drho = drho/sqrt(M*M-1.),
138 df1dM = -.5*rho/pow(M*M-1., 1.5)*2*M*dM;
146 m = f1*(dv1dV + dv1dM + v1dw + v1dwt) + (df1drho + df1dM) * v1;
155 (df1drho + df1dM) *M*M*v3 * (gamma+1)/12.+
156 f1*M*(2*dM*v3 + M*(dv3dV + dv3dM + v3dw + v3dwt)) * (gamma+1)/12. +
157 f1 * M*M*v3/12.*dgamma;
163 (df1drho + df1dM) * M*v2 * (gamma+1)/4.+
164 f1*(dM*v2+M*(dv2dV + dv2dM + v2dw + v2dwt)) * (gamma+1)/4. +
211 Real V, M, rho, gamma, dwdx, dwdt;
221 Mf = (M*M-2)/(M*M-1),
223 v0 = dwdx + (M*M-2)/(M*M-1)*dwdt/V,
224 v2 = pow(V*dwdx + (M*M-2)/(M*M-1)*dwdt, 2),
228 v2dw = 2.*(V*dwdx + Mf*dwdt)*V,
229 v3dw = v0*v2dw+v0dw*v2,
231 f1 = rho/sqrt(M*M-1.);
247 m += f1*M*M*v3dw * (gamma+1)/12.;
252 m += f1*M*v2dw * (gamma+1)/4.;
261 const libMesh::Point& p,
265 Real V, M, rho, gamma, dwdx, dwdt, dV, dM, drho, dgamma;
274 Mf = (M*M-2)/(M*M-1),
275 dMfdM = 2*M*dM/(M*M-1) - (M*M-2)/pow(M*M-1,2)*2*M*dM,
277 v0 = dwdx + Mf*dwdt/V,
278 v2 = pow(V*dwdx + Mf*dwdt, 2),
282 v2dw = 2.*(V*dwdx + Mf*dwdt)*V,
283 v3dw = v0*v2dw+v0dw*v2,
285 dv0dV = -Mf*dwdt/(V*V)*dV,
286 dv2dV = 2.*(V*dwdx + Mf*dwdt)*dwdx*dV,
288 dv0dM = dMfdM*dwdt/V,
289 dv2dM = 2.*(V*dwdx + Mf*dwdt)*dMfdM*dwdt,
293 v2dwdV = 2.*(2.*V*dV*dwdx + Mf*dV*dwdt),
294 v3dwdV = dv0dV*v2dw+v0*v2dwdV + v0dwdV*v2+v0dw*dv2dV,
298 v2dwdM = 2.*dMfdM*dwdt*V,
299 v3dwdM = dv0dM*v2dw+v0*v2dwdM + v0dwdM*v2+v0dw*dv2dM,
301 f1 = rho/sqrt(M*M-1.),
302 df1drho = drho/sqrt(M*M-1.),
303 df1dM = -.5*rho/pow(M*M-1., 1.5)*2*M*dM;
311 m = f1*(v1dwdV + v1dwdM) + (df1drho + df1dM) * v1dw;
320 (df1drho + df1dM) *M*M*v3dw * (gamma+1)/12.+
321 f1*M* (2*dM*v3dw + M*(v3dwdV + v3dwdM)) * (gamma+1)/12. +
322 f1 * M*M*v3dw/12.*dgamma;
328 (df1drho + df1dM) * M*v2dw * (gamma+1)/4.+
329 f1*(dM*v2dw + M*(v2dwdV + v2dwdM)) * (gamma+1)/4. +
374 Real V, M, rho, gamma, dwdx, dwdt;
384 Mf = (M*M-2)/(M*M-1),
385 f1 = rho/sqrt(M*M-1.),
387 v0 = dwdx + (M*M-2)/(M*M-1)*dwdt/V,
388 v2 = pow(V*dwdx + (M*M-2)/(M*M-1)*dwdt, 2),
392 v2dwt = 2.*(V*dwdx + Mf*dwdt)*Mf,
393 v3dwt = v0dwt*v2+v0*v2dwt;
408 m += f1*M*M*v3dwt * (gamma+1)/12.;
413 m += f1*M*v2dwt * (gamma+1)/4.;
422 const libMesh::Point& p,
426 Real V, M, rho, gamma, dwdx, dwdt, dV, dM, drho, dgamma;
435 Mf = (M*M-2)/(M*M-1),
436 dMfdM = 2*M*dM/(M*M-1) - (M*M-2)/pow(M*M-1,2)*2*M*dM,
438 v0 = dwdx + Mf*dwdt/V,
439 v2 = pow(V*dwdx + Mf*dwdt, 2),
441 dv0dV = -Mf*dwdt/(V*V)*dV,
442 dv2dV = 2.*(V*dwdx + Mf*dwdt)*dwdx*dV,
444 dv0dM = dMfdM*dwdt/V,
445 dv2dM = 2.*(V*dwdx + Mf*dwdt)*dMfdM*dwdt,
449 v2dwt = 2.*(V*dwdx + Mf*dwdt)*Mf,
450 v3dwt = v0dwt*v2+v0*v2dwt,
452 v0dwtdV = -Mf/(V*V)*dV,
454 v2dwtdV = 2.*dV*dwdx *Mf,
455 v3dwtdV = v0dwtdV*v2+v0dwt*dv2dV + dv0dV*v2dwt+v0*v2dwtdV,
459 v2dwtdM = 2.*(V*dMfdM*dwdx + 2*Mf*dMfdM*dwdt),
460 v3dwtdM = v0dwtdM*v2+v0dwt*dv2dM + dv0dM*v2dwt+v0*v2dwtdM,
462 f1 = rho/sqrt(M*M-1.),
463 df1drho = drho/sqrt(M*M-1.),
464 df1dM = -.5*rho/pow(M*M-1., 1.5)*2*M*dM;
472 m = f1*(v1dwtdV + v1dwtdM) + (df1drho + df1dM) * v1dwt;
481 (df1drho + df1dM) *M*M*v3dwt * (gamma+1)/12.+
482 f1*M*(2*dM*v3dwt + M*(v3dwtdV + v3dwtdM)) * (gamma+1)/12. +
483 f1 * M*M*v3dwt/12.*dgamma;
489 (df1drho + df1dM) * M*v2dwt * (gamma+1)/4. +
490 f1*(dM*v2dwt + M*(v2dwtdV + v2dwtdM)) * (gamma+1)/4. +
491 f1*M*v2dwt/4.*dgamma;
535 std::unique_ptr<MAST::FieldFunction<Real> >
550 return std::unique_ptr<MAST::FieldFunction<Real> >(rval);
556 std::unique_ptr<MAST::FieldFunction<Real> >
571 return std::unique_ptr<MAST::FieldFunction<Real> >(rval);
577 std::unique_ptr<MAST::FieldFunction<Real> >
592 return std::unique_ptr<MAST::FieldFunction<Real> >(rval);
const unsigned int _order
const unsigned int _order
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, Real &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
const MAST::FieldFunction< Real > & _gamma
PistonTheoryPressureXdotDerivative(unsigned int order, const MAST::FieldFunction< Real > &V, const MAST::FieldFunction< Real > &M, const MAST::FieldFunction< Real > &rho, const MAST::FieldFunction< Real > &gamma, const MAST::FieldFunction< Real > &dwdx, const MAST::FieldFunction< Real > &dwdt)
const MAST::FieldFunction< Real > & _M_inf
virtual void operator()(const libMesh::Point &p, const Real t, Real &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
virtual void operator()(const libMesh::Point &p, const Real t, Real &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
const MAST::FieldFunction< Real > & _dwdt
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, Real &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
const MAST::FieldFunction< Real > & _M_inf
const MAST::FieldFunction< Real > & _gamma
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, Real &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
std::set< const MAST::FunctionBase * > _functions
set of functions that this function depends on
PistonTheoryBoundaryCondition(unsigned int order, const RealVectorX &vel_vec)
Constructor for the Piston Theory boundary condition object.
unsigned int order() const
virtual ~PistonTheoryPressureXdotDerivative()
const MAST::FieldFunction< Real > & _M_inf
const RealVectorX & vel_vec() const
const MAST::FieldFunction< Real > & _rho_inf
virtual void derivative(const MAST::FunctionBase &f, ValType &v) const
calculates the value of the function derivative and returns it in v.
const MAST::FieldFunction< Real > & _V_inf
const MAST::FieldFunction< Real > & _gamma
const MAST::FieldFunction< Real > & _dwdx
const unsigned int _order
std::unique_ptr< MAST::FieldFunction< Real > > get_dpdx_function(const MAST::FieldFunction< Real > &dwdx, const MAST::FieldFunction< Real > &dwdt) const
virtual ~PistonTheoryPressureXDerivative()
virtual ~PistonTheoryPressure()
virtual ~PistonTheoryBoundaryCondition()
Matrix< Real, Dynamic, 1 > RealVectorX
RealVectorX _vel_vec
Ambient flow velocity vector.
PistonTheoryPressureXDerivative(unsigned int order, const MAST::FieldFunction< Real > &V, const MAST::FieldFunction< Real > &M, const MAST::FieldFunction< Real > &rho, const MAST::FieldFunction< Real > &gamma, const MAST::FieldFunction< Real > &dwdx, const MAST::FieldFunction< Real > &dwdt)
const MAST::FieldFunction< Real > & _dwdt
std::unique_ptr< MAST::FieldFunction< Real > > get_dpdxdot_function(const MAST::FieldFunction< Real > &dwdx, const MAST::FieldFunction< Real > &dwdt) const
std::unique_ptr< MAST::FieldFunction< Real > > get_pressure_function(const MAST::FieldFunction< Real > &dwdx, const MAST::FieldFunction< Real > &dwdt) const
const MAST::FieldFunction< Real > & _rho_inf
const MAST::FieldFunction< Real > & _dwdt
const MAST::FieldFunction< Real > & _rho_inf
const MAST::FieldFunction< Real > & _dwdx
PistonTheoryPressure(unsigned int order, const MAST::FieldFunction< Real > &V, const MAST::FieldFunction< Real > &M, const MAST::FieldFunction< Real > &rho, const MAST::FieldFunction< Real > &gamma, const MAST::FieldFunction< Real > &dwdx, const MAST::FieldFunction< Real > &dwdt)
unsigned int _order
Order of the boundary condition.
virtual void operator()(const libMesh::Point &p, const Real t, Real &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
const MAST::FieldFunction< Real > & _dwdx
const MAST::FieldFunction< Real > & _V_inf
const MAST::FieldFunction< Real > & _V_inf