Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MoReFEM
CoreLibrary
MoReFEM
Commits
c8825b39
Commit
c8825b39
authored
Nov 10, 2016
by
GILLES Sebastien
Browse files
#1049 Fix FSI model.
parent
b9638375
Changes
7
Hide whitespace changes
Inline
Side-by-side
Data/Lua/demo_input_fsi_ei_two_meshes.lua
View file @
c8825b39
...
...
@@ -679,6 +679,40 @@ Domain15 = {
}
Domain16
=
{
-- Index of the geometric mesh upon which the domain is defined (as defined in the present file). Might be
-- left empty if domain not limited to one mesh; at most one value is exxpected here.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_index
=
{
1
},
-- List of dimensions encompassed by the domain. Might be left empty if no restriction at all upon
-- dimensions.
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: ops_in(v, {0, 1, 2, 3})
dimension_list
=
{
},
-- List of mesh labels encompassed by the domain. Might be left empty if no restriction at all upon mesh
-- labels. This parameter does not make sense if no mesh is defined for the domain.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_label_list
=
{
},
-- List of geometric element types considered in the domain. Might be left empty if no restriction upon
-- these. No constraint is applied at Ops level, as some geometric element types could be added after
-- generation of current input parameter file. Current list is below; if an incorrect value is put there it
-- will be detected a bit later when the domain object is built.
-- The known types when this file was generated are:
-- . Point1
-- . Segment2, Segment3
-- . Triangle3, Triangle6
-- . Quadrangle4, Quadrangle8, Quadrangle9
-- . Tetrahedron4, Tetrahedron10
-- . Hexahedron8, Hexahedron20, Hexahedron27.
-- Expected format: {"VALUE1", "VALUE2", ...}
geometric_element_type_list
=
{
}
}
-- Domain20 - Solid
Domain20
=
{
-- Index of the geometric mesh upon which the domain is defined (as defined in the present file). Might be
...
...
@@ -785,7 +819,37 @@ Domain21 = {
Domain23
=
{
-- Index of the geometric mesh upon which the domain is defined (as defined in the present file). Might be
-- left empty if domain not limited to one mesh; at most one value is exxpected here.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_index
=
{
2
},
-- List of dimensions encompassed by the domain. Might be left empty if no restriction at all upon
-- dimensions.
-- Expected format: {VALUE1, VALUE2, ...}
-- Constraint: ops_in(v, {0, 1, 2, 3})
dimension_list
=
{
},
-- List of mesh labels encompassed by the domain. Might be left empty if no restriction at all upon mesh
-- labels. This parameter does not make sense if no mesh is defined for the domain.
-- Expected format: {VALUE1, VALUE2, ...}
mesh_label_list
=
{
},
-- List of geometric element types considered in the domain. Might be left empty if no restriction upon
-- these. No constraint is applied at Ops level, as some geometric element types could be added after
-- generation of current input parameter file. Current list is below; if an incorrect value is put there it
-- will be detected a bit later when the domain object is built.
-- The known types when this file was generated are:
-- . Point1
-- . Segment2, Segment3
-- . Triangle3, Triangle6
-- . Quadrangle4, Quadrangle8, Quadrangle9
-- . Tetrahedron4, Tetrahedron10
-- . Hexahedron8, Hexahedron20, Hexahedron27.
-- Expected format: {"VALUE1", "VALUE2", ...}
geometric_element_type_list
=
{
}
}
-- FiniteElementSpace1 -- Fluid
...
...
Sources/ModelInstances/FSI_EI/AleElasticVariationalFormulation.cpp
View file @
c8825b39
...
...
@@ -56,23 +56,22 @@ namespace HappyHeart
void
AleElasticVariationalFormulation
::
SupplInit
(
const
InputParameterList
&
input_parameter_data
)
{
const
auto
&
god_of_dof
=
this
->
GetGodOfDof
();
const
auto
&
mesh
=
god_of_dof
.
GetGeometricMeshRegion
();
decltype
(
auto
)
domain
=
DomainManager
::
GetInstance
().
GetDomain
(
EnumUnderlyingType
(
DomainIndex
::
fluid_full_mesh
));
volumic_mass_
=
InitScalarParameterFromInputData
<
InputParameter
::
Solid
::
VolumicMass
>
(
"Volumic mass"
,
mesh
,
input_parameter_data
);
domain
,
input_parameter_data
);
if
(
!
GetVolumicMass
().
IsConstant
())
throw
Exception
(
"Current elastic model is restricted to a constant volumic mass!"
,
__FILE__
,
__LINE__
);
young_modulus_
=
InitScalarParameterFromInputData
<
InputParameter
::
Solid
::
YoungModulus
>
(
"Young modulus"
,
mesh
,
input_parameter_data
);
domain
,
input_parameter_data
);
poisson_ratio_
=
InitScalarParameterFromInputData
<
InputParameter
::
Solid
::
PoissonRatio
>
(
"Poisson ratio"
,
mesh
,
input_parameter_data
);
domain
,
input_parameter_data
);
DefineOperators
(
input_parameter_data
);
...
...
Sources/ModelInstances/FSI_EI/ExplicitStepVariationalFormulation.cpp
View file @
c8825b39
...
...
@@ -81,17 +81,15 @@ namespace HappyHeart
void
ExplicitStepVariationalFormulation
::
SupplInit
(
const
InputParameterList
&
input_parameter_data
)
{
const
auto
&
god_of_dof
=
this
->
GetGodOfDof
();
const
auto
&
mesh
=
god_of_dof
.
GetGeometricMeshRegion
();
decltype
(
auto
)
domain
=
DomainManager
::
GetInstance
().
GetDomain
(
EnumUnderlyingType
(
DomainIndex
::
fluid_full_mesh
));
fluid_density_
=
InitScalarParameterFromInputData
<
InputParameter
::
Fluid
::
Density
>
(
"Fluid density"
,
mesh
,
input_parameter_data
);
domain
,
input_parameter_data
);
fluid_viscosity_
=
InitScalarParameterFromInputData
<
InputParameter
::
Fluid
::
Viscosity
>
(
"Fluid viscosity"
,
mesh
,
input_parameter_data
);
domain
,
input_parameter_data
);
namespace
IPL
=
Utilities
::
InputParameterListNS
;
gamma_
=
IPL
::
Extract
<
InputParameter
::
FSI_EI_NS
::
Gamma
>::
Value
(
input_parameter_data
);
...
...
@@ -109,12 +107,14 @@ namespace HappyHeart
ParameterNS
::
TimeDependencyNS
::
None
>
;
pseudo_young_modulus_
=
std
::
make_unique
<
parameter_type
>
(
"Pseudo young modulus"
,
mesh
,
domain
,
2.
*
GetFluidViscosity
().
GetConstantValue
());
pseudo_poisson_ratio_
=
std
::
make_unique
<
parameter_type
>
(
"Zero poisson ratio"
,
mesh
,
domain
,
0.
);
}
...
...
Sources/ModelInstances/FSI_EI/ImplicitStepFluidVariationalFormulation.cpp
View file @
c8825b39
...
...
@@ -45,8 +45,6 @@ namespace HappyHeart
const
auto
&
fluid_velocity_pressure_felt_space
=
god_of_dof
.
GetFEltSpace
(
EnumUnderlyingType
(
FEltSpaceIndex
::
fluid_velocity_pressure
));
const
auto
&
mesh
=
god_of_dof
.
GetGeometricMeshRegion
();
const
auto
&
unknown_manager
=
UnknownManager
::
GetInstance
();
const
auto
&
fluid_velocity
=
unknown_manager
.
GetUnknown
(
EnumUnderlyingType
(
UnknownIndex
::
fluid_velocity
));
...
...
@@ -98,11 +96,13 @@ namespace HappyHeart
}
{
decltype
(
auto
)
domain
=
DomainManager
::
GetInstance
().
GetDomain
(
EnumUnderlyingType
(
DomainIndex
::
fluid_full_mesh
));
using
parameter_type
=
InputParameter
::
TransientSource
<
EnumUnderlyingType
(
SourceIndex
::
inlet_pressure
)
>
;
inlet_pressure_
=
InitThreeDimensionalParameterFromInputData
<
parameter_type
>
(
"inlet_pressure"
,
mesh
,
input_parameter_data
);
domain
,
input_parameter_data
);
const
auto
&
inlet_border_felt_space
=
god_of_dof
.
GetFEltSpace
(
EnumUnderlyingType
(
FEltSpaceIndex
::
inlet_border
));
...
...
Sources/ModelInstances/FSI_EI/InputParameterList.hpp
View file @
c8825b39
...
...
@@ -51,10 +51,12 @@ namespace HappyHeart
fluid_gamma_in
=
12
,
fluid_axis
=
14
,
fluid_ale_homogeneous_dirichlet
=
15
,
fluid_full_mesh
=
16
,
solid
=
20
,
solid_interface
=
21
,
solid_lower_and_upper_part
=
22
,
solid_full_mesh
=
23
};
...
...
@@ -168,9 +170,11 @@ namespace HappyHeart
InputParameter
::
Domain
<
EnumUnderlyingType
(
DomainIndex
::
fluid_interface
)
>
,
InputParameter
::
Domain
<
EnumUnderlyingType
(
DomainIndex
::
fluid_ale_homogeneous_dirichlet
)
>
,
InputParameter
::
Domain
<
EnumUnderlyingType
(
DomainIndex
::
fluid_axis
)
>
,
InputParameter
::
Domain
<
EnumUnderlyingType
(
DomainIndex
::
fluid_full_mesh
)
>
,
InputParameter
::
Domain
<
EnumUnderlyingType
(
DomainIndex
::
solid
)
>
,
InputParameter
::
Domain
<
EnumUnderlyingType
(
DomainIndex
::
solid_interface
)
>
,
InputParameter
::
Domain
<
EnumUnderlyingType
(
DomainIndex
::
solid_lower_and_upper_part
)
>
,
InputParameter
::
Domain
<
EnumUnderlyingType
(
DomainIndex
::
solid_full_mesh
)
>
,
InputParameter
::
FEltSpace
<
EnumUnderlyingType
(
FEltSpaceIndex
::
fluid
)
>
,
InputParameter
::
FEltSpace
<
EnumUnderlyingType
(
FEltSpaceIndex
::
solid
)
>
,
...
...
Sources/ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Elasticity/VariationalFormulation.cpp
View file @
c8825b39
...
...
@@ -49,23 +49,22 @@ namespace HappyHeart
void
VariationalFormulationElasticity
::
SupplInit
(
const
InputParameterList
&
input_parameter_data
)
{
const
auto
&
god_of_dof
=
this
->
GetGodOfDof
();
const
auto
&
mesh
=
god_of_dof
.
GetGeometricMeshRegion
();
decltype
(
auto
)
domain
=
DomainManager
::
GetInstance
().
GetDomain
(
EnumUnderlyingType
(
DomainIndex
::
solid_full_mesh
));
volumic_mass_
=
InitScalarParameterFromInputData
<
InputParameter
::
Solid
::
VolumicMass
>
(
"Volumic mass"
,
mesh
,
input_parameter_data
);
domain
,
input_parameter_data
);
if
(
!
GetVolumicMass
().
IsConstant
())
throw
Exception
(
"Current elastic model is restricted to a constant volumic mass!"
,
__FILE__
,
__LINE__
);
young_modulus_
=
InitScalarParameterFromInputData
<
InputParameter
::
Solid
::
YoungModulus
>
(
"Young modulus"
,
mesh
,
input_parameter_data
);
domain
,
input_parameter_data
);
poisson_ratio_
=
InitScalarParameterFromInputData
<
InputParameter
::
Solid
::
PoissonRatio
>
(
"Poisson ratio"
,
mesh
,
input_parameter_data
);
domain
,
input_parameter_data
);
DefineOperators
(
input_parameter_data
);
...
...
Sources/ModelInstances/FSI_EI/SolidVariationalFormulationPolicy/Hyperelasticity/VariationalFormulation.hxx
View file @
c8825b39
...
...
@@ -74,10 +74,10 @@ namespace HappyHeart
void
VariationalFormulationHyperElasticity
<
LawPolicyT
,
TimeSchemeT
>
::
SupplInit
(
const
InputParameterDataT
&
input_parameter_data
)
{
const
auto
&
geometric_mesh_region
=
this
->
GetGodOfDof
().
GetGeometricMeshRegion
(
);
decltype
(
auto
)
domain
=
DomainManager
::
GetInstance
().
GetDomain
(
EnumUnderlyingType
(
DomainIndex
::
solid_full_mesh
)
);
solid_
=
std
::
make_unique
<
Solid
>
(
input_parameter_data
,
geometric_mesh_regio
n
,
domai
n
,
GetFEltSpace
().
GetQuadratureRulePerTopology
());
if
(
!
GetSolid
().
template
GetParameter
<
Solid
::
param
::
volumic_mass
>().
IsConstant
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment