Formatting

This commit is contained in:
Hrvoje Jasak 2016-01-05 14:18:48 +00:00
parent f42425370d
commit 365f13718c
3 changed files with 31 additions and 103 deletions

View file

@ -1,4 +1,4 @@
if(divSigmaExpMethod == "standard") if (divSigmaExpMethod == "standard")
{ {
divSigmaExp = fvc::div divSigmaExp = fvc::div
( (

View file

@ -52,6 +52,7 @@ int main(int argc, char *argv[])
# include "setRootCase.H" # include "setRootCase.H"
# include "createTime.H" # include "createTime.H"
# include "createMesh.H" # include "createMesh.H"
# include "readGravitationalAcceleration.H"
# include "createFields.H" # include "createFields.H"
# include "createHistory.H" # include "createHistory.H"
# include "readDivSigmaExpMethod.H" # include "readDivSigmaExpMethod.H"
@ -61,7 +62,7 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
while(runTime.loop()) while(runTime.loop())
{ {
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
@ -71,7 +72,7 @@ int main(int argc, char *argv[])
lduMatrix::solverPerformance solverPerf; lduMatrix::solverPerformance solverPerf;
scalar initialResidual = 1.0; scalar initialResidual = 1.0;
scalar relativeResidual = 1.0; scalar relativeResidual = 1.0;
lduMatrix::debug = 0; // lduMatrix::debug = 0;
if (predictor) if (predictor)
{ {
@ -95,6 +96,7 @@ int main(int argc, char *argv[])
== ==
fvm::laplacian(2*muf + lambdaf, U, "laplacian(DU,U)") fvm::laplacian(2*muf + lambdaf, U, "laplacian(DU,U)")
+ divSigmaExp + divSigmaExp
+ rho*g
); );
if (solidInterfaceCorr) if (solidInterfaceCorr)

View file

@ -1,110 +1,36 @@
if (runTime.outputTime()) if (runTime.outputTime())
{ {
volScalarField epsilonEq volScalarField epsilonEq
( (
IOobject IOobject
( (
"epsilonEq", "epsilonEq",
runTime.timeName(), runTime.timeName(),
mesh, mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
sqrt((2.0/3.0)*magSqr(dev(epsilon))) sqrt((2.0/3.0)*magSqr(dev(epsilon)))
); );
Info<< "Max epsilonEq = " << max(epsilonEq).value() Info<< "Max epsilonEq = " << max(epsilonEq).value()
<< endl; << endl;
volScalarField sigmaEq volScalarField sigmaEq
( (
IOobject IOobject
( (
"sigmaEq", "sigmaEq",
runTime.timeName(), runTime.timeName(),
mesh, mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
sqrt((3.0/2.0)*magSqr(dev(sigma))) sqrt((3.0/2.0)*magSqr(dev(sigma)))
); );
Info<< "Max sigmaEq = " << max(sigmaEq).value() Info<< "Max sigmaEq = " << max(sigmaEq).value()
<< endl; << endl;
//- boundary traction
// volVectorField traction
// (
// IOobject
// (
// "traction",
// runTime.timeName(),
// mesh,
// IOobject::NO_READ,
// IOobject::AUTO_WRITE
// ),
// mesh,
// dimensionedVector("zero", dimForce/dimArea, vector::zero)
// );
// forAll(traction.boundaryField(), patchi)
// {
// traction.boundaryField()[patchi] =
// n.boundaryField()[patchi] & sigma.boundaryField()[patchi];
// }
// contact fields
// if(contactBoundaries)
// {
// volScalarField stickSlipFaces
// (
// IOobject
// (
// "stickSlipFaces",
// runTime.timeName(),
// mesh,
// IOobject::NO_READ,
// IOobject::AUTO_WRITE
// ),
// mesh,
// dimensionedScalar("zero", dimless, 0.0)
// );
// forAll(stickSlipFaces.boundaryField(), patchi)
// {
// if(U.boundaryField()[patchi].type()
// ==
// solidContactFvPatchVectorField::typeName)
// {
// const solidContactFvPatchVectorField& Upatch =
// refCast<const solidContactFvPatchVectorField>
// (U.boundaryField()[patchi]);
// if(!Upatch.master())
// {
// stickSlipFaces.boundaryField()[patchi] =
// Upatch.frictionContactModelPtr()->stickSlipFaces();
// }
// }
// }
// stickSlipFaces.write();
// }
//- boundary forces
// Info << nl;
// forAll(mesh.boundary(), patchi)
// {
// Info << "Patch " << mesh.boundary()[patchi].name() << endl;
// vectorField totalForce = mesh.Sf().boundaryField()[patchi] & sigma.boundaryField()[patchi];
// vector force = sum( totalForce );
// Info << "\ttotal force is " << force << " N" << endl;
// const vectorField& nb = n.boundaryField()[patchi];
// scalar normalForce = sum( nb & totalForce );
// Info << "\tnormal force is " << normalForce << " N" << endl;
// scalar shearForce = mag(sum( (I - sqr(nb)) & totalForce ));
// Info << "\tshear force is " << shearForce << " N" << endl;
// }
runTime.write(); runTime.write();
} }