38 #include "lifev/core/LifeV.hpp" 40 #include "lifev/core/fem/BCHandler.hpp" 41 #include "lifev/core/fem/BCFunction.hpp" 43 #include "lifev/fsi/solver/FSIExactJacobian.hpp" 44 #include "lifev/fsi/solver/FSIFixedPoint.hpp" 49 #define FLUIDINTERFACE 100
50 #define SOLIDINTERFACE 100
51 #define OUTERWALL 1000
62 typedef FSIOperator::fluid_Type fluid;
63 typedef FSIOperator::solid_Type solid;
65 FSIOperator::fluidBchandlerPtr_Type BCh_harmonicExtension (FSIOperator& _oper)
73 if (! _oper.isFluid() )
75 return FSIOperator::fluidBchandlerPtr_Type();
81 debugStream ( 10000
) <<
"Boundary condition for the harmonic extension\n";
83 BCFunctionBase bcf (fZero);
85 FSISolver::fluidBchandlerPtr_Type BCh_he (
new FSIOperator::fluidBchandler_Type );
89 BCh_he->addBC (
"Edges",
INOUTEDGE, Essential, Full, bcf, 3);
90 BCh_he->addBC (
"Edges",
INEDGE, Essential, Full, bcf, 3);
91 BCh_he->addBC (
"Base",
INLET, Essential, Full, bcf, 3);
97 if (_oper.data().method() ==
"steklovPoincare")
105 else if (_oper.data().method() ==
"exactJacobian")
109 EJOper->setStructureDispToHarmonicExtension (_oper.lambdaFluidRepeated() );
111 *EJOper->bcvStructureDispToHarmonicExtension(), 3);
113 else if (_oper.data().method() ==
"fixedPoint")
118 FPOper->setStructureDispToHarmonicExtension (_oper.lambdaFluidRepeated() );
120 *FPOper->bcvStructureDispToHarmonicExtension(), 3);
129 FSIOperator::fluidBchandlerPtr_Type
BCh_fluid (FSIOperator& _oper)
132 debugStream ( 10000
) <<
"Boundary condition for the fluid\n";
134 if (! _oper.isFluid() )
136 return FSIOperator::fluidBchandlerPtr_Type();
139 FSIOperator::fluidBchandlerPtr_Type BCh_fluid (
new FSIOperator::fluidBchandler_Type );
141 BCFunctionBase bcf (fZero);
142 BCFunctionBase in_flow (u2);
144 BCFunctionBase out_flow (fZero);
148 BCh_fluid->addBC (
"InFlow" , 2, Flux, Normal, in_flow, 3);
150 BCh_fluid->addBC (
"InFlow" , 2, Natural, Full, in_flow, 3);
153 BCh_fluid->addBC (
"OutFlow", 3, Natural, Full, out_flow, 3);
161 _oper.setStructureToFluid (_oper.veloFluidMesh() );
164 if (_oper.data().algorithm() ==
"RobinNeumann")
169 _oper.setSolidLoadToStructure ( _oper.minusSigmaFluidRepeated() );
170 _oper.setStructureToFluidParameters();
173 *_oper.bcvStructureToFluid(), 3);
175 *_oper.bcvSolidLoadToStructure(), 3);
180 *_oper.bcvStructureToFluid(), 3);
189 if (! _oper.isFluid() )
191 return FSIOperator::fluidBchandlerPtr_Type();
195 debugStream ( 10000
) <<
"Boundary condition for the inverse fluid\n";
196 FSIOperator::fluidBchandlerPtr_Type BCh_fluidInv (
new FSIOperator::fluidBchandler_Type );
198 BCFunctionBase bcf (fZero);
199 BCFunctionBase in_flow (u2);
201 BCh_fluidInv->addBC (
"InFlow", 2, Natural, Full, in_flow, 3);
202 BCh_fluidInv->addBC (
"EdgesIn", 20, EssentialVertices, Full, bcf, 3);
212 if (! _oper.isFluid() )
214 return FSIOperator::fluidBchandlerPtr_Type();
218 debugStream ( 10000
) <<
"Boundary condition for the linearized fluid\n";
219 FSIOperator::fluidBchandlerPtr_Type BCh_fluidLin (
new FSIOperator::fluidBchandler_Type );
221 BCFunctionBase bcf (fZero);
222 BCFunctionBase in_flow (u2);
225 BCh_fluidLin->addBC (
"InFlow", 2, Flux, Normal, bcf, 3);
230 BCh_fluidLin->addBC (
"outFlow", 3, Natural, Full, bcf, 3);
236 if (_oper.data().method() ==
"steklovPoincare")
243 if (_oper.data().method() ==
"exactJacobian")
246 EJOper->setDerHarmonicExtensionVelToFluid (_oper.derVeloFluidMesh() );
247 BCh_fluidLin->addBC (
"Interface",
FLUIDINTERFACE, Essential , Full,
248 *_oper.bcvDerHarmonicExtensionVelToFluid(), 3);
256 FSIOperator::solidBchandlerPtr_Type
BCh_solid (FSIOperator& _oper)
259 if (! _oper.isSolid() )
261 return FSIOperator::solidBchandlerPtr_Type();
265 debugStream ( 10000
) <<
"Boundary condition for the solid\n";
266 FSIOperator::solidBchandlerPtr_Type BCh_solid (
new FSIOperator::solidBchandler_Type );
268 BCFunctionBase bcf (fZero);
271 BCh_solid->addBC (
"Top", 3, Essential, Full, bcf, 3);
272 BCh_solid->addBC (
"Base", 2, Essential, Full, bcf, 3);
275 std::vector<ID> zComp (1);
279 if (_oper.data().method() ==
"steklovPoincare")
287 else if (_oper.data().method() ==
"exactJacobian")
290 EJOper->setFluidLoadToStructure (_oper.sigmaSolidRepeated() );
293 *EJOper->bcvFluidLoadToStructure(), 3);
295 else if (_oper.data().method() ==
"fixedPoint")
299 FPOper->setFluidLoadToStructure (_oper.sigmaSolidRepeated() );
302 *FPOper->bcvFluidLoadToStructure(), 3);
311 if (! _oper.isSolid() )
313 return FSIOperator::solidBchandlerPtr_Type();
317 debugStream ( 10000
) <<
"Boundary condition for the linear solid\n";
318 FSIOperator::solidBchandlerPtr_Type BCh_solidLin (
new FSIOperator::solidBchandler_Type );
320 BCFunctionBase bcf (fZero);
322 BCh_solidLin->addBC (
"Top", 3, Essential, Full, bcf, 3);
323 BCh_solidLin->addBC (
"Base", 2, Essential, Full, bcf, 3);
326 std::vector<ID> zComp (1);
329 if (_oper.data().method() ==
"steklovPoincare")
336 else if (_oper.data().method() ==
"exactJacobian")
339 EJOper->setDerFluidLoadToStructure (_oper.sigmaSolidRepeated() );
341 *EJOper->bcvDerFluidLoadToStructure(), 3);
350 if (! _oper.isSolid() )
352 return FSIOperator::solidBchandlerPtr_Type();
356 debugStream ( 10000
) <<
"Boundary condition for the inverse linear solid\n";
357 FSIOperator::solidBchandlerPtr_Type BCh_solidLinInv (
new FSIOperator::solidBchandler_Type );
359 BCFunctionBase bcf (fZero);
361 BCh_solidLinInv->addBC (
"Base", 2, Essential, Full, bcf, 3);
362 BCh_solidLinInv->addBC (
"EdgesIn", 20, EssentialVertices, Full, bcf, 3);
380 return BCh_solidLinInv;
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
FSIOperator::fluidBchandlerPtr_Type BCh_fluidLin(FSIOperator &_oper)
FSIOperator::solidBchandlerPtr_Type BCh_solid(FSIOperator &_oper)
FSIOperator::solidBchandlerPtr_Type BCh_solidLin(FSIOperator &_oper)
FSIOperator::fluidBchandlerPtr_Type BCh_fluid(FSIOperator &_oper)
FSIModelExactJacobian - Implementation of an FSI (Operator) with Newton algorithm.
NdebugStream noDebugStream(int=0, NdebugStream::stprintf=&printf)
FSIFixedPont - Implementation of an FSI with fixed point iterations.
FSIOperator::solidBchandlerPtr_Type BCh_solidInvLin(FSIOperator &_oper)
FSIOperator::fluidBchandlerPtr_Type BCh_fluidInv(FSIOperator &_oper)