Closed fengsim closed 1 year ago
Looks like your behaviour does not declare a material property named YieldStrength
and that you did try declare it.
thanks, how to declare YieldStrength? I have the following codes:
material = mf.MFrontNonlinearMaterial("./src/libBehaviour.so", "LogarithmicStrainPlasticity", material_properties={"YieldStress": 250e6, "HardeningSlope": 1e6})
What happens if you remove the material_properties argument ?
if i remove YieldStrength and HardingSlope
material = mf.MFrontNonlinearMaterial("./src/libBehaviour.so",
"LogarithmicStrainPlasticity",
material_properties={})
Then I got
File "/usr/local/lib/python3.8/site-packages/mgis/fenics/nonlinear_problem.py", line 465, in update_constitutive_law mgis_bv.integrate(self.material.data_manager, self.integration_type, RuntimeError: integrate: no variable named 's0' declared No variable declared.
Is the problem from LibBehaviour.so?
Your first mistake was to declare an unexpected material property.
So this is the other possible mistake: you did not declare an expected material property. You must have a look at your MFront file to see what are the expected material properties..
aha, thanks a lot, i go to see it
please don't close the issue, if i fixed, I will be back
To be honest, we proably shall introduce better error messages in mgis.fenics
:)
Now it is fenicsx, we just invited them to give our PhD students a talk.
i checked LogarithmicStrainPlasticity.mfront and it seems lost something.
@DSL IsotropicPlasticMisesFlow;
@Behaviour LogarithmicStrainPlasticity;
@Author Helfer Thomas;
@Date 5/12/13;
@UMATFiniteStrainStrategy[umat] MieheApelLambrechtLogarithmicStrain;
@MaterialProperty stress s0;
@MaterialProperty stress Et;
@LocalVariable stress R;
@InitLocalVariables{
// hardening slope
R = young*Et/(young-Et);
}
@FlowRule{
f = seq-R*p-s0;
df_dseq = 1;
df_dp = -R;
}
in Elasticity.mfront, i found
// Material properties
@MaterialProperty stress young;
young.setGlossaryName("YoungModulus");
@MaterialProperty real nu;
nu.setGlossaryName("PoissonRatio");
You may want to type something like this:
$ mfront-query --material-properties LogarithmicStrainPlasticity.mfront
You'll see that you need to define 4 material properties: YoungModulus, PoissonRatio, s0 and Et.
The two first ones are automatically declared by the IsotropicPlasticMisesFlow
DSL.
thanks, i have fixed it. In the example for finite deformation plasticity, we could use mgis_fenics_finite_strain_elastoplasticity.py and at the top of this example, the definition of mfront is given as
@DSL Implicit;
@Behaviour LogarithmicStrainPlasticity;
@Author Thomas Helfer/Jérémy Bleyer;
@Date 07 / 04 / 2020;
@StrainMeasure Hencky;
@Algorithm NewtonRaphson;
@Epsilon 1.e-14;
@Theta 1;
@MaterialProperty stress s0;
s0.setGlossaryName("YieldStress");
@MaterialProperty stress H0;
H0.setEntryName("HardeningSlope");
@Brick StandardElastoViscoPlasticity{
stress_potential : "Hooke" {
young_modulus : 210e9,
poisson_ratio : 0.3
},
inelastic_flow : "Plastic" {
criterion : "Mises",
isotropic_hardening : "Linear" {H : "H0", R0 : "s0"}
}
};
We just need to copy it to a .mfront file and use front to compile it to libBehaviour.so and it is OK. Thanks.
We just need to copy it to a .mfront file and use front to compile it to libBehaviour.so and it is OK.
What you do need to do is to make sure that your script and your MFront file are consistent :)
thanks a lot! :+1:
Did you use logarithmic stain in the updated lagrangian method?
No, definitively not :) See the orginial paper of Miehe for details: https://www.sciencedirect.com/science/article/abs/pii/S0045782502004383
Now I am working for ale for large deformation and I have finished updated lagrangian method for large displacement and small strain. Now I want to do the algorithm in the book of Bathe, page 616, large strain elastoplastic updated lagrangian hencky formulation.
In this case, you shall not let MFront handle finite strain. Compile your behaviour under the small strain assumptions and compute the kinematic on the FEniCS side. But to be honest, what would you want to do that ? Miehe's framework has some drawbacks, but it is much more physically sound than any updated lagrangian method IMHO.
I use the other fem solver to compute the kinematic. I am very familiar with fem codes, so which solver is not important. My major is mathematics, so the constitutive laws from solid mechanics are very complex for me. I have finished small strains and large displacement with small strains for elastoplasticity and compared with Abaqus perfectly. Now the finite strain seems very complex. So i want to use MFront to do the strain-stress with my fem solver. I prefer the work from the book "Comutational Methods for Plasticity Theory and Applications", there is one chapter for details finite strain. Miehe's framework should be new, so we want to begin from the standard way.
We want to generate a ALE solid mechanics solver for our multiscale and large scale computational manufacturing simulation.
We also want to develop a SDK tool for the development of CAX software with AI and we begin a new open source project "OpenCAXPlus". Now we have already collected and integrated more than 50 open source software for CAD/CAE/CAM/CAI.
I use the other fem solver to compute the kinematic. I am very familiar with fem codes, so which solver is not important. My major is mathematics, so the constitutive laws from solid mechanics are very complex for me. I have finished small strains and large displacement with small strains for elastoplasticity and compared with Abaqus perfectly. Now the finite strain seems very complex. So i want to use MFront to do the strain-stress with my fem solver. I prefer the work from the book "Comutational Methods for Plasticity Theory and Applications", there is one chapter for details finite strain. Miehe's framework should be new, so we want to begin from the standard way.
We want to generate a ALE solid mechanics solver for our multiscale and large scale computational manufacturing simulation.
So in this case, you have two choices:
In both cases, you can't use @StrainMesure Hencky;
...
We also want to develop a SDK tool for the development of CAX software with AI and we begin a new open source project "OpenCAXPlus". Now we have already collected and integrated more than 50 open source software for CAD/CAE/CAM/CAI.
That sounds ambitious and interesting !
yes, Website, GUI, Android APP, ... have their own SDK, but CAX software dont' have SDK. I think that this is very useful. This is my idea, hahahaha
Yes, but in MFront you use Miehe's framework. Is this much different with the book of EA de Souza Neto ...? The book seems simliliar with Simo's paper 1991.
Yes, but in MFront you use Miehe's framework.
Yes, but you just have to remove @StrainMeasure Hencky;
Is this much different with the book of EA de Souza Neto ...? The book seems simliliar with Simo's paper 1991.
Don't know right know, to be honest.
Thanks :+1:
@fengsim Is this issue still relevant ?
You could close it. Thank you very much !!!
I use the following steps:
generate libBehaviour.so mfront --interface=generic /usr/local/share/doc/mfront/tests/behaviours/LogarithmicStrainPlasticity2.mfront mfront --obuild
python3 mgis_fenics_finite_strain_elastoplasticity.py
Then I get the following:
What is "getVariable: no variable named 'YieldStrength'"?