42 #include <lifev/one_d_fsi/solver/OneDFSISourceNonLinear.hpp> 58 Real beta1plus1 ( M_physicsPtr->data()->beta1 ( iNode ) + 1 );
59 Real AoverA0 ( A / M_physicsPtr->data()->area0 ( iNode ) );
60 Real C0 ( 1 / ( M_physicsPtr->data()->densityRho() * beta1plus1 ) );
61 Real C ( 1 / ( M_physicsPtr->data()->densityRho() * beta1plus1 ) * OneDFSI::pow15 ( AoverA0, beta1plus1 ) );
63 return ( M_physicsPtr->data()->friction() * Q / A
64 + Q * Q / A * M_physicsPtr->data()->dAlphadz ( iNode )
65 + C * ( M_physicsPtr->data()->area0 ( iNode ) * M_physicsPtr->data()->dBeta0dz ( iNode )
66 - M_physicsPtr->data()->beta0 ( iNode ) * M_physicsPtr->data()->beta1 ( iNode ) * M_physicsPtr->data()->dArea0dz ( iNode )
67 + M_physicsPtr->data()->area0 ( iNode ) * M_physicsPtr->data()->beta0 ( iNode )
68 * ( std::log ( AoverA0 ) - 1. / beta1plus1 ) * M_physicsPtr->data()->dBeta1dz ( iNode )
70 - C0 * ( M_physicsPtr->data()->area0 ( iNode ) * M_physicsPtr->data()->dBeta0dz ( iNode )
71 - M_physicsPtr->data()->beta0 ( iNode ) * M_physicsPtr->data()->beta1 ( iNode ) * M_physicsPtr->data()->dArea0dz ( iNode )
72 - M_physicsPtr->data()->area0 ( iNode ) * M_physicsPtr->data()->beta0 ( iNode ) / beta1plus1 * M_physicsPtr->data()->dBeta1dz ( iNode )
74 + ( M_physicsPtr->data()->area0 ( iNode ) - A ) / M_physicsPtr->data()->densityRho() * M_physicsPtr->data()->dBeta0dz ( iNode )
75 ) * M_physicsPtr->data()->robertsonCorrection();
78 ERROR_MSG (
"The flux function has only 2 components.");
88 if ( column == 0 || column == 1 )
97 Real AoverA0 ( A / M_physicsPtr->data()->area0 ( iNode ) );
98 Real C ( OneDFSI::pow05 ( AoverA0, M_physicsPtr->data()->beta1 ( iNode ) ) / M_physicsPtr->data()->densityRho() );
100 return ( -M_physicsPtr->data()->friction() * Q / A / A
101 - Q * Q / ( A * A ) * M_physicsPtr->data()->dAlphadz ( iNode )
102 + C * ( M_physicsPtr->data()->dBeta0dz ( iNode )
103 - M_physicsPtr->data()->beta0 ( iNode ) * M_physicsPtr->data()->beta1 ( iNode )
104 / M_physicsPtr->data()->area0 ( iNode ) * M_physicsPtr->data()->dArea0dz ( iNode )
105 + M_physicsPtr->data()->beta0 ( iNode ) * std::log ( AoverA0 ) * M_physicsPtr->data()->dBeta1dz ( iNode )
107 - 1. / M_physicsPtr->data()->densityRho() * M_physicsPtr->data()->dBeta0dz ( iNode )
108 ) * M_physicsPtr->data()->robertsonCorrection();
112 return M_physicsPtr->data()->robertsonCorrection() * ( M_physicsPtr->data()->friction() / A +
113 2 * Q / A * M_physicsPtr->data()->dAlphadz ( iNode ) );
117 ERROR_MSG (
"Source's differential function has only 4 components.");
124 const ID& row,
const container2D_Type &bcNodes,
const Real& cfl )
const 133 Real area0 = ( 1 - cfl ) * M_physicsPtr->data()->area0 (bcNodes[0]) + cfl * M_physicsPtr->data()->area0 (bcNodes[1]);
134 Real beta0 = ( 1 - cfl ) * M_physicsPtr->data()->beta0 (bcNodes[0]) + cfl * M_physicsPtr->data()->beta0 (bcNodes[1]);
135 Real beta1 = ( 1 - cfl ) * M_physicsPtr->data()->beta1 (bcNodes[0]) + cfl * M_physicsPtr->data()->beta1 (bcNodes[1]);
136 Real dArea0dz = ( 1 - cfl ) * M_physicsPtr->data()->dArea0dz (bcNodes[0]) + cfl * M_physicsPtr->data()->dArea0dz (bcNodes[1]);
137 Real dBeta0dz = ( 1 - cfl ) * M_physicsPtr->data()->dBeta0dz (bcNodes[0]) + cfl * M_physicsPtr->data()->dBeta0dz (bcNodes[1]);
138 Real dBeta1dz = ( 1 - cfl ) * M_physicsPtr->data()->dBeta1dz (bcNodes[0]) + cfl * M_physicsPtr->data()->dBeta1dz (bcNodes[1]);
139 Real dAlphadz = ( 1 - cfl ) * M_physicsPtr->data()->dAlphadz (bcNodes[0]) + cfl * M_physicsPtr->data()->dAlphadz (bcNodes[1]);
141 Real AoverA0 ( A / area0 );
142 Real C ( A / M_physicsPtr->data()->densityRho() * OneDFSI::pow05 ( AoverA0, beta1 ) );
144 return ( M_physicsPtr->data()->friction() * Q / A
145 + Q * Q / A * dAlphadz
147 - beta0 * beta1 / area0 * dArea0dz
148 + beta0 * std::log ( AoverA0 ) * dBeta1dz
150 - A / M_physicsPtr->data()->densityRho() * dBeta0dz
151 ) * M_physicsPtr->data()->robertsonCorrection();
154 ERROR_MSG (
"The QLS function has only 2 components.");
void updateInverseJacobian(const UInt &iQuadPt)
Real source(const Real &A, const Real &Q, const ID &row, const UInt &iNode) const
Evaluate the source term.
OneDFSISourceNonLinear - Class for the non-linear source function B of the 1D hyperbolic problem...
double Real
Generic real data.
Real dSdU(const Real &A, const Real &Q, const ID &row, const ID &column, const UInt &iNode) const
Evaluate the derivative of the source term.
Real interpolatedNonConservativeSource(const Real &A, const Real &Q, const ID &row, const container2D_Type &bcNodes, const Real &cfl) const
Evaluate the non-conservative form of the source term at the foot of the outgoing characteristic...
uint32_type UInt
generic unsigned integer (used mainly for addressing)