2012-09-11 15:42:55 +00:00
|
|
|
Info<< "Reading field DU\n" << endl;
|
|
|
|
volVectorField DU
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"DU",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::MUST_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
mesh
|
|
|
|
);
|
|
|
|
|
|
|
|
volTensorField gradDU = fvc::grad(DU);
|
|
|
|
|
2015-05-17 14:25:35 +00:00
|
|
|
Info<< "Creating field U\n" << endl;
|
2012-09-11 15:42:55 +00:00
|
|
|
volVectorField U
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"U",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2015-05-17 14:25:35 +00:00
|
|
|
mesh,
|
|
|
|
dimensionedVector("zero", dimLength, vector::zero)
|
2012-09-11 15:42:55 +00:00
|
|
|
);
|
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
volTensorField gradU
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2015-05-17 14:25:35 +00:00
|
|
|
"grad(U)",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2013-10-11 13:31:14 +00:00
|
|
|
mesh,
|
|
|
|
dimensionedTensor("zero", dimless, tensor::zero)
|
2015-05-17 14:25:35 +00:00
|
|
|
);
|
2013-10-11 13:31:14 +00:00
|
|
|
|
|
|
|
//- Increment of Green finite strain tensor
|
2012-09-11 15:42:55 +00:00
|
|
|
volSymmTensorField DEpsilon
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"DEpsilon",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2015-05-17 14:25:35 +00:00
|
|
|
mesh,
|
|
|
|
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
|
2012-09-11 15:42:55 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
volSymmTensorField epsilon
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"epsilon",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2015-05-17 14:25:35 +00:00
|
|
|
mesh,
|
|
|
|
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
|
2013-10-11 13:31:14 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
//- plastic strain
|
|
|
|
volSymmTensorField epsilonP
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"epsilonP",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2012-09-11 15:42:55 +00:00
|
|
|
mesh,
|
|
|
|
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
|
|
|
|
);
|
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
|
|
|
|
//- Increment of 2nd Piola-Kirchhoff stress tensor
|
2012-09-11 15:42:55 +00:00
|
|
|
volSymmTensorField DSigma
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"DSigma",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
mesh,
|
|
|
|
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
|
|
|
|
);
|
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
//- 2nd Piola-Kirchhoff stress tensor
|
2012-09-11 15:42:55 +00:00
|
|
|
volSymmTensorField sigma
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"sigma",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2015-05-17 14:25:35 +00:00
|
|
|
mesh,
|
|
|
|
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
|
2012-09-11 15:42:55 +00:00
|
|
|
);
|
|
|
|
|
2015-05-17 14:25:35 +00:00
|
|
|
volVectorField divDSigmaExp
|
|
|
|
(
|
2012-09-11 15:42:55 +00:00
|
|
|
IOobject
|
|
|
|
(
|
2015-05-17 14:25:35 +00:00
|
|
|
"divDSigmaExp",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::NO_WRITE
|
|
|
|
),
|
2012-09-11 15:42:55 +00:00
|
|
|
mesh,
|
2015-05-17 14:25:35 +00:00
|
|
|
dimensionedVector("zero", dimensionSet(1, -2, -2, 0, 0, 0, 0), vector::zero)
|
|
|
|
);
|
2012-09-11 15:42:55 +00:00
|
|
|
|
2015-05-17 14:25:35 +00:00
|
|
|
volVectorField divDSigmaNonLinExp
|
|
|
|
(
|
2012-09-11 15:42:55 +00:00
|
|
|
IOobject
|
|
|
|
(
|
2015-05-17 14:25:35 +00:00
|
|
|
"divDSigmaNonLinExp",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::NO_WRITE
|
|
|
|
),
|
2012-09-11 15:42:55 +00:00
|
|
|
mesh,
|
|
|
|
dimensionedVector("zero", dimensionSet(1,-2,-2,0,0,0,0), vector::zero)
|
2015-05-17 14:25:35 +00:00
|
|
|
);
|
2012-09-11 15:42:55 +00:00
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
constitutiveModel rheology(sigma, DU);
|
2014-06-01 18:12:52 +00:00
|
|
|
|
2012-09-11 15:42:55 +00:00
|
|
|
volScalarField rho = rheology.rho();
|
|
|
|
volScalarField mu = rheology.mu();
|
|
|
|
volScalarField lambda = rheology.lambda();
|
|
|
|
surfaceScalarField muf = fvc::interpolate(mu, "mu");
|
|
|
|
surfaceScalarField lambdaf = fvc::interpolate(lambda, "lambda");
|
|
|
|
|
|
|
|
surfaceVectorField n = mesh.Sf()/mesh.magSf();
|
|
|
|
|
2015-05-17 14:25:35 +00:00
|
|
|
// plastic strain increment
|
|
|
|
const volSymmTensorField& DEpsilonP = rheology.DEpsilonP();
|
2012-09-11 15:42:55 +00:00
|
|
|
|
2015-05-17 14:25:35 +00:00
|
|
|
// for aitken relaxation
|
|
|
|
volVectorField aitkenDelta
|
2013-10-11 13:31:14 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"aitkenDelta",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::NO_WRITE
|
|
|
|
),
|
|
|
|
mesh,
|
2015-05-17 14:25:35 +00:00
|
|
|
dimensionedVector("zero", dimLength, vector::zero)
|
2013-10-11 13:31:14 +00:00
|
|
|
);
|
2015-05-17 14:25:35 +00:00
|
|
|
|
|
|
|
// aitken relaxation factor
|
|
|
|
scalar aitkenInitialRes = 1.0;
|
|
|
|
scalar aitkenTheta = 0.1;
|
2013-10-14 08:26:40 +00:00
|
|
|
|
|
|
|
// volVectorField resid
|
|
|
|
// (
|
2015-05-17 14:25:35 +00:00
|
|
|
// IOobject
|
|
|
|
// (
|
|
|
|
// "resid",
|
|
|
|
// runTime.timeName(),
|
|
|
|
// mesh,
|
|
|
|
// IOobject::NO_READ,
|
|
|
|
// IOobject::AUTO_WRITE
|
|
|
|
// ),
|
|
|
|
// mesh,
|
|
|
|
// dimensionedVector("zero", dimless, vector::zero)
|
|
|
|
// );
|