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/elasticIncrAcpSolidFoam/createFields.H

163 lines
3.5 KiB
C
Raw Normal View History

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);
volTensorField gradDU
(
IOobject
(
"grad(DU)",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedTensor("zero", dimless, tensor::zero)
);
surfaceVectorField snGradDU
(
IOobject
(
"snGrad(DU)",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedVector("zero", dimless, vector::zero)
);
2012-09-11 15:42:55 +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
),
mesh,
dimensionedVector("zero", dimLength, vector::zero)
2012-09-11 15:42:55 +00:00
);
volSymmTensorField DEpsilon
(
IOobject
(
"DEpsilon",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
2012-09-11 15:42:55 +00:00
mesh,
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
);
2012-09-11 15:42:55 +00:00
volSymmTensorField DSigma
2012-09-11 15:42:55 +00:00
(
IOobject
(
"DSigma",
2012-09-11 15:42:55 +00:00
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
2012-09-11 15:42:55 +00:00
);
volSymmTensorField epsilon
2012-09-11 15:42:55 +00:00
(
IOobject
(
"epsilon",
2012-09-11 15:42:55 +00:00
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
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)
);
volVectorField divDSigmaExp
(
IOobject
(
"divDSigmaExp",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedVector("zero", dimForce/dimVolume, vector::zero)
);
constitutiveModel rheology(sigma, DU);
//solidInterface interface(mesh, rheology);
// solidInterface* interfacePtr = new solidInterface(mesh, rheology);
surfaceVectorField traction
(
2012-09-11 15:42:55 +00:00
IOobject
(
"traction",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
2012-09-11 15:42:55 +00:00
mesh,
dimensionedVector("zero", dimForce/dimArea, vector::zero)
);
2012-09-11 15:42:55 +00:00
// for aitken relaxation
volVectorField aitkenDelta
(
2012-09-11 15:42:55 +00:00
IOobject
(
"aitkenDelta",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
2012-09-11 15:42:55 +00:00
mesh,
dimensionedVector("zero", dimLength, vector::zero)
);
// aitken relaxation factor
scalar aitkenInitialRes = 1.0;
scalar aitkenTheta = 0.1;