2013-10-11 13:31:14 +00:00
|
|
|
Info<< "Reading field U\n" << endl;
|
|
|
|
volVectorField U
|
2012-09-11 15:42:55 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2013-10-11 13:31:14 +00:00
|
|
|
"U",
|
2012-09-11 15:42:55 +00:00
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::MUST_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
mesh
|
|
|
|
);
|
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
volTensorField gradU //= fvc::grad(U);
|
2012-09-11 15:42:55 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2013-10-11 13:31:14 +00:00
|
|
|
"grad(U)",
|
2012-09-11 15:42:55 +00:00
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
2013-10-11 13:31:14 +00:00
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::NO_WRITE
|
2012-09-11 15:42:55 +00:00
|
|
|
),
|
|
|
|
mesh,
|
2013-10-11 13:31:14 +00:00
|
|
|
dimensionedTensor("zero", dimless, tensor::zero)
|
2012-09-11 15:42:55 +00:00
|
|
|
);
|
2013-10-11 13:31:14 +00:00
|
|
|
surfaceVectorField snGradU // = fvc::snGrad(U);
|
2012-09-11 15:42:55 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2013-10-11 13:31:14 +00:00
|
|
|
"snGrad(U)",
|
2012-09-11 15:42:55 +00:00
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
2013-10-11 13:31:14 +00:00
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::NO_WRITE
|
2012-09-11 15:42:55 +00:00
|
|
|
),
|
2013-10-11 13:31:14 +00:00
|
|
|
mesh,
|
|
|
|
dimensionedVector("zero", dimless, vector::zero)
|
2012-09-11 15:42:55 +00:00
|
|
|
);
|
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
volVectorField V
|
2012-09-11 15:42:55 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2013-10-11 13:31:14 +00:00
|
|
|
"V",
|
2012-09-11 15:42:55 +00:00
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2013-10-11 13:31:14 +00:00
|
|
|
fvc::ddt(U)
|
2012-09-11 15:42:55 +00:00
|
|
|
);
|
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
volSymmTensorField epsilon
|
2012-09-11 15:42:55 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2013-10-11 13:31:14 +00:00
|
|
|
"epsilon",
|
2012-09-11 15:42:55 +00:00
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::READ_IF_PRESENT,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
mesh,
|
2013-10-11 13:31:14 +00:00
|
|
|
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
|
2012-09-11 15:42:55 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
volSymmTensorField sigma
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"sigma",
|
|
|
|
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
|
|
|
volVectorField divSigmaExp
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"divSigmaExp",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::NO_WRITE
|
|
|
|
),
|
|
|
|
mesh,
|
|
|
|
dimensionedVector("zero", dimForce/dimVolume, vector::zero)
|
|
|
|
);
|
|
|
|
|
|
|
|
constitutiveModel rheology(sigma, U);
|
|
|
|
|
|
|
|
surfaceVectorField traction
|
2013-07-18 01:43:15 +00:00
|
|
|
(
|
2012-09-11 15:42:55 +00:00
|
|
|
IOobject
|
|
|
|
(
|
2013-10-11 13:31:14 +00:00
|
|
|
"traction",
|
2013-07-18 01:43:15 +00:00
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::NO_WRITE
|
|
|
|
),
|
2012-09-11 15:42:55 +00:00
|
|
|
mesh,
|
2013-10-11 13:31:14 +00:00
|
|
|
dimensionedVector("zero", dimForce/dimArea, vector::zero)
|
2013-07-18 01:43:15 +00:00
|
|
|
);
|
2012-09-11 15:42:55 +00:00
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
// for aitken relaxation
|
|
|
|
volVectorField aitkenDelta
|
2013-07-18 01:43:15 +00:00
|
|
|
(
|
2012-09-11 15:42:55 +00:00
|
|
|
IOobject
|
|
|
|
(
|
2013-10-11 13:31:14 +00:00
|
|
|
"aitkenDelta",
|
2013-07-18 01:43:15 +00:00
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::NO_WRITE
|
|
|
|
),
|
2012-09-11 15:42:55 +00:00
|
|
|
mesh,
|
2013-10-11 13:31:14 +00:00
|
|
|
dimensionedVector("zero", dimLength, vector::zero)
|
2013-07-18 01:43:15 +00:00
|
|
|
);
|
2013-10-11 13:31:14 +00:00
|
|
|
// aitken relaxation factor
|
|
|
|
scalar aitkenInitialRes = 1.0;
|
|
|
|
scalar aitkenTheta = 0.1;
|
|
|
|
if(mesh.relax(U.name()))
|
|
|
|
{
|
|
|
|
aitkenTheta = mesh.relaxationFactor(U.name());
|
|
|
|
}
|
2012-09-11 15:42:55 +00:00
|
|
|
|
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
volVectorField resid
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"resid",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
mesh,
|
|
|
|
dimensionedVector("zero", dimless, vector::zero)
|
|
|
|
);
|