This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDivDSigmaNonLinExp.H

95 lines
2.5 KiB
C
Raw Normal View History

if(divDSigmaNonLinExpMethod == "standard")
2014-04-10 16:45:26 +00:00
{
divDSigmaNonLinExp = fvc::div
2014-04-10 16:45:26 +00:00
(
(
mu*
(
(gradDU & gradU.T())
+ (gradU & gradDU.T())
+ (gradDU & gradDU.T())
)
2014-04-10 16:45:26 +00:00
)
+ (
0.5*lambda*
tr
(
(gradDU & gradU.T())
+ (gradU & gradDU.T())
+ (gradDU & gradDU.T())
)*I
)
+ (DSigma & gradU)
+ ((sigma + DSigma) & gradDU),
"div(sigma)"
);
}
else if(divDSigmaNonLinExpMethod == "surface")
{
2014-04-10 16:45:26 +00:00
divDSigmaNonLinExp = fvc::div
(
mesh.magSf()*
(
(
muf*
(
n & fvc::interpolate
(
(gradU & gradDU.T())
+ (gradDU & gradU.T())
+ (gradDU & gradDU.T())
)
)
)
+ (
0.5*lambdaf*
(
n*tr
(
fvc::interpolate
(
(gradU & gradDU.T())
+ (gradDU & gradU.T())
+ (gradDU & gradDU.T())
)
)
)
)
+ (
n & fvc::interpolate
(
(DSigma & gradU)
+ ((sigma + DSigma) & gradDU)
)
)
)
);
// divDSigmaNonLinExp =
// fvc::div
// (
// ( muf * mesh.Sf()
// & fvc::interpolate(
// (gradDU & gradU.T())
// + (gradU & gradDU.T())
// + (gradDU & gradDU.T())
// ) )
// + ( lambdaf * 0.5* tr(
// fvc::interpolate(
// (gradDU & gradU.T())
// + (gradU & gradDU.T())
// + (gradDU & gradDU.T())
// )
// ) * mesh.Sf() )
// + (mesh.Sf() & fvc::interpolate( (DSigma & gradU )
// + ( (sigma + DSigma) & gradDU )
// ) )
// );
2014-04-10 16:45:26 +00:00
}
else
{
FatalErrorIn(args.executable())
<< "divDSigmaExp method " << divDSigmaExpMethod << " not found!"
<< abort(FatalError);
}