57 outputVector.push_back (0);
58 conditionNumber = FlowConditions::outputVector.size() - 1;
63 const int& outflowFlag)
66 Epetra_SerialDenseVector fluidQuantities (1);
67 Epetra_SerialDenseVector solidQuantities (2);
71 fluidQuantities (0) = Oper.fluid().area (outflowFlag);
74 M_area0 = fluidQuantities (0);
75 M_outRadius0 = std::sqrt (M_area0 / pi);
78 Oper.displayer().leaderPrint (
" Outflow BC : area0 = ", M_area0 );
79 Oper.displayer().leaderPrint (
" Outflow BC : radius = ", M_outRadius0 );
84 solidQuantities (0) = ( ( Oper.solid().thickness() * Oper.solid().young (1) ) / ( 1 - Oper.solid().poisson (1) * Oper.solid().poisson (1) ) * pi / M_area0 );
86 solidQuantities (1) = Oper.solid().rho();
88 Oper.displayer().leaderPrint (
" Outflow BC : thickness = " , Oper.solid().thickness() );
89 Oper.displayer().leaderPrint (
" Outflow BC : young = " , Oper.solid().young (1) );
90 Oper.displayer().leaderPrint (
" Outflow BC : poisson = " , Oper.solid().poisson (1) );
98 M_beta = solidQuantities (0);
99 M_rhos = solidQuantities (1);
100 Oper.displayer().leaderPrint (
" Outflow BC : beta = " , M_beta );
101 Oper.displayer().leaderPrint (
" Outflow BC : rho = " , M_rhos );
107 const int& outflowFlag)
110 Epetra_SerialDenseVector fluidQuantities (2);
112 FSIOperator* Oper (oper_.FSIOper().get() );
114 if (Oper->isFluid() )
116 fluidQuantities (0) = Oper->fluid().flux (outflowFlag, oper_.displacement() );
117 fluidQuantities (1) = Oper->fluid().area (outflowFlag);
120 Oper->worldComm()->Broadcast ( fluidQuantities.Values(), fluidQuantities.Length(),
121 Oper->getFluidLeaderId() );
127 qn = fluidQuantities (0);
128 area = fluidQuantities (1);
134 M_outP = std::pow ( (M_rhos / (2.*std::sqrt (2.) ) * qn / area + std::sqrt (M_beta * std::sqrt (M_area0) ) ), 2.)
135 - M_beta * std::sqrt (M_area0);
136 FlowConditions::outputVector[conditionNumber] = M_outP;
138 Oper->displayer().leaderPrint (
" Flow rate = " , qn );
139 Oper->displayer().leaderPrint (
" outflow pressure = " , M_outP );
151 area = qn * std::sqrt (M_rhos) / ( (2.*std::sqrt (2) ) *
152 std::sqrt ( M_outP + M_beta * std::sqrt (M_area0) ) - std::sqrt ( M_beta * std::sqrt (M_area0) ) );
155 if (area < 1e-8 * M_area0)
160 M_outDeltaRadius = std::sqrt ( area / pi ) - M_outRadius0;
162 Oper->displayer().leaderPrint (
" outflow A = " , area );
163 Oper->displayer().leaderPrint (
" outflow dr = " , M_outDeltaRadius );
164 Oper->displayer().leaderPrint (
" Flow rate = " , qn );
165 Oper->displayer().leaderPrint (
" outflow pressure = " , M_outP );
186 return -FlowConditions::outputVector[0];
191 return -FlowConditions::outputVector[1];
196 return -FlowConditions::outputVector[2];
200 return -FlowConditions::outputVector[4];
205 return -FlowConditions::outputVector[5];
210 return -FlowConditions::outputVector[6];
221 Real r ( std::sqrt (x * x + y * y) );
230 ERROR_MSG (
"This entry is not allowed: flowConditions.hpp");
242 Real r ( std::sqrt (x * x + y * y) );
251 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 outPressure1(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)
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)
void renewParameters(FSISolver &oper, const int &outflowFlag)
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
void initParameters(FSIOperator &oper, const int &outflowFlag)
Real inDeltaRadius(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i)