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 name | Data type | Value | Comment |
---|---|---|---|
name | String | LinearElasticModel | It is constant, which denotes the name of the class. |
elasticityType | String | ISO , ANISO , ORTHO , TRANS | It denotes the linear elasticity type |
isPlaneStress | String | T or F | If the problem is 2D, and plane stress then set it to .TRUE. |
isPlaneStrain | String | T or F | If the problem is 2D, and plane strain , then set it to .FALSE. |
lambda | REAL | This is required when ISO option is selected | |
ShearModulus | REAL | This is required when ISO option is selected | |
YoungsModulus | REAL | This is required when ISO option is selected | |
PoissonRatio | REAL | This is required when ISO option is selected | |
C | REAL(6,6) | This is necessary when ANISO option is selected. | |
invC | REAL(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