Stress Solver - Pre-strain is not applied?
Stress Solver - Pre-strain is not applied?
Hi,
I am trying to use the pre-strain option for the stress solver. The structure is very simple - two boxes one on top another, the bottom box has zero displacement in the bottom as boundary condition and the second box on top has a uniform pre-strain defined as
Pre Strain
Size 6
Real -0.0401 -0.0401 -0.0401 0 0 0
in the corresponding materials section (it is not clear from the manual how the Pre Strain is defined, but looking at the source code I can see that it is a 6-element array).
ElmerSolver runs fine and gives zero result - the displacement, strain and stress in the whole structure is just zero, which is apparently not the correct solution I am looking for in this example.
The sif and gmsh geo files are attached.
I would really appreciate any help in correcting this simple example.
From physical point of view this is an attempt to model a simple "Quantum Well" strain - Ge "thin" strained layer on top of thick (and hence - mainly unstrained) Si layer. The Si layer is assumed to be a "substrate" - therefore zero displacement boundary condition at the bottom. This is related to semiconductor structures - i.e. growth of thin material with different lattice constant on top of the other material, the strain occurs because of difference in lattice constants - the thin material on top "has to match" the lattice constant of the bottom material (="substrate") and hence gets strained.
Many thanks!
Aleksey
I am trying to use the pre-strain option for the stress solver. The structure is very simple - two boxes one on top another, the bottom box has zero displacement in the bottom as boundary condition and the second box on top has a uniform pre-strain defined as
Pre Strain
Size 6
Real -0.0401 -0.0401 -0.0401 0 0 0
in the corresponding materials section (it is not clear from the manual how the Pre Strain is defined, but looking at the source code I can see that it is a 6-element array).
ElmerSolver runs fine and gives zero result - the displacement, strain and stress in the whole structure is just zero, which is apparently not the correct solution I am looking for in this example.
The sif and gmsh geo files are attached.
I would really appreciate any help in correcting this simple example.
From physical point of view this is an attempt to model a simple "Quantum Well" strain - Ge "thin" strained layer on top of thick (and hence - mainly unstrained) Si layer. The Si layer is assumed to be a "substrate" - therefore zero displacement boundary condition at the bottom. This is related to semiconductor structures - i.e. growth of thin material with different lattice constant on top of the other material, the strain occurs because of difference in lattice constants - the thin material on top "has to match" the lattice constant of the bottom material (="substrate") and hence gets strained.
Many thanks!
Aleksey
- Attachments
-
- t1_QW.geo
- (4.39 KiB) Downloaded 17 times
-
- Elmer_t1_QW.sif
- (4.8 KiB) Downloaded 18 times
-
- Posts: 2404
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Stress Solver - Pre-strain is not applied?
I put a load on it so that there would be a solution. Then I ran it with and with out the pre strain. There was no change in the answer.
Re: Stress Solver - Pre-strain is not applied?
Hi All,
to add - as you can see from the sif file (commented out Body Force 1 section), I also tried to apply the "pre-strain" in a different way - to have it as "Body Force" to volume 2, the result is the same - zero trivial solution. I also tried to apply "Body Force" as Stress - also zero result = displacement is still zero as a the solution.
I started to look more in the source code and it seems to me that although ElmerSolver does not complain on Pre-Strain entry in the sif file, it may be the case that I do the input incorrectly for some reason and therefore Pre-strain is interpreted as zero and ElmerSolver is doing the solution effectively with pre-strain being just 0.
And / or, it is also possible that I am doing the output in a wrong way?
Many thanks for your help!
Aleksey
to add - as you can see from the sif file (commented out Body Force 1 section), I also tried to apply the "pre-strain" in a different way - to have it as "Body Force" to volume 2, the result is the same - zero trivial solution. I also tried to apply "Body Force" as Stress - also zero result = displacement is still zero as a the solution.
I started to look more in the source code and it seems to me that although ElmerSolver does not complain on Pre-Strain entry in the sif file, it may be the case that I do the input incorrectly for some reason and therefore Pre-strain is interpreted as zero and ElmerSolver is doing the solution effectively with pre-strain being just 0.
And / or, it is also possible that I am doing the output in a wrong way?
Many thanks for your help!
Aleksey
Re: Stress Solver - Pre-strain is not applied?
Hi All,
I am looking at the source code - StressSolve.f90
1. PreStrain is defined as array (6,N), where (I guess) N- number of nodes. This means that my input for Pre Strain as "Size 6" array is probably correct.
2. PreStrain is set by default to zero in the following section:
(line 1177 of StressSolve.f90)
IF (.NOT. ConstantBulkMatrixInUse ) THEN
PreStress = 0.0d0
PreStrain = 0.0d0
IF( AnyPre ) THEN
CALL ListGetRealArray( Material, 'Pre Stress', Work, n, NodeIndexes, Found )
IF ( Found ) THEN
k = SIZE(Work,1)
PreStress(1:k,1:n) = Work(1:k,1,1:n)
END IF
CALL ListGetRealArray( Material, 'Pre Strain', Work, n, NodeIndexes, Found )
IF ( Found ) THEN
k = SIZE(Work,1)
PreStrain(1:k,1:n) = Work(1:k,1,1:n)
END IF
END IF
END IF
The above means to me that to have PreStrain to be non-zero I must have ConstantBulkMatrixInUse set as False ?
In my sif file it is set :
Constant Bulk System = False
I need to check - does it mean that ConstantBulkMatrixInUse is False? I need to dig it further...
3. The in StressSolve.f90 Prestrain is used in a call to StressCompose and, again, this happens ONLY if ConstantBulkMatrixInUse=False
(line 1301 of StressSolve.f90)
CASE( Cartesian, AxisSymmetric, CylindricSymmetric )
IF ( ConstantBulkMatrixInUse ) THEN
CALL StressForceCompose( FORCE, FORCE_im, LOAD, LOAD_im, ElasticModulus, PoissonRatio, &
PlaneStress, Isotropic,StressLoad, StrainLoad, HeatExpansionCoeff, &
LocalTemperature, Element, n, ntot, ElementNodes, RelIntegOrder, RotateC, TransformMatrix )
ELSE
CALL StressCompose( MASS, DAMP, STIFF, FORCE, FORCE_im, LOAD, LOAD_im, ElasticModulus, &
PoissonRatio, Density, PlaneStress, Isotropic, &
PreStress, PreStrain, StressLoad, StrainLoad, HeatExpansionCoeff, &
LocalTemperature, Element, n, ntot, ElementNodes, RelIntegOrder, StabilityAnalysis &
.AND. iter>1, GeometricStiffness .AND. iter>1, NodalDisplacement, &
RotateC, TransformMatrix, NodalMeshVelo, Damping, RayleighDamping, &
RayleighAlpha, RayleighBeta,EvaluateAtIP,EvaluateLoadAtIp,NeedMass)
END IF
My conclusion is that I need to be sure that ConstantBulkMatrixInUse=False, otherwise PreStrain is not applied.
I hope that the above statement in the Solver section Constant Bulk System = False actually does it?
to add - I also put
Constant Bulk Matrix = False
in the sif file and the result is the same.
according to StreeSolver.f90
ConstantBulkMatrix = GetLogical( SolverParams, 'Constant Bulk Matrix', Found )
and
ConstantBulkMatrixInUse = ConstantBulkMatrix .AND. &
ASSOCIATED(Solver % Matrix % BulkValues)
I am not quite sure what is the value of ASSOCIATED(Solver % Matrix % BulkValues) and how it is set, but at least if ConstantBulkMatrix=False, then it is "guaranteed" that ConstantBulkMatrixInUse=False
Any comment would be much appreciated!
Kind regards,
Aleksey
I am looking at the source code - StressSolve.f90
1. PreStrain is defined as array (6,N), where (I guess) N- number of nodes. This means that my input for Pre Strain as "Size 6" array is probably correct.
2. PreStrain is set by default to zero in the following section:
(line 1177 of StressSolve.f90)
IF (.NOT. ConstantBulkMatrixInUse ) THEN
PreStress = 0.0d0
PreStrain = 0.0d0
IF( AnyPre ) THEN
CALL ListGetRealArray( Material, 'Pre Stress', Work, n, NodeIndexes, Found )
IF ( Found ) THEN
k = SIZE(Work,1)
PreStress(1:k,1:n) = Work(1:k,1,1:n)
END IF
CALL ListGetRealArray( Material, 'Pre Strain', Work, n, NodeIndexes, Found )
IF ( Found ) THEN
k = SIZE(Work,1)
PreStrain(1:k,1:n) = Work(1:k,1,1:n)
END IF
END IF
END IF
The above means to me that to have PreStrain to be non-zero I must have ConstantBulkMatrixInUse set as False ?
In my sif file it is set :
Constant Bulk System = False
I need to check - does it mean that ConstantBulkMatrixInUse is False? I need to dig it further...
3. The in StressSolve.f90 Prestrain is used in a call to StressCompose and, again, this happens ONLY if ConstantBulkMatrixInUse=False
(line 1301 of StressSolve.f90)
CASE( Cartesian, AxisSymmetric, CylindricSymmetric )
IF ( ConstantBulkMatrixInUse ) THEN
CALL StressForceCompose( FORCE, FORCE_im, LOAD, LOAD_im, ElasticModulus, PoissonRatio, &
PlaneStress, Isotropic,StressLoad, StrainLoad, HeatExpansionCoeff, &
LocalTemperature, Element, n, ntot, ElementNodes, RelIntegOrder, RotateC, TransformMatrix )
ELSE
CALL StressCompose( MASS, DAMP, STIFF, FORCE, FORCE_im, LOAD, LOAD_im, ElasticModulus, &
PoissonRatio, Density, PlaneStress, Isotropic, &
PreStress, PreStrain, StressLoad, StrainLoad, HeatExpansionCoeff, &
LocalTemperature, Element, n, ntot, ElementNodes, RelIntegOrder, StabilityAnalysis &
.AND. iter>1, GeometricStiffness .AND. iter>1, NodalDisplacement, &
RotateC, TransformMatrix, NodalMeshVelo, Damping, RayleighDamping, &
RayleighAlpha, RayleighBeta,EvaluateAtIP,EvaluateLoadAtIp,NeedMass)
END IF
My conclusion is that I need to be sure that ConstantBulkMatrixInUse=False, otherwise PreStrain is not applied.
I hope that the above statement in the Solver section Constant Bulk System = False actually does it?
to add - I also put
Constant Bulk Matrix = False
in the sif file and the result is the same.
according to StreeSolver.f90
ConstantBulkMatrix = GetLogical( SolverParams, 'Constant Bulk Matrix', Found )
and
ConstantBulkMatrixInUse = ConstantBulkMatrix .AND. &
ASSOCIATED(Solver % Matrix % BulkValues)
I am not quite sure what is the value of ASSOCIATED(Solver % Matrix % BulkValues) and how it is set, but at least if ConstantBulkMatrix=False, then it is "guaranteed" that ConstantBulkMatrixInUse=False
Any comment would be much appreciated!
Kind regards,
Aleksey
Re: Stress Solver - Pre-strain is not applied?
After checking the solver code I think a given Pre Strain is used only in special cases where the effect of geometric stiffness is activated (Stability Analysis = True or Geometric Stiffness = True).
If you update to get the change
https://github.com/ElmerCSC/elmerfem/co ... 0f675667e6
it might be possible to include initial strains by giving them in a body force section as
Strain Load(6) = -0.0401 -0.0401 -0.0401 0 0 0
The stress and strain computation haven't been modified, so their interpretation may need to be done with some care if Strain Load is given.
-- Mika
If you update to get the change
https://github.com/ElmerCSC/elmerfem/co ... 0f675667e6
it might be possible to include initial strains by giving them in a body force section as
Strain Load(6) = -0.0401 -0.0401 -0.0401 0 0 0
The stress and strain computation haven't been modified, so their interpretation may need to be done with some care if Strain Load is given.
-- Mika
Re: Stress Solver - Pre-strain is not applied?
Coincidentally I have wanted to ask a very similar question. I have a different minimal example but the same observation: the only method for applying pre-stress/pre-strain in the StressSolver is to use "Strain Load" or "Stress Load" in a "Body Force".
I'm happy to share the MWE if you're interested (a simple 2D disk with no boundary conditions). My script includes:
where I comment/un-comment various lines for various attempts. The Material "Pre Stress"/"Pre Strain" tags get a "Unlisted keyword" warning in the log, but are not included in the "Unused keywords" at the end. The Body Force "Stress"/"Strain" tags just go straight through to "Unused keywords", which isn't too surprising because I can't see them in the source code.
I'm happy to run any additional suggestions, but for me "Strain Load" is working as expected. Thankfully I had already updated since Mika's fix to the NeedPreStress flag
I'm happy to share the MWE if you're interested (a simple 2D disk with no boundary conditions). My script includes:
Code: Select all
Material 1
...
Pre Strain(6) = Real 2.0 2.0 2.0 0 0 0
Pre Stress(6) = Real 2e3 2e3 2e3 0 0 0
End
Solver 1
...
Procedure = "StressSolve" "StressSolver"
Constant Bulk Matrix = Logical False
! Geometric Stiffness = True
Stability Analysis = True
End
Body Force 1
...
Strain(6) = Real 2.0 2.0 1.0 0 0 0
Stress(6) = Real 2e3 2e3 1.0 0 0 0
Strain Load(3) = Real 0.0 0.0 0.0 ! for me these are always the [xx,yy,xy] components rather than the full 3D tensor
End
I'm happy to run any additional suggestions, but for me "Strain Load" is working as expected. Thankfully I had already updated since Mika's fix to the NeedPreStress flag
Re: Stress Solver - Pre-strain is not applied?
Some cosmetic changes were made to the code (https://github.com/ElmerCSC/elmerfem/co ... bcab40c25d):
- Pre Stress and Pre Strain were added to the list of the known keywords. They are now read from a material section only when Stability Analysis = True or Geometric Stiffness = True. Otherwise they are not read at all.
- The only generic way to give initial strains and initial stresses is to use Stress Load or Strain Load in a body force section.
The documentation about these keywords have not been clear. It has also been updated:
https://www.nic.funet.fi/pub/sci/physic ... Manual.pdf
- Pre Stress and Pre Strain were added to the list of the known keywords. They are now read from a material section only when Stability Analysis = True or Geometric Stiffness = True. Otherwise they are not read at all.
- The only generic way to give initial strains and initial stresses is to use Stress Load or Strain Load in a body force section.
The documentation about these keywords have not been clear. It has also been updated:
https://www.nic.funet.fi/pub/sci/physic ... Manual.pdf
Re: Stress Solver - Pre-strain is not applied?
@mika, thank you for your help so far, it is very useful to have the documentation updated.
I'm afraid I still can't find any combination of options which enables the Material "Pre Strain" or "Pre Stress" options to have any impact on the simulation.
It appears that this question has come up several times on the forum, but I still can't see any working examples of the feature:
https://www.elmerfem.org/forum/viewtopi ... ain#p25728
https://www.elmerfem.org/forum/viewtopi ... ess#p12825
https://www.elmerfem.org/forum/viewtopi ... ress#p7595
If you have the time, I think it would be great if we could battle through and find an example where pre-stress/strain is working as expected.
I have a minimal working example (attached) where a plain 2D disk is stretched with uniform isotropic pre-strain and pre-stress, I expect the solver to return a displaced disk which has a smaller radius than the original. (for the moment I have put very large strain/stress in place to make sure any change is noticeable)
The output is included, but just run to re-produce, or if you want to re-generate the mesh as well.
I have had limited success reading the source-code but can't get much further without compiling the source and adding logging points.
You will see I've left in because it helps me trace through the code. It leads to a tiny displacement of order 1e-9, but just makes sure we don't get a trivial zero solution.
My understanding of StressSolve.F90 is that the pre-stress and pre-strain values are read in around lines 1160-1170 and then passed on to StressCompose for simulation.
I'm quite sure that the values are being read, because if I change the script to set wrong flags for GeometricStiffness and ConstantBulkMatrixInUse, then I get a message at the end of calling ElmerSolver which says something like "Unused keywords: "Pre Strain"... . I am relatively confident that StressCompose is the simulator being called because it just relies on the CurrentCoordinateSystem value, otherwise the "Strain Load" wouldn't change the simulation either. I can also see from the log that we call the simulation code twice, so the pre-stress should be applied on the second iteration.
Then we enter Stress.F90 with the arrays of NodalPreStrain etc passed in as arguments. Around lines 420-450 the values of pre-strain/stress are added to the StressTensor computed by LocalStress, which is then added to STIFF tensor between lines 615-625.
Again, I know the "Strain Load" simulation is being computed correctly, so a lot of these steps must be happening as designed ("NeedPreStress" and "ActiveGeometricStiffness" are True).
The pre-stress doesn't seem to be used any further, so I didn't read more. Honestly I have never written any fortran, so I've struggled to find anything which looks wrong, and I'd rather not start compiling the source code if one of the maintainers has time to look into it.
Does anyone have time to help out right now?
I'm afraid I still can't find any combination of options which enables the Material "Pre Strain" or "Pre Stress" options to have any impact on the simulation.
It appears that this question has come up several times on the forum, but I still can't see any working examples of the feature:
https://www.elmerfem.org/forum/viewtopi ... ain#p25728
https://www.elmerfem.org/forum/viewtopi ... ess#p12825
https://www.elmerfem.org/forum/viewtopi ... ress#p7595
If you have the time, I think it would be great if we could battle through and find an example where pre-stress/strain is working as expected.
I have a minimal working example (attached) where a plain 2D disk is stretched with uniform isotropic pre-strain and pre-stress, I expect the solver to return a displaced disk which has a smaller radius than the original. (for the moment I have put very large strain/stress in place to make sure any change is noticeable)
The output is included, but just run
Code: Select all
ElmerSolver mwe.sif
Code: Select all
bash run.sh
I have had limited success reading the source-code but can't get much further without compiling the source and adding logging points.
You will see I've left in
Code: Select all
Strain Load(3) = Real 1e-7 1e-7 0.0
My understanding of StressSolve.F90 is that the pre-stress and pre-strain values are read in around lines 1160-1170 and then passed on to StressCompose for simulation.
I'm quite sure that the values are being read, because if I change the script to set wrong flags for GeometricStiffness and ConstantBulkMatrixInUse, then I get a message at the end of calling ElmerSolver which says something like "Unused keywords: "Pre Strain"... . I am relatively confident that StressCompose is the simulator being called because it just relies on the CurrentCoordinateSystem value, otherwise the "Strain Load" wouldn't change the simulation either. I can also see from the log that we call the simulation code twice, so the pre-stress should be applied on the second iteration.
Then we enter Stress.F90 with the arrays of NodalPreStrain etc passed in as arguments. Around lines 420-450 the values of pre-strain/stress are added to the StressTensor computed by LocalStress, which is then added to STIFF tensor between lines 615-625.
Again, I know the "Strain Load" simulation is being computed correctly, so a lot of these steps must be happening as designed ("NeedPreStress" and "ActiveGeometricStiffness" are True).
The pre-stress doesn't seem to be used any further, so I didn't read more. Honestly I have never written any fortran, so I've struggled to find anything which looks wrong, and I'd rather not start compiling the source code if one of the maintainers has time to look into it.
Does anyone have time to help out right now?
- Attachments
-
- mwe.zip
- Script, mesh, and output
- (157.01 KiB) Downloaded 2 times
Re: Stress Solver - Pre-strain is not applied?
If one defines
Geometric Stiffness = Logical True
then the command
Eigen Analysis = True
is also needed. In addition, the number of eigenmodes to be computed has to be given. So if I add for example the lines
Eigen Analysis = True
Eigen System Values = 10
Eigen System Convergence Tolerance = Real 1.0e-6
the given Pre Strain/Stress are seen to affect the results.
Re: Stress Solver - Pre-strain is not applied?
Ok, thank you for looking into it.
So Material Pre Strain/Stress are only valid options when Eigen Analysis = True, otherwise BodyForce Stress/Strain Load should be used?
So Material Pre Strain/Stress are only valid options when Eigen Analysis = True, otherwise BodyForce Stress/Strain Load should be used?