Skip to main content

Export data to HDF5File

We can export data stored inside LinearElasticModel_ to HDF5File by using the method called Export.

Following data is exported in the HDF5File.

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.

Following examples covers this topic.

Example 1

info

This example initiates an instance of LinearElasticModel_ and exports its content into a hdf5File_.

PROGRAM main
USE easifemBase
USE easifemClasses
USE easifemMaterials
IMPLICIT NONE
TYPE(LinearElasticModel_) :: obj
TYPE(ParameterList_) :: param
TYPE(hdf5File_) :: hdf5file
CALL FPL_INIT; CALL param%initiate()
CALL setLinearElasticModelParam( &
& param=param, &
& ElasticityType=IsoLinearElasticModel, &
& PoissonRatio=0.3_DFP, &
& YoungsModulus=1.0D+6)
CALL obj%initiate(param)
CALL hdf5file%initiate("./TemplateLinearElasticModel1.hdf5", &
& mode="NEW")
CALL hdf5file%OPEN()
CALL obj%export(hdf5file, "")
CALL hdf5file%CLOSE
CALL hdf5file%DEALLOCATE()
CALL param%DEALLOCATE(); CALL FPL_FINALIZE
END PROGRAM main

Example 2

info

This example shows how initiate an instance of LinearElasticModel_ for plane stress case. Then, we export its content to HDF5File.

PROGRAM main
USE easifemBase
USE easifemClasses
USE easifemMaterials
IMPLICIT NONE
TYPE( LinearElasticModel_ ) :: obj
TYPE( ParameterList_ ) :: param
TYPE( hdf5File_ ) :: hdf5file

CALL FPL_INIT; CALL param%Initiate()
CALL SetLinearElasticModelParam( &
& param = param, &
& ElasticityType = IsoLinearElasticModel, &
& isPlaneStress = .TRUE., &
& PoissonRatio = 0.3_DFP, &
& YoungsModulus = 1.0D+6 )

CALL obj%Initiate( param )
CALL hdf5file%Initiate( "./TemplateLinearElasticModel2.hdf5", &
& mode="NEW" )

CALL hdf5file%Open()
CALL obj%Export( hdf5file, "" )
CALL hdf5file%Close()
CALL hdf5file%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE
END PROGRAM main

Example 3

info

This example initiate an instance of LinearElasticModel_ for plane strain case. It then exports the data to HDF5File.

PROGRAM main
USE easifemBase
USE easifemClasses
USE easifemMaterials
IMPLICIT NONE
TYPE( LinearElasticModel_ ) :: obj
TYPE( ParameterList_ ) :: param
TYPE( hdf5File_ ) :: hdf5file
CALL FPL_INIT; CALL param%initiate()
CALL setLinearElasticModelParam( &
& param = param, &
& ElasticityType = IsoLinearElasticModel, &
& isPlaneStrain = .TRUE., &
& PoissonRatio = 0.3_DFP, &
& YoungsModulus = 1.0D+6 )
CALL obj%initiate( param )
CALL hdf5file%initiate( "./TemplateLinearElasticModel3.hdf5", &
& mode="NEW" )
CALL hdf5file%open()
CALL obj%export( hdf5file, "" )
CALL hdf5file%close
CALL hdf5file%Deallocate()
CALL param%Deallocate(); CALL FPL_FINALIZE
END PROGRAM main