43 #include <lifev/one_d_fsi/solver/OneDFSIPhysicsNonLinear.hpp> 53 Real celerity ( celerity0 ( iNode ) * std::sqrt ( OneDFSI::pow05 ( A / M_dataPtr->area0 ( iNode ), M_dataPtr->beta1 ( iNode ) ) ) );
55 Real add ( std::sqrt ( M_dataPtr->robertsonCorrection() ) * ( celerity - celerity0 ( iNode ) ) * 2 / M_dataPtr->beta1 ( iNode ) );
66 Real rhooverbeta0beta1 ( M_dataPtr->densityRho() / ( M_dataPtr->beta0 ( iNode ) * M_dataPtr->beta1 ( iNode ) ) );
68 Real beta1over4SQRTchi ( M_dataPtr->beta1 ( iNode ) / ( std::sqrt (M_dataPtr->robertsonCorrection() ) * 4 ) );
70 A = M_dataPtr->area0 ( iNode )
71 * OneDFSI::pow20 ( rhooverbeta0beta1, 1 / M_dataPtr->beta1 ( iNode ) )
72 * OneDFSI::pow40 ( beta1over4SQRTchi * (W1 - W2) + celerity0 ( iNode ), 2 / M_dataPtr->beta1 ( iNode ) );
74 Q = A * ( W1 + W2 ) / 2;
80 Real rhooverbeta0beta1 ( M_dataPtr->densityRho() / ( M_dataPtr->beta0 ( iNode ) * M_dataPtr->beta1 ( iNode ) ) );
82 Real beta1over4SQRTchi ( M_dataPtr->beta1 ( iNode ) / ( std::sqrt (M_dataPtr->robertsonCorrection() ) * 4 ) );
84 return M_dataPtr->beta0 ( iNode ) * ( rhooverbeta0beta1 * ( beta1over4SQRTchi * (W1 - W2) + celerity0 ( iNode ) ) *
85 ( beta1over4SQRTchi * (W1 - W2) + celerity0 ( iNode ) ) - 1 );
91 Real SQRTbeta0beta1overrho ( M_dataPtr->beta0 ( iNode ) * M_dataPtr->beta1 ( iNode ) / M_dataPtr->densityRho() );
92 SQRTbeta0beta1overrho = std::sqrt ( SQRTbeta0beta1overrho );
94 Real SQRTchi4overbeta1 ( std::sqrt (M_dataPtr->robertsonCorrection() ) * 4 / M_dataPtr->beta1 ( iNode ) );
96 Real add ( SQRTchi4overbeta1 * SQRTbeta0beta1overrho
97 * ( std::sqrt ( P / M_dataPtr->beta0 ( iNode ) + 1 ) - 1 ) );
99 #ifdef HAVE_LIFEV_DEBUG 100 debugStream (6320) <<
"[OneDFSIModel_Physics_NonLinear::W_fromP] " 101 <<
"SQRTchi4overbeta1 = " << SQRTchi4overbeta1
102 <<
", beta0beta1overrho = " << SQRTbeta0beta1overrho
103 <<
", pow( ( P / M_dataPtr->beta0( iNode ) + 1 ), 0.5 ) = " << std::sqrt ( ( P / M_dataPtr->beta0 ( iNode ) + 1 ) ) <<
"\n";
104 debugStream (6320) <<
"[OneDFSIModel_Physics_NonLinear::W_fromP] add term = " << add <<
"\n";
116 ERROR_MSG (
"You can only find W1 or W2 as function of P");
123 Real K0 ( M_dataPtr->beta1 ( iNode ) / ( std::sqrt (M_dataPtr->robertsonCorrection() ) * 4 ) );
125 Real K1 ( (M_dataPtr->area0 ( iNode ) / 2) );
126 K1 *= OneDFSI::pow20 ( M_dataPtr->densityRho() / (M_dataPtr->beta0 ( iNode ) * M_dataPtr->beta1 ( iNode ) ), 1 / M_dataPtr->beta1 ( iNode ) );
127 K1 *= OneDFSI::pow40 ( K0, 2 / M_dataPtr->beta1 ( iNode ) );
129 Real f_k, df_k, tau_k (0);
133 f_k = OneDFSI::pow40 ( W - W_tn + celerity0 ( iNode ) / K0, 2 / M_dataPtr->beta1 ( iNode ) );
134 tau_k = OneDFSI::pow40 ( W - W_tn + celerity0 ( iNode ) / K0, 2 / M_dataPtr->beta1 ( iNode ) );
135 df_k = (-2 / M_dataPtr->beta1 ( iNode ) ) * OneDFSI::pow30 ( W - W_tn + celerity0 ( iNode ) / K0, 2 / M_dataPtr->beta1 ( iNode ) - 1 );
139 f_k = OneDFSI::pow40 ( W_tn - W + celerity0 ( iNode ) / K0, 2 / M_dataPtr->beta1 ( iNode ) );
140 tau_k = OneDFSI::pow40 ( W_tn - W + celerity0 ( iNode ) / K0, 2 / M_dataPtr->beta1 ( iNode ) );
141 df_k = (-2 / M_dataPtr->beta1 ( iNode ) ) * OneDFSI::pow30 ( W_tn - W + celerity0 ( iNode ) / K0, 2 / M_dataPtr->beta1 ( iNode ) - 1 );
148 #ifdef HAVE_LIFEV_DEBUG 149 debugStream (6320) <<
"[OneDFSIModel_Physics_NonLinear::W_fromQ] " 152 <<
", tau_k = " << tau_k <<
"\n";
155 Real w_kp1 = Q / (K1 * tau_k) - W;
166 Real rhoover2SQRTchi ( M_dataPtr->densityRho() / ( std::sqrt (M_dataPtr->robertsonCorrection() ) * 2 ) );
168 Real beta1over4SQRTchi ( M_dataPtr->beta1 ( iNode ) / ( std::sqrt (M_dataPtr->robertsonCorrection() ) * 4 ) );
170 Real result ( beta1over4SQRTchi * (W1 - W2) );
172 result *= rhoover2SQRTchi;
184 ERROR_MSG (
"P(W1,W2)'s differential function has only 2 components.");
Real fromPToW(const Real &P, const Real &W, const ID &iW, const UInt &iNode) const
Compute or from .
Real fromQToW(const Real &Q, const Real &W_tn, const Real &W, const ID &iW, const UInt &iNode) const
Compute or from .
Real celerity0(const UInt &iNode) const
Compute the reference celerity.
void updateInverseJacobian(const UInt &iQuadPt)
Real fromWToP(const Real &W1, const Real &W2, const UInt &iNode) const
Compute from .
void fromWToU(Real &U1, Real &U2, const Real &W1, const Real &W2, const UInt &iNode) const
Compute from .
double Real
Generic real data.
OneDFSIPhysicsNonLinear - Class providing non linear physical operations for the 1D model data...
Real dPdW(const Real &W1, const Real &W2, const ID &iW, const UInt &iNode) const
Compute the derivative of pressure with respect to .
uint32_type UInt
generic unsigned integer (used mainly for addressing)
void fromUToW(Real &W1, Real &W2, const Real &U1, const Real &U2, const UInt &iNode) const
Compute from .