40 #define PI 3.141592653589793
59 outputVector.push_back (0);
60 conditionNumber = FlowConditions::outputVector.size() - 1;
65 const int& outflowFlag)
69 Epetra_SerialDenseVector fluidQuantities (1);
70 Epetra_SerialDenseVector solidQuantities (2);
76 fluidQuantities (0) = Oper.fluid().area (outflowFlag);
80 M_area0 = fluidQuantities (0);
81 M_outRadius0 = std::sqrt (M_area0 / pi);
84 Oper.displayer().leaderPrint (
" Outflow BC : area0 = ", M_area0 );
85 Oper.displayer().leaderPrint (
" Outflow BC : radius = ", M_outRadius0 );
88 solidQuantities (0) = ( ( Oper.solid().thickness() * Oper.solid().young ( flag ) ) / ( 1 - Oper.solid().poisson ( flag ) * Oper.solid().poisson ( flag ) ) * pi / M_area0 );
90 solidQuantities (1) = Oper.solid().rho( );
92 Oper.displayer().leaderPrint (
" Outflow BC : thickness = " , Oper.solid().thickness() );
93 Oper.displayer().leaderPrint (
" Outflow BC : young = " , Oper.solid().young ( flag ) );
94 Oper.displayer().leaderPrint (
" Outflow BC : poisson = " , Oper.solid().poisson ( flag ) );
102 M_beta = solidQuantities (0);
103 M_rhos = solidQuantities (1);
104 Oper.displayer().leaderPrint (
" Outflow BC : beta = " , M_beta );
105 Oper.displayer().leaderPrint (
" Outflow BC : rho = " , M_rhos );
111 const int& outflowFlag,
112 const FSIOperator::vector_Type& fluidSolution)
115 Epetra_SerialDenseVector fluidQuantities (2);
117 FSIOperator* Oper (oper_.FSIOper().get() );
119 if (Oper->isFluid() )
121 fluidQuantities (0) = Oper->fluid().flux (outflowFlag, fluidSolution );
122 fluidQuantities (1) = Oper->fluid().area (outflowFlag);
125 Oper->worldComm()->Broadcast ( fluidQuantities.Values(), fluidQuantities.Length(),
126 Oper->getFluidLeaderId() );
133 qn = fluidQuantities (0);
134 area = fluidQuantities (1);
148 Real beta = ( std::sqrt (
PI) * Oper->solid().thickness() * Oper->solid().young ( flag ) ) / (1 - Oper->solid().poisson ( flag ) * Oper->solid().poisson ( flag ) );
149 Real R = ( std::sqrt (Oper->solid().rho( ) * beta ) ) / ( std::sqrt (2.0) * std::pow (area0, exp) );
156 FlowConditions::outputVector[conditionNumber] = M_outP;
158 Oper->displayer().leaderPrint (
" Flow rate = " , qn );
159 Oper->displayer().leaderPrint (
" outflow pressure = " , M_outP );
171 area = qn * std::sqrt (M_rhos) / ( (2.*std::sqrt (2) ) *
172 std::sqrt ( M_outP + M_beta * std::sqrt (M_area0) ) - std::sqrt ( M_beta * std::sqrt (M_area0) ) );
175 if (area < 1e-8 * M_area0)
180 M_outDeltaRadius = std::sqrt ( area / pi ) - M_outRadius0;
182 Oper->displayer().leaderPrint (
" outflow A = " , area );
183 Oper->displayer().leaderPrint (
" outflow dr = " , M_outDeltaRadius );
184 Oper->displayer().leaderPrint (
" Flow rate = " , qn );
185 Oper->displayer().leaderPrint (
" outflow pressure = " , M_outP );
206 return -FlowConditions::outputVector[0];
211 return -FlowConditions::outputVector[1];
216 return -FlowConditions::outputVector[2];
220 return -FlowConditions::outputVector[3];
225 return -FlowConditions::outputVector[4];
231 return -FlowConditions::outputVector[5];
236 return -FlowConditions::outputVector[6];
247 Real r ( std::sqrt (x * x + y * y) );
256 ERROR_MSG (
"This entry is not allowed: flowConditions.hpp");
268 Real r ( std::sqrt (x * x + y * y) );
277 ERROR_MSG (
"This entry is not allowed: flowConditions.hpp");
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
static Real outPressure3(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
Real outDeltaRadius(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
static Real outPressure6(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
static Real outPressure4(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
static Real outPressure1(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
void renewParameters(FSISolver &oper, const int &outflowFlag, const FSIOperator::vector_Type &fluidSolution)
static Real outPressure0(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
static Real outPressure5(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
Real fZero(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
double Real
Generic real data.
static Real outPressure2(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
static std::vector< Real > outputVector
uint32_type UInt
generic unsigned integer (used mainly for addressing)
void initParameters(FSIOperator &oper, const int &outflowFlag)
Real inDeltaRadius(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)