Skip to main content

Construct by importing HDF5 file

The template is given below.

VariableData typeValueComment
nameString
massDensityREAL
stressStrainModelGroup dataset/

stressStrainModel is a group data set, which means it is a directory. The structure/ template of the this data set depends upon the child of AbstractSolidMechanicsModel_.

The Template for LinearElasticModel is given below.

Variable nameData typeValueComment
nameStringLinearElasticModelIt is constant, which denotes the name of the class.
elasticityTypeStringISO, ANISO, ORTHO, TRANSIt denotes the linear elasticity type
isPlaneStressStringTor FIf the problem is 2D, and plane stress then set it to .TRUE.
isPlaneStrainStringT or FIf the problem is 2D, and plane strain , then set it to .FALSE.
lambdaREALThis is required when ISO option is selected
ShearModulusREALThis is required when ISO option is selected
YoungsModulusREALThis is required when ISO option is selected
PoissonRatioREALThis is required when ISO option is selected
CREAL(6,6)This is necessary when ANISO option is selected.
invCREAL(6,6)This is necessary when ANISO option is selected.

In what follows we explain how to construct the instance by importing the information.

First we export the data in the hdf5 file.

type( Solid_ ) :: obj
type( ParameterList_ ) :: param
type( hdf5File_ ) :: hdf5
integer( i4b ) :: ierr
call display( "TEST-0")
call FPL_Init(); call param%initiate()
ierr = param%set( key="name", value="Solid1" )
ierr = param%set( key="massDensity", value=1000.0_DFP )
ierr = param%set( key="stressStrainModel", value="LinearElasticModel")
call setLinearElasticModelParam( &
& param = param, &
& ElasticityType = IsoLinearElasticModel, &
& isPlaneStress = .FALSE., &
& isPlaneStrain = .TRUE., &
& PoissonRatio = 0.3_DFP, &
& YoungsModulus = 1.0D+6 )
call obj%initiate( param )
call hdf5%initiate( filename="./TemplateSolid1.hdf5", mode="NEW" )
call hdf5%open()
call obj%export( hdf5, "" )
call hdf5%close(); call hdf5%Deallocate()
call FPL_FINALIZE; call param%Deallocate()

Now we can import data from this file and construct an instance of Solid_ class.

type( MeshSelection_ ) :: obj
type( Domain_ ) :: dom
type( HDF5File_ ) :: hdf5
call display( "TEST-0")
call hdf5%initiate(filename="./templateMeshSelection.hdf5", mode="READ")
call hdf5%open()
call obj%import(hdf5=hdf5, group='')
call obj%set()
call obj%display('')
call hdf5%close(); call hdf5%Deallocate()
call obj%Deallocate()