41 #include <lifev/core/LifeV.hpp> 43 #include <lifev/navier_stokes/function/RossEthierSteinmanInc.hpp> 49 Real RossEthierSteinmanUnsteadyInc::uexact (
const Real& t,
55 Real e = std::exp (2.* (S_a * S_a + S_d * S_d + S_a * S_d) * S_nu * t);
59 return e * ( S_d * std::exp (S_a * (x - z) + S_d * (y - z) ) - S_a * std::exp (S_a * (z - y) + S_d * (x - y) ) );
61 return e * ( S_d * std::exp (S_a * (y - x) + S_d * (z - x) ) - S_a * std::exp (S_a * (x - z) + S_d * (y - z) ) );
63 return e * ( S_d * std::exp (S_a * (z - y) + S_d * (x - y) ) - S_a * std::exp (S_a * (y - x) + S_d * (z - x) ) );
70 Real RossEthierSteinmanUnsteadyInc::uderexact (
const Real& t,
79 return 2.* (S_a * S_a + S_d * S_d + S_a * S_d) * S_nu * xexact (t, x, y, z, i);
87 Real RossEthierSteinmanUnsteadyInc::pexact (
const Real& t,
93 return S_rho * (S_a * S_a + S_d * S_d + S_a * S_d) * std::exp (4.* (S_a * S_a + S_d * S_d + S_a * S_d) * S_nu * t) *
94 (std::exp (S_a * (x - y) + S_d * (x - z) ) + std::exp (S_a * (y - z) + S_d * (y - x) ) + std::exp (S_a * (z - x) + S_d * (z - y) ) );
97 Real RossEthierSteinmanUnsteadyInc::grad_u (
const UInt& icoor,
const Real& t,
const Real& x,
const Real& y,
const Real& z,
const ID& i )
99 Real e = std::exp (2.* (S_a * S_a + S_d * S_d + S_a * S_d) * S_nu * t);
106 return S_a * S_d * e * ( std::exp (S_a * (x - z) + S_d * (y - z) ) - std::exp (S_a * (z - y) + S_d * (x - y) ) );
108 return e * ( - (S_a + S_d) * S_d * std::exp (S_a * (y - x) + S_d * (z - x) ) - S_a * S_a * std::exp (S_a * (x - z) + S_d * (y - z) ) );
110 return e * ( S_d * S_d * std::exp (S_a * (z - y) + S_d * (x - y) ) + S_a * (S_a + S_d) * std::exp (S_a * (y - x) + S_d * (z - x) ) );
118 return e * ( S_d * S_d * std::exp (S_a * (x - z) + S_d * (y - z) ) + S_a * (S_a + S_d) * std::exp (S_a * (z - y) + S_d * (x - y) ) );
120 return e * ( S_a * S_d * std::exp (S_a * (y - x) + S_d * (z - x) ) - S_a * S_d * std::exp (S_a * (x - z) + S_d * (y - z) ) );
122 return e * ( -S_d * (S_a + S_d) * std::exp (S_a * (z - y) + S_d * (x - y) ) - S_a * S_a * std::exp (S_a * (y - x) + S_d * (z - x) ) );
130 return e * ( -S_d * (S_a + S_d) * std::exp (S_a * (x - z) + S_d * (y - z) ) - S_a * S_a * std::exp (S_a * (z - y) + S_d * (x - y) ) );
132 return e * ( S_d * S_d * std::exp (S_a * (y - x) + S_d * (z - x) ) + S_a * (S_a + S_d) * std::exp (S_a * (x - z) + S_d * (y - z) ) );
134 return e * ( S_a * S_d * std::exp (S_a * (z - y) + S_d * (x - y) ) - S_a * S_d * std::exp (S_a * (y - x) + S_d * (z - x) ) );
144 Real RossEthierSteinmanUnsteadyInc::f (
const Real& ,
153 Real RossEthierSteinmanUnsteadyInc::xexact (
const Real& t,
164 return uexact (t, x, y, z, i);
166 return pexact (t, x, y, z, 1);
177 const Real& z,
const ID& i )
179 return xexact (t, x, y, z, i);
185 Real RossEthierSteinmanUnsteadyInc::fNeumann (
const Real& t,
191 Real n[3] = {0., 0., 0.};
219 std::cout <<
"strange point: x=" << x <<
" y=" << y <<
" z=" << z
223 for (
UInt k = 0; k < 3; k++)
225 out += S_mu * grad_u (k, t, x, y, z, i) * n[k];
229 for (
UInt k = 0; k < 3; k++)
231 out += S_mu * grad_u (i, t, x, y, z, k) * n[k];
234 out -= pexact (t, x, y, z, i) * n[i];
239 void RossEthierSteinmanUnsteadyInc::setParamsFromGetPot (
const GetPot& dataFile )
241 S_a = dataFile
( "fluid/problem/a", 1.
) ;
242 S_d = dataFile
( "fluid/problem/d", 1.
) ;
243 S_mu = dataFile
( "fluid/physics/viscosity", 1.
);
244 S_rho = dataFile
( "fluid/physics/density", 1.
);
246 S_flagStrain = dataFile
( "fluid/physics/flag_strain", 0
);
248 void RossEthierSteinmanUnsteadyInc::setA (
const Real& aValue)
252 void RossEthierSteinmanUnsteadyInc::setD (
const Real& dValue)
256 void RossEthierSteinmanUnsteadyInc::setViscosity (
const Real& mu)
261 void RossEthierSteinmanUnsteadyInc::setDensity (
const Real& rho)
266 void RossEthierSteinmanUnsteadyInc::setFlagStrain (
const Int& flagValue)
268 S_flagStrain = flagValue;
271 Real RossEthierSteinmanUnsteadyInc::S_a;
272 Real RossEthierSteinmanUnsteadyInc::S_d;
273 Real RossEthierSteinmanUnsteadyInc::S_mu;
274 Real RossEthierSteinmanUnsteadyInc::S_rho;
275 Real RossEthierSteinmanUnsteadyInc::S_nu;
276 Int RossEthierSteinmanUnsteadyInc::S_flagStrain;
double operator()(const char *VarName, const double &Default) const
int32_type Int
Generic integer data.
void updateInverseJacobian(const UInt &iQuadPt)
double Real
Generic real data.
int operator()(const char *VarName, int Default) const
uint32_type UInt
generic unsigned integer (used mainly for addressing)