Closed PhilippeBussetta closed 6 years ago
@KratosMultiphysics/structural-mechanics
COMPUTE_CONSTITUTIVE_TENSOR
could be managed by the integration scheme?
I agree with you. Those lines are unnecessary (and actually wrong, in the case of USE_ELEMENT_PROVIDED_STRAIN=True). I think this should be implemented as something like (a better error message is ok)
if(Options.IsNot( ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN ))
{
KRATOS_DEBUG_ERROR_IF_NOT(rValues.IsSetDeformationGradientF()) << "Element does not provide strain, hence F has to be provide. This is not the case"
CalculateCauchyGreenStrain(rValues, StrainVector);
}
and then by reoving the lines you posted.
I don't follow you on your second comment
The COMPUTE_CONSTITUTIVE_TENSOR
is used to save time regarding the computation of the tensor or to save memory?
When is False
, we assume that C is already computed or we have to compute the stress without saving C?
the elasticity tensor C := diff(sigma)/d(strain)
computing it is often difficult (not for a linear law obviously). for this reason if one wants to do explicit, only computing the stresses is needed (without having to compute C). The flag is designed to allow this possibility
I mean, for a well implemented linear law, the stress should be implemented WITHOUT REQUIRING ALLOCATING C.
I am pretty sure i originally implemented that this way. It is not currently like this in the code, but this is definitely a performance bug
I agree with you, computing C is not easy in nonlinear CL, so some time one want use the tensor from the previous step to save CPU time.
For example the integration scheme can put the flag True
in the first iteration then False
during n iteration.
To use the same tangent stiffness matrix during few iteration.
Hi @PhilippeBussetta however take into account that you cannot store the C (at least in general) since doing so implies storing 36 doubles per gauss point, which is A LOT.
if you want to reuse the same stiffness matrix, the strategy should take care of this (in principle it is able to do that)
@RiccardoRossi , I understand, the flag is just use at the material level, at gauss point
i am closing this since i believe a conclusion is reached. please reopen if needed
In the elastic_isotropic_3d.cpp of StructuralMechanicsApplication I don't understand well why the deformation gradient F is tested -- line 84. I think that lines 84-87 are not necessary because the strain are computed line 73 or given by the element.
In addition I don't understand well the flag
COMPUTE_CONSTITUTIVE_TENSOR
If the flag isFalse
, we assume that the value of C is already computed? Thus we have to use the old value to compute the stress ? C is computed if the flag isTrue
-- line 79 as wellFalse
-- line 297.