143 lines
3 KiB
C
143 lines
3 KiB
C
Info<< "Reading field U\n" << endl;
|
|
volVectorField U
|
|
(
|
|
IOobject
|
|
(
|
|
"U",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
volTensorField gradU //= fvc::grad(U);
|
|
(
|
|
IOobject
|
|
(
|
|
"grad(U)",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
mesh,
|
|
dimensionedTensor("zero", dimless, tensor::zero)
|
|
);
|
|
surfaceVectorField snGradU // = fvc::snGrad(U);
|
|
(
|
|
IOobject
|
|
(
|
|
"snGrad(U)",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
mesh,
|
|
dimensionedVector("zero", dimless, vector::zero)
|
|
);
|
|
|
|
volVectorField V
|
|
(
|
|
IOobject
|
|
(
|
|
"V",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::READ_IF_PRESENT,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
fvc::ddt(U)
|
|
);
|
|
|
|
volSymmTensorField epsilon
|
|
(
|
|
IOobject
|
|
(
|
|
"epsilon",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::READ_IF_PRESENT,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh,
|
|
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
|
|
);
|
|
|
|
volSymmTensorField sigma
|
|
(
|
|
IOobject
|
|
(
|
|
"sigma",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::READ_IF_PRESENT,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh,
|
|
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
|
|
);
|
|
|
|
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
|
|
(
|
|
IOobject
|
|
(
|
|
"traction",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
mesh,
|
|
dimensionedVector("zero", dimForce/dimArea, vector::zero)
|
|
);
|
|
|
|
// for aitken relaxation
|
|
volVectorField aitkenDelta
|
|
(
|
|
IOobject
|
|
(
|
|
"aitkenDelta",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
mesh,
|
|
dimensionedVector("zero", dimLength, vector::zero)
|
|
);
|
|
// aitken relaxation factor
|
|
scalar aitkenInitialRes = 1.0;
|
|
scalar aitkenTheta = 0.1;
|
|
|
|
// volVectorField resid
|
|
// (
|
|
// IOobject
|
|
// (
|
|
// "resid",
|
|
// runTime.timeName(),
|
|
// mesh,
|
|
// IOobject::NO_READ,
|
|
// IOobject::AUTO_WRITE
|
|
// ),
|
|
// mesh,
|
|
// dimensionedVector("zero", dimless, vector::zero)
|
|
// );
|