Removing trailing whitespace, tabs and DOS CR & Fixing some indentation

This commit is contained in:
Henrik Rusche 2016-06-20 16:50:07 +02:00
parent d838b666f6
commit a224c64812
110 changed files with 1957 additions and 2039 deletions

View file

@ -104,9 +104,9 @@ function(GetGitBranchName var)
foreach(branch ${listOfGitBranches})
string(REGEX MATCH "\\* .*$" matchString ${branch})
string(LENGTH "${matchString}" lengthMatchString)
if(lengthMatchString GREATER 0)
# We have match. Cleanup and set retValue
string(REPLACE "* " "" retValue ${matchString})
if(lengthMatchString GREATER 0)
# We have match. Cleanup and set retValue
string(REPLACE "* " "" retValue ${matchString})
endif()
endforeach()
@ -122,7 +122,7 @@ function(GetGitRevNumber var)
set( retValue "unknown")
execute_process(
COMMAND git rev-parse --short=12 HEAD
COMMAND git rev-parse --short=12 HEAD
WORKING_DIRECTORY ${FOAM_ROOT}
OUTPUT_VARIABLE git_rev_number
)
@ -259,11 +259,11 @@ elseif(GIT_FOUND)
if(NOT GIT_ECODE)
# We have a valid git repository.
# Grab the branch and revision info. Add to the build name
GetGitBranchName(GIT_BRANCH_NAME)
# Grab the branch and revision info. Add to the build name
GetGitBranchName(GIT_BRANCH_NAME)
message("Git branch: ${GIT_BRANCH_NAME}")
GetGitRevNumber(GIT_REV_NUMBER)
GetGitRevNumber(GIT_REV_NUMBER)
message("Git revision: ${GIT_REV_NUMBER}")
SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}")
@ -301,8 +301,8 @@ elseif(GIT_FOUND)
SET(BUILDNAME "${BUILDNAME}-hg-rev=${GIT_REV_NUMBER}")
else()
# Not a git or mercurial repository: no branch nor revision information available
SET(BUILDNAME "${BUILDNAME}-git-branch=unknown")
SET(BUILDNAME "${BUILDNAME}-git-rev=unknown")
SET(BUILDNAME "${BUILDNAME}-git-branch=unknown")
SET(BUILDNAME "${BUILDNAME}-git-rev=unknown")
endif()
endif()
else()
@ -379,18 +379,18 @@ IF(BUILD_TESTING)
IF(RUN_FROM_ONE_TIMESTEP)
# Modify the cases controlDict file in order to run for only one time step
MESSAGE("${testRunTimeDirectory}: Modifying the controlDict files for running only one time step in directory: ${TEST_CASE_DIR}")
if(CMAKE_HOST_WIN32)
if(CMAKE_HOST_WIN32)
# Need to supply a bash shell to run the script under Windows
EXECUTE_PROCESS(
COMMAND bash -c "$ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR}"
WORKING_DIRECTORY .
)
else()
)
else()
EXECUTE_PROCESS(
COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR}
WORKING_DIRECTORY .
)
endif()
)
endif()
ENDIF(RUN_FROM_ONE_TIMESTEP)
ENDIF(BUILD_TESTING)

View file

@ -58,6 +58,3 @@ Features
git commit: "add branch ReadMe file"
--> added this file

View file

@ -1,10 +1,10 @@
_____________________________________
_____________________________________
*RELEASE NOTES FOR FOAM-EXTEND-3.2*
_____________________________________
*RELEASE NOTES FOR FOAM-EXTEND-3.2*
_____________________________________
August 2015
August 2015
Table of Contents

View file

@ -113,14 +113,14 @@ void Foam::fluidSolidInterface::calcFluidToSolidInterpolator() const
}
std::shared_ptr<RBFFunctionInterface> rbfFunction;
rbfFunction = std::shared_ptr<RBFFunctionInterface>( new TPSFunction() );
rbfFunction = std::shared_ptr<RBFFunctionInterface>(new TPSFunction());
// std::shared_ptr<RBFInterpolation> rbf;
fluidToSolidPtr_ =
std::shared_ptr<RBFInterpolation>
(
new RBFInterpolation( rbfFunction )
// new RBFInterpolation( rbfFunctionPtr_ )
new RBFInterpolation(rbfFunction)
// new RBFInterpolation(rbfFunctionPtr_)
);
vectorField solidZoneFaceCentres =
@ -146,7 +146,7 @@ void Foam::fluidSolidInterface::calcFluidToSolidInterpolator() const
solidX(faceI, 2) = solidZoneFaceCentres[faceI].z();
}
fluidToSolidPtr_->compute( fluidX, solidX );
fluidToSolidPtr_->compute(fluidX, solidX);
Info << "Checking fluid-to-solid interpolator" << endl;
{
@ -186,39 +186,39 @@ void Foam::fluidSolidInterface::calcFluidToSolidInterpolator() const
solidMesh().boundaryMesh()[solidPatchIndex_].faceCentres()
);
matrix fluidX(fluidZoneFaceCentres.size(), 3);
// matrix solidX(solidPatchFaceCentres.size(), 3);
matrix fluidXsolid(solidPatchFaceCentres.size(), 3);
matrix fluidX(fluidZoneFaceCentres.size(), 3);
// matrix solidX(solidPatchFaceCentres.size(), 3);
matrix fluidXsolid(solidPatchFaceCentres.size(), 3);
forAll(fluidZoneFaceCentres, faceI)
forAll(fluidZoneFaceCentres, faceI)
{
fluidX(faceI, 0) = fluidZoneFaceCentres[faceI].x();
fluidX(faceI, 1) = fluidZoneFaceCentres[faceI].y();
fluidX(faceI, 2) = fluidZoneFaceCentres[faceI].z();
}
// forAll(solidPatchFaceCentres, faceI)
// forAll(solidPatchFaceCentres, faceI)
// {
// solidX(faceI, 0) = solidPatchFaceCentres[faceI].x();
// solidX(faceI, 1) = solidPatchFaceCentres[faceI].y();
// solidX(faceI, 2) = solidPatchFaceCentres[faceI].z();
// }
// fluidToSolidPtr_->compute( fluidX, solidX );
fluidToSolidPtr_->interpolate( fluidX, fluidXsolid );
// fluidToSolidPtr_->compute(fluidX, solidX);
fluidToSolidPtr_->interpolate(fluidX, fluidXsolid);
vectorField fluidPatchFaceCentresAtSolid
vectorField fluidPatchFaceCentresAtSolid
(
solidPatchFaceCentres.size(),
vector::zero
);
forAll(fluidPatchFaceCentresAtSolid, faceI)
{
forAll(fluidPatchFaceCentresAtSolid, faceI)
{
fluidPatchFaceCentresAtSolid[faceI].x() = fluidXsolid(faceI, 0);
fluidPatchFaceCentresAtSolid[faceI].y() = fluidXsolid(faceI, 1);
fluidPatchFaceCentresAtSolid[faceI].z() = fluidXsolid(faceI, 2);
}
}
scalar maxDist = gMax
(
@ -515,14 +515,14 @@ void Foam::fluidSolidInterface::calcSolidToFluidInterpolator() const
}
std::shared_ptr<RBFFunctionInterface> rbfFunction;
rbfFunction = std::shared_ptr<RBFFunctionInterface>( new TPSFunction() );
rbfFunction = std::shared_ptr<RBFFunctionInterface>(new TPSFunction());
// std::shared_ptr<RBFInterpolation> rbf;
solidToFluidPtr_ =
std::shared_ptr<RBFInterpolation>
(
new RBFInterpolation( rbfFunction )
// new RBFInterpolation( rbfFunctionPtr_ )
new RBFInterpolation(rbfFunction)
// new RBFInterpolation(rbfFunctionPtr_)
);
vectorField solidZonePoints =
@ -548,7 +548,7 @@ void Foam::fluidSolidInterface::calcSolidToFluidInterpolator() const
solidX(faceI, 2) = solidZonePoints[faceI].z();
}
solidToFluidPtr_->compute( solidX, fluidX );
solidToFluidPtr_->compute(solidX, fluidX);
Info << "Checking solid-to-fluid interpolator" << endl;
{
@ -564,14 +564,14 @@ void Foam::fluidSolidInterface::calcSolidToFluidInterpolator() const
solidPoints(faceI, 2) = solidZonePoints[faceI].z();
}
solidToFluidPtr_->interpolate( solidPoints, fluidPoints );
solidToFluidPtr_->interpolate(solidPoints, fluidPoints);
forAll(fluidZonePoints, faceI)
{
forAll(fluidZonePoints, faceI)
{
fluidZonePointsInterp[faceI].x() = fluidPoints(faceI, 0);
fluidZonePointsInterp[faceI].y() = fluidPoints(faceI, 1);
fluidZonePointsInterp[faceI].z() = fluidPoints(faceI, 2);
}
}
scalar maxDist = gMax
(
@ -2026,24 +2026,24 @@ void Foam::fluidSolidInterface::updateForce()
{
Info << "... using RBF interpolation" << endl;
matrix fluidForce(fluidZoneTotalTraction.size(), 3);
matrix solidForce(solidZoneTotalTraction.size(), 3);
matrix fluidForce(fluidZoneTotalTraction.size(), 3);
matrix solidForce(solidZoneTotalTraction.size(), 3);
forAll(fluidZoneTotalTraction, faceI)
forAll(fluidZoneTotalTraction, faceI)
{
fluidForce(faceI, 0) = fluidZoneTotalTraction[faceI].x();
fluidForce(faceI, 1) = fluidZoneTotalTraction[faceI].y();
fluidForce(faceI, 2) = fluidZoneTotalTraction[faceI].z();
}
fluidToSolid()->interpolate( fluidForce, solidForce );
fluidToSolid()->interpolate(fluidForce, solidForce);
forAll(solidZoneTotalTraction, faceI)
{
forAll(solidZoneTotalTraction, faceI)
{
solidZoneTotalTraction[faceI].x() = -solidForce(faceI, 0);
solidZoneTotalTraction[faceI].y() = -solidForce(faceI, 1);
solidZoneTotalTraction[faceI].z() = -solidForce(faceI, 2);
}
}
}
else
{
@ -2723,41 +2723,41 @@ Foam::scalar Foam::fluidSolidInterface::updateResidual()
{
Info << "Displacement interpolation using RBF interpolation" << endl;
matrix fluidDispl(solidZonePointsDispl().size(), 3);
matrix solidDispl(solidZonePointsDisplAtSolid.size(), 3);
matrix fluidDispl(solidZonePointsDispl().size(), 3);
matrix solidDispl(solidZonePointsDisplAtSolid.size(), 3);
forAll(solidZonePointsDisplAtSolid, pointI)
forAll(solidZonePointsDisplAtSolid, pointI)
{
solidDispl(pointI, 0) = solidZonePointsDisplAtSolid[pointI].x();
solidDispl(pointI, 1) = solidZonePointsDisplAtSolid[pointI].y();
solidDispl(pointI, 2) = solidZonePointsDisplAtSolid[pointI].z();
}
solidToFluid()->interpolate( solidDispl, fluidDispl );
solidToFluid()->interpolate(solidDispl, fluidDispl);
forAll(solidZonePointsDispl(), pointI)
{
forAll(solidZonePointsDispl(), pointI)
{
solidZonePointsDispl()[pointI].x() = fluidDispl(pointI, 0);
solidZonePointsDispl()[pointI].y() = fluidDispl(pointI, 1);
solidZonePointsDispl()[pointI].z() = fluidDispl(pointI, 2);
}
}
// Total displacement
forAll(solidZonePointsTotDisplAtSolid, pointI)
forAll(solidZonePointsTotDisplAtSolid, pointI)
{
solidDispl(pointI, 0) = solidZonePointsTotDisplAtSolid[pointI].x();
solidDispl(pointI, 1) = solidZonePointsTotDisplAtSolid[pointI].y();
solidDispl(pointI, 2) = solidZonePointsTotDisplAtSolid[pointI].z();
}
solidToFluid()->interpolate( solidDispl, fluidDispl );
solidToFluid()->interpolate(solidDispl, fluidDispl);
forAll(solidZonePointsTotDispl, pointI)
{
forAll(solidZonePointsTotDispl, pointI)
{
solidZonePointsTotDispl[pointI].x() = fluidDispl(pointI, 0);
solidZonePointsTotDispl[pointI].y() = fluidDispl(pointI, 1);
solidZonePointsTotDispl[pointI].z() = fluidDispl(pointI, 2);
}
}
}
else
{

View file

@ -376,7 +376,7 @@ gradientBoundaryCoeffs() const
vectorField nGradU =
2
*(
*this
*this
- (patchInternalField() + dUP)
)*this->patch().deltaCoeffs()
- nGradUP;

View file

@ -339,7 +339,7 @@ gradientBoundaryCoeffs() const
vectorField nGradU =
2
*(
*this
*this
- (patchInternalField() + dUP)
)*this->patch().deltaCoeffs()
- nGradUP;

View file

@ -326,7 +326,7 @@ gradientBoundaryCoeffs() const
// vectorField nGradU =
// 2
// *(
// *this
// *this
// - (patchInternalField() + dUP)
// )*this->patch().deltaCoeffs()
// - nGradUP;

View file

@ -20,7 +20,7 @@ forAll(p_.boundaryField(), patchI)
(n&U_.boundaryField()[patchI])
/rUA.boundaryField()[patchI]
- phi_.boundaryField()[patchI]
/mesh.magSf().boundaryField()[patchI]
/mesh.magSf().boundaryField()[patchI]
/rUA.boundaryField()[patchI]
+ nGradUn_
/mesh.deltaCoeffs().boundaryField()[patchI]
@ -28,7 +28,7 @@ forAll(p_.boundaryField(), patchI)
phi_.boundaryField()[patchI] +=
pInterface.gradient()
*rUA.boundaryField()[patchI]
*mesh.magSf().boundaryField()[patchI];
*rUA.boundaryField()[patchI]
*mesh.magSf().boundaryField()[patchI];
}
}

View file

@ -17,36 +17,34 @@
*mesh.deltaCoeffs().boundaryField()[fsi.fluidPatchIndex()];
Info << "nGradUn, max: " << gMax(nGradUn_) << ", min: "
<< gMin(nGradUn_) << ", avg: " << gAverage(nGradUn_) << endl;
<< gMin(nGradUn_) << ", avg: " << gAverage(nGradUn_) << endl;
// bool secondOrderCorrection = true;
// bool secondOrderCorrection = true;
// if (secondOrderCorrection)
// {
// // Correct normal component of phiU
// // befor gradient calculation
// forAll(phiU.boundaryField(), patchI)
// {
// vectorField n =
// mesh().Sf().boundaryField()[patchI]
// /mesh().magSf().boundaryField()[patchI];
// if (secondOrderCorrection)
// {
// // Correct normal component of phiU
// // befor gradient calculation
// forAll(phiU.boundaryField(), patchI)
// {
// vectorField n =
// mesh().Sf().boundaryField()[patchI]
// /mesh().magSf().boundaryField()[patchI];
// phiU.boundaryField()[patchI] +=
// n
// *(
// (
// phi_.boundaryField()[patchI]
// /mesh().magSf().boundaryField()[patchI]
// )
// - (n&phiU.boundaryField()[patchI])
// );
// }
// phiU.boundaryField()[patchI] +=
// n
// *(
// (
// phi_.boundaryField()[patchI]
// /mesh().magSf().boundaryField()[patchI]
// )
// - (n&phiU.boundaryField()[patchI])
// );
// }
// // Calc gradient
// tensorField gradPhiUp =
// fvc::grad(phiU)().boundaryField()[aPatchID()]
// .patchInternalField();
// nGradUn() = 2*nGradUn() - (nA&(gradPhiUp&nA));
// }
// // Calc gradient
// tensorField gradPhiUp =
// fvc::grad(phiU)().boundaryField()[aPatchID()].patchInternalField();
// nGradUn() = 2*nGradUn() - (nA&(gradPhiUp&nA));
// }
}

View file

@ -199,8 +199,8 @@ public:
//- If the rheologyLaw needs plasticity procedures
virtual bool plasticityModelNeeded() const
{
return true;
};
return true;
};
//- Return modulus of plasticity
virtual tmp<volScalarField> Ep() const;

View file

@ -81,147 +81,156 @@ Foam::orthotropicLinearElastic::orthotropicLinearElastic
A44_( 2*Gxy_ ),
A55_( 2*Gyz_ ),
A66_( 2*Gzx_ ),
C_(
IOobject
(
"rheologyLawStoredC",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh(),
dimensionedSymmTensor4thOrder("zero", dimForce/dimArea,
symmTensor4thOrder(A11_.value(), A12_.value(), A31_.value(),
A22_.value(), A23_.value(),
A33_.value(),
A44_.value(),
A55_.value(),
A66_.value())
),
zeroGradientFvPatchSymmTensor4thOrderField::typeName
),
matDir_(
IOobject
(
"materialDirections",
mesh().time().timeName(),
mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh()
)
{
//- check material properties lie within physical constraints
//- ref Abaqus analysis user's manual orthotropic material
Info << "\tChecking physical constraints on the orthotropic material properties" << endl;
//- E and G should be greater than zero
if(Ex_.value() < 0.0 || Ey_.value() < 0.0 || Ez_.value() < 0.0
|| Gxy_.value() < 0.0 || Gyz_.value() < 0.0 || Gzx_.value() < 0.0)
{
FatalError << "Ex, Ey, Ez, Gxy, Gyz, Gzx should all be greater than zero!"
<< exit(FatalError);
}
//- restriction on Poisson's ratio
if(mag(nuxy_.value()) >= sqrt(Ex_.value()/Ey_.value())
|| mag(nuyz_.value()) >= sqrt(Ey_.value()/Ez_.value())
|| mag(nuzx_.value()) >= sqrt(Ez_.value()/Ex_.value()))
{
FatalError << "mag(nuij) should be less sqrt(Ei/Ej)"
<< exit(FatalError);
}
if( dimensionedScalar(1 - nuxy_*nuyx_ - nuyz_*nuzy_ - nuzx_*nuxz_ - 2*nuyx_*nuzy_*nuxz_).value() <= 0 )
{
FatalError << "(1 - nuxy*nuyx - nuyz*nuzy - nuzx*nuxz - 2*nuyx*nuzy*nuxz) should be greater than zero!"
<< exit(FatalError);
}
Info << "\tRotating local material properties to global coordinate system" << endl;
//- rotate tensors
volTensorField R
C_
(
IOobject
(
"R",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh(),
dimensionedTensor("zero", dimless, tensor::zero),
zeroGradientFvPatchTensorField::typeName
);
IOobject
(
"rheologyLawStoredC",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh(),
dimensionedSymmTensor4thOrder("zero", dimForce/dimArea,
symmTensor4thOrder
(
A11_.value(), A12_.value(), A31_.value(),
A22_.value(), A23_.value(),
A33_.value(),
A44_.value(),
A55_.value(),
A66_.value())
),
zeroGradientFvPatchSymmTensor4thOrderField::typeName
),
matDir_
(
IOobject
(
"materialDirections",
mesh().time().timeName(),
mesh(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh()
)
{
//- check material properties lie within physical constraints
//- ref Abaqus analysis user's manual orthotropic material
Info << "\tChecking physical constraints on the orthotropic material properties" << endl;
//- make sure matDir_ are unit directions
forAll(matDir_, celli)
//- E and G should be greater than zero
if
(
Ex_.value() < 0.0 || Ey_.value() < 0.0 || Ez_.value() < 0.0
|| Gxy_.value() < 0.0 || Gyz_.value() < 0.0 || Gzx_.value() < 0.0
)
{
{
scalar magVec =
mag(vector(matDir_[celli][0], matDir_[celli][1], matDir_[celli][2]));
matDir_[celli][0] /= magVec;
matDir_[celli][1] /= magVec;
matDir_[celli][2] /= magVec;
}
{
scalar magVec =
mag(vector(matDir_[celli][3], matDir_[celli][4], matDir_[celli][5]));
matDir_[celli][3] /= magVec;
matDir_[celli][4] /= magVec;
matDir_[celli][5] /= magVec;
}
{
scalar magVec =
mag(vector(matDir_[celli][6], matDir_[celli][7], matDir_[celli][8]));
matDir_[celli][6] /= magVec;
matDir_[celli][7] /= magVec;
matDir_[celli][8] /= magVec;
}
FatalError << "Ex, Ey, Ez, Gxy, Gyz, Gzx should all be greater than zero!"
<< exit(FatalError);
}
//- global axes
vector e0(1,0,0);
vector e1(0,1,0);
vector e2(0,0,1);
forAll(R, celli)
//- restriction on Poisson's ratio
if
(
mag(nuxy_.value()) >= sqrt(Ex_.value()/Ey_.value())
|| mag(nuyz_.value()) >= sqrt(Ey_.value()/Ez_.value())
|| mag(nuzx_.value()) >= sqrt(Ez_.value()/Ex_.value())
)
{
// R_ij = xold_i & xnew_i;
{
vector mD(matDir_[celli][0], matDir_[celli][1], matDir_[celli][2]);
R[celli][0] = e0 & mD;
R[celli][1] = e1 & mD;
R[celli][2] = e2 & mD;
}
{
vector mD(matDir_[celli][3], matDir_[celli][4], matDir_[celli][5]);
R[celli][3] = e0 & mD;
R[celli][4] = e1 & mD;
R[celli][5] = e2 & mD;
}
{
vector mD(matDir_[celli][6], matDir_[celli][7], matDir_[celli][8]);
R[celli][6] = e0 & mD;
R[celli][7] = e1 & mD;
R[celli][8] = e2 & mD;
}
FatalError << "mag(nuij) should be less sqrt(Ei/Ej)"
<< exit(FatalError);
}
//Info << "R is " << R.internalField() << endl;
R.correctBoundaryConditions();
//R.write();
if( dimensionedScalar(1 - nuxy_*nuyx_ - nuyz_*nuzy_ - nuzx_*nuxz_ - 2*nuyx_*nuzy_*nuxz_).value() <= 0 )
{
FatalError << "(1 - nuxy*nuyx - nuyz*nuzy - nuzx*nuxz - 2*nuyx*nuzy*nuxz) should be greater than zero!"
<< exit(FatalError);
}
//- rotate C to global corrdinate system
//Info << "C_ local is " << C_.internalField() << endl;
C_.correctBoundaryConditions();
C_ = transform(R, C_);
C_.correctBoundaryConditions();
//Info << "C_ global is " << C_.internalField() << endl;
Info << "\tRotating local material properties to global coordinate system" << endl;
//- rotate tensors
volTensorField R
(
IOobject
(
"R",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh(),
dimensionedTensor("zero", dimless, tensor::zero),
zeroGradientFvPatchTensorField::typeName
);
//- make sure matDir_ are unit directions
forAll(matDir_, celli)
{
{
scalar magVec =
mag(vector(matDir_[celli][0], matDir_[celli][1], matDir_[celli][2]));
matDir_[celli][0] /= magVec;
matDir_[celli][1] /= magVec;
matDir_[celli][2] /= magVec;
}
{
scalar magVec =
mag(vector(matDir_[celli][3], matDir_[celli][4], matDir_[celli][5]));
matDir_[celli][3] /= magVec;
matDir_[celli][4] /= magVec;
matDir_[celli][5] /= magVec;
}
{
scalar magVec =
mag(vector(matDir_[celli][6], matDir_[celli][7], matDir_[celli][8]));
matDir_[celli][6] /= magVec;
matDir_[celli][7] /= magVec;
matDir_[celli][8] /= magVec;
}
}
//- global axes
vector e0(1,0,0);
vector e1(0,1,0);
vector e2(0,0,1);
forAll(R, celli)
{
// R_ij = xold_i & xnew_i;
{
vector mD(matDir_[celli][0], matDir_[celli][1], matDir_[celli][2]);
R[celli][0] = e0 & mD;
R[celli][1] = e1 & mD;
R[celli][2] = e2 & mD;
}
{
vector mD(matDir_[celli][3], matDir_[celli][4], matDir_[celli][5]);
R[celli][3] = e0 & mD;
R[celli][4] = e1 & mD;
R[celli][5] = e2 & mD;
}
{
vector mD(matDir_[celli][6], matDir_[celli][7], matDir_[celli][8]);
R[celli][6] = e0 & mD;
R[celli][7] = e1 & mD;
R[celli][8] = e2 & mD;
}
}
//Info << "R is " << R.internalField() << endl;
R.correctBoundaryConditions();
//R.write();
//- rotate C to global corrdinate system
//Info << "C_ local is " << C_.internalField() << endl;
C_.correctBoundaryConditions();
C_ = transform(R, C_);
C_.correctBoundaryConditions();
//Info << "C_ global is " << C_.internalField() << endl;
}
@ -362,7 +371,7 @@ Foam::scalar Foam::orthotropicLinearElastic::sigmaY
const label cellID
) const
{
return GREAT;
return GREAT;
}
Foam::scalar Foam::orthotropicLinearElastic::dSigmaY
@ -371,13 +380,13 @@ Foam::scalar Foam::orthotropicLinearElastic::dSigmaY
const label cellID
) const
{
return 0;
return 0;
}
//Foam::tmp<Foam::volTensorField> Foam::orthotropicLinearElastic::K() const
Foam::tmp<Foam::volDiagTensorField> Foam::orthotropicLinearElastic::K() const
{
tmp<volDiagTensorField> tresult
tmp<volDiagTensorField> tresult
(
new volDiagTensorField
(
@ -395,34 +404,34 @@ Foam::tmp<Foam::volDiagTensorField> Foam::orthotropicLinearElastic::K() const
)
);
volDiagTensorField& K = tresult();
volDiagTensorField& K = tresult();
forAll(K, celli)
forAll(K, celli)
{
K[celli].xx() = C_[celli].xxxx();
K[celli].yy() = C_[celli].yyyy();
K[celli].zz() = C_[celli].zzzz();
}
tresult().correctBoundaryConditions();
tresult().correctBoundaryConditions();
return tresult;
return tresult;
}
Foam::tmp<Foam::volSymmTensor4thOrderField> Foam::orthotropicLinearElastic::C() const
{
tmp<volSymmTensor4thOrderField> tresult
tmp<volSymmTensor4thOrderField> tresult
(
new volSymmTensor4thOrderField
(
C_
)
C_
)
);
volSymmTensor4thOrderField& result = tresult();
volSymmTensor4thOrderField& result = tresult();
result.correctBoundaryConditions();
result.correctBoundaryConditions();
return tresult;
return tresult;
}
// ************************************************************************* //

View file

@ -59,66 +59,67 @@ Foam::dirichletNeumannFriction::dirichletNeumannFriction
const label slaveFaceZoneID
)
:
frictionContactModel(name, patch, dict, masterPatchID, slavePatchID, masterFaceZoneID, slaveFaceZoneID),
frictionContactModelDict_(dict.subDict(name+"FrictionModelDict")),
frictionLawPtr_(NULL),
mesh_(patch.boundaryMesh().mesh()),
slaveDisp_(mesh().boundaryMesh()[slavePatchID].size(), vector::zero),
slaveTraction_(mesh().boundaryMesh()[slavePatchID].size(), vector::zero),
slaveValueFrac_(mesh_.boundaryMesh()[slavePatchID].size(), symmTensor::zero),
//oldSlaveValueFrac_(mesh_.boundaryMesh()[slavePatchID].size(), symmTensor::zero),
relaxationFactor_(readScalar(frictionContactModelDict_.lookup("relaxationFactor"))),
contactIterNum_(0),
infoFreq_(readInt(frictionContactModelDict_.lookup("infoFrequency"))),
oscillationCorr_(frictionContactModelDict_.lookup("oscillationCorrection")),
oscillationCorrFac_(readScalar(frictionContactModelDict_.lookup("oscillationCorrectionFactor"))),
contactFilePtr_(NULL)
frictionContactModel(name, patch, dict, masterPatchID, slavePatchID, masterFaceZoneID, slaveFaceZoneID),
frictionContactModelDict_(dict.subDict(name+"FrictionModelDict")),
frictionLawPtr_(NULL),
mesh_(patch.boundaryMesh().mesh()),
slaveDisp_(mesh().boundaryMesh()[slavePatchID].size(), vector::zero),
slaveTraction_(mesh().boundaryMesh()[slavePatchID].size(), vector::zero),
slaveValueFrac_(mesh_.boundaryMesh()[slavePatchID].size(), symmTensor::zero),
//oldSlaveValueFrac_(mesh_.boundaryMesh()[slavePatchID].size(), symmTensor::zero),
relaxationFactor_(readScalar(frictionContactModelDict_.lookup("relaxationFactor"))),
contactIterNum_(0),
infoFreq_(readInt(frictionContactModelDict_.lookup("infoFrequency"))),
oscillationCorr_(frictionContactModelDict_.lookup("oscillationCorrection")),
oscillationCorrFac_(readScalar(frictionContactModelDict_.lookup("oscillationCorrectionFactor"))),
contactFilePtr_(NULL)
{
// create friction law
frictionLawPtr_ = frictionLaw::New(
frictionContactModelDict_.lookup("frictionLaw"),
frictionContactModelDict_
).ptr();
// create friction law
frictionLawPtr_ = frictionLaw::New
(
frictionContactModelDict_.lookup("frictionLaw"),
frictionContactModelDict_
).ptr();
// master proc open contact info file
if(Pstream::master())
// master proc open contact info file
if(Pstream::master())
{
word masterName = mesh_.boundary()[masterPatchID].name();
word slaveName = mesh_.boundary()[slavePatchID].name();
contactFilePtr_ = new OFstream(fileName("frictionContact_"+masterName+"_"+slaveName+".txt"));
OFstream& contactFile = *contactFilePtr_;
int width = 20;
contactFile << "time";
contactFile.width(width);
contactFile << "iterNum";
contactFile.width(width);
contactFile << "relaxationFactor";
contactFile.width(width);
contactFile << "slipFaces";
contactFile.width(width);
contactFile << "stickFaces";
contactFile.width(width);
contactFile << "maxMagSlaveTraction" << endl;
word masterName = mesh_.boundary()[masterPatchID].name();
word slaveName = mesh_.boundary()[slavePatchID].name();
contactFilePtr_ = new OFstream(fileName("frictionContact_"+masterName+"_"+slaveName+".txt"));
OFstream& contactFile = *contactFilePtr_;
int width = 20;
contactFile << "time";
contactFile.width(width);
contactFile << "iterNum";
contactFile.width(width);
contactFile << "relaxationFactor";
contactFile.width(width);
contactFile << "slipFaces";
contactFile.width(width);
contactFile << "stickFaces";
contactFile.width(width);
contactFile << "maxMagSlaveTraction" << endl;
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::dirichletNeumannFriction::correct
(
const vectorField& slavePressure,
const PrimitivePatch<face, List, pointField>& masterFaceZonePatch,
const PrimitivePatch<face, List, pointField>& slaveFaceZonePatch,
const intersection::algorithm alg,
const intersection::direction dir,
const word interpolationMethod,
const word fieldName,
const Switch orthotropic,
const word nonLinear,
const vectorField& slaveFaceNormals
)
{
void Foam::dirichletNeumannFriction::correct
(
const vectorField& slavePressure,
const PrimitivePatch<face, List, pointField>& masterFaceZonePatch,
const PrimitivePatch<face, List, pointField>& slaveFaceZonePatch,
const intersection::algorithm alg,
const intersection::direction dir,
const word interpolationMethod,
const word fieldName,
const Switch orthotropic,
const word nonLinear,
const vectorField& slaveFaceNormals
)
{
const fvMesh& mesh = mesh_;
const label slavePatchIndex = slavePatchID();
const label masterPatchIndex = masterPatchID();
@ -145,30 +146,30 @@ Foam::dirichletNeumannFriction::dirichletNeumannFriction
vectorField slaveDU = dispField.boundaryField()[slavePatchIndex];
if(fieldName == "U")
{
// lookup old U
const volVectorField& dispOldField =
mesh.objectRegistry::lookupObject<volVectorField>(fieldName+"_0");
{
// lookup old U
const volVectorField& dispOldField =
mesh.objectRegistry::lookupObject<volVectorField>(fieldName+"_0");
// subtract old U
masterDU -= dispOldField.boundaryField()[masterPatchIndex];
slaveDU -= dispOldField.boundaryField()[slavePatchIndex];
}
// subtract old U
masterDU -= dispOldField.boundaryField()[masterPatchIndex];
slaveDU -= dispOldField.boundaryField()[slavePatchIndex];
}
else if(fieldName != "DU")
{
FatalError << "iterativePenaltyFunction::correct()\n"
" The displacement field must be called U or DU"
<< exit(FatalError);
}
{
FatalError << "iterativePenaltyFunction::correct()\n"
" The displacement field must be called U or DU"
<< exit(FatalError);
}
// put local masterDU into globalMasterDU
const label masterPatchStart
= mesh.boundaryMesh()[masterPatchIndex].start();
const label masterPatchStart =
mesh.boundaryMesh()[masterPatchIndex].start();
forAll(masterDU, i)
{
globalMasterDU[mesh.faceZones()[masterFaceZoneID()].whichFace(masterPatchStart + i)] =
masterDU[i];
}
{
globalMasterDU[mesh.faceZones()[masterFaceZoneID()].whichFace(masterPatchStart + i)] =
masterDU[i];
}
//- exchange parallel data
reduce(globalMasterDU, sumOp<vectorField>()); // sum because each face is only on one proc
@ -177,82 +178,83 @@ Foam::dirichletNeumannFriction::dirichletNeumannFriction
// interpolate DU from master to slave using inverse distance or ggi
if(interpolationMethod == "patchToPatch")
{
PatchToPatchInterpolation<
PrimitivePatch<face, List, pointField>, PrimitivePatch<face, List, pointField>
> masterToSlavePatchToPatchInterpolator
(
masterFaceZonePatch, // from zone
slaveFaceZonePatch, // to zone
alg,
dir
);
globalMasterDUInterpToSlave =
masterToSlavePatchToPatchInterpolator.faceInterpolate<vector>
(
globalMasterDU
);
}
{
PatchToPatchInterpolation
<
PrimitivePatch<face, List, pointField>, PrimitivePatch<face, List, pointField>
> masterToSlavePatchToPatchInterpolator
(
masterFaceZonePatch, // from zone
slaveFaceZonePatch, // to zone
alg,
dir
);
globalMasterDUInterpToSlave =
masterToSlavePatchToPatchInterpolator.faceInterpolate<vector>
(
globalMasterDU
);
}
else if(interpolationMethod == "ggi")
{
GGIInterpolation<
PrimitivePatch< face, List, pointField >, PrimitivePatch< face, List, pointField >
> masterToSlaveGgiInterpolator
(
masterFaceZonePatch, // master zone
slaveFaceZonePatch, // slave zone
tensorField(0),
tensorField(0),
vectorField(0),
0.0,
0.0,
true,
ggiInterpolation::AABB
);
globalMasterDUInterpToSlave =
masterToSlaveGgiInterpolator.masterToSlave
(
globalMasterDU
);
}
{
GGIInterpolation
<
PrimitivePatch< face, List, pointField >, PrimitivePatch< face, List, pointField >
> masterToSlaveGgiInterpolator
(
masterFaceZonePatch, // master zone
slaveFaceZonePatch, // slave zone
tensorField(0),
tensorField(0),
vectorField(0),
0.0,
0.0,
true,
ggiInterpolation::AABB
);
globalMasterDUInterpToSlave =
masterToSlaveGgiInterpolator.masterToSlave
(
globalMasterDU
);
}
else
{
FatalError << "iterativePenaltyFunction::correct()\n"
"interpolationMethod " << interpolationMethod << " not known\n"
"interpolationMethod must be patchToPatch or ggi"
<< exit(FatalError);
}
{
FatalError << "iterativePenaltyFunction::correct()\n"
"interpolationMethod " << interpolationMethod << " not known\n"
"interpolationMethod must be patchToPatch or ggi"
<< exit(FatalError);
}
// now put global back into local
const label slavePatchStart
= mesh.boundaryMesh()[slavePatchIndex].start();
const label slavePatchStart =
mesh.boundaryMesh()[slavePatchIndex].start();
forAll(masterDUInterpToSlave, i)
{
masterDUInterpToSlave[i] =
globalMasterDUInterpToSlave
[
mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + i)
];
}
{
masterDUInterpToSlave[i] =
globalMasterDUInterpToSlave
[
mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + i)
];
}
// Now masterDUInterpToSlave should have masterDU interpolated to the slave
// calculate current slave shear traction
// calculate current slave shear traction
const fvPatch& slavePatch = mesh.boundary()[slavePatchIndex];
const fvPatchField<tensor>& gradField =
slavePatch.lookupPatchField<volTensorField, tensor>("grad("+fieldName+")");
slavePatch.lookupPatchField<volTensorField, tensor>("grad("+fieldName+")");
vectorField slaveShearTraction =
(I - sqr(slaveFaceNormals))
&
tractionBoundaryGradient().traction
(
gradField,
fieldName,
slavePatch,
orthotropic,
nonLinear
);
(I - sqr(slaveFaceNormals))
& tractionBoundaryGradient().traction
(
gradField,
fieldName,
slavePatch,
orthotropic,
nonLinear
);
// calculate slave shear displacement increments
@ -280,123 +282,122 @@ Foam::dirichletNeumannFriction::dirichletNeumannFriction
// so we make it a sticking face
const scalar maxMagSlavePressure = gMax(magSlavePressure);
forAll(magSlavePressure, faceI)
{
// there can only be a frictional tangential force when there is
// a positive pressure
// if(magSlavePressure[faceI] > SMALL)
if(magSlavePressure[faceI] > 1e-3*maxMagSlavePressure)
{
//scalar slipTrac = frictionCoeff_*magSlavePressure[faceI];
scalar slipTrac = frictionLawPtr_->slipTraction(magSlavePressure[faceI]);
{
// there can only be a frictional tangential force when there is
// a positive pressure
// if(magSlavePressure[faceI] > SMALL)
if(magSlavePressure[faceI] > 1e-3*maxMagSlavePressure)
{
//scalar slipTrac = frictionCoeff_*magSlavePressure[faceI];
scalar slipTrac = frictionLawPtr_->slipTraction(magSlavePressure[faceI]);
// slipping faces
if(mag(slaveShearTraction[faceI]) > (0.99*slipTrac) )
{
// direction of shear traction
vector tracDir = slaveShearTraction[faceI] / mag(slaveShearTraction[faceI]);
// slipping faces
if(mag(slaveShearTraction[faceI]) > (0.99*slipTrac) )
{
// direction of shear traction
vector tracDir = slaveShearTraction[faceI] / mag(slaveShearTraction[faceI]);
// slip is the difference between the master tangential DU and slave tangential DU
vector slip =
(I - sqr(slaveFaceNormals[faceI])) &
( slaveDU[faceI] - masterDUInterpToSlave[faceI]);
// slip is the difference between the master tangential DU and slave tangential DU
vector slip =
(I - sqr(slaveFaceNormals[faceI]))
& ( slaveDU[faceI] - masterDUInterpToSlave[faceI]);
// if the slip and dir are in the same direction then we will make this a
// sticking face
if((tracDir & slip) > SMALL)
{
//Info << "face " << faceI << " flipping direction" << endl;
numStickFaces++;
stickSlip[faceI] = 2;
// if the slip and dir are in the same direction then we will make this a
// sticking face
if((tracDir & slip) > SMALL)
{
//Info << "face " << faceI << " flipping direction" << endl;
numStickFaces++;
stickSlip[faceI] = 2;
// increment the slave shear displacement
// we add an increment of shear disp to the slave faces until there is no
// more slip
slaveDisp_[faceI] =
-1*relaxationFactor_ * slip;
// increment the slave shear displacement
// we add an increment of shear disp to the slave faces until there is no
// more slip
slaveDisp_[faceI] = -1*relaxationFactor_*slip;
// slaveDisp_[faceI] is the correction to the disp so we
// add on the original disp
slaveDisp_[faceI] += oldSlaveDisp[faceI];
// remove normal component
slaveDisp_[faceI] = (I-sqr(slaveFaceNormals[faceI])) & slaveDisp_[faceI];
// slaveDisp_[faceI] is the correction to the disp so we
// add on the original disp
slaveDisp_[faceI] += oldSlaveDisp[faceI];
// remove normal component
slaveDisp_[faceI] = (I-sqr(slaveFaceNormals[faceI])) & slaveDisp_[faceI];
// set slave valueFraction
slaveValueFrac_[faceI] =
relaxationFactor_*(I - sqr(slaveFaceNormals[faceI]))
+ (1.0 - relaxationFactor_)*slaveValueFrac_[faceI];
// set slave valueFraction
slaveValueFrac_[faceI] =
relaxationFactor_*(I - sqr(slaveFaceNormals[faceI]))
+ (1.0 - relaxationFactor_)*slaveValueFrac_[faceI];
// update traction as it is passed to the master
slaveTraction_[faceI] =
relaxationFactor_*slaveShearTraction[faceI]
+ (1-relaxationFactor_)*slaveTraction_[faceI];
}
// else we will limit the shear traction to slipTrac
else
{
numSlipFaces++;
stickSlip[faceI] = 1;
// update traction as it is passed to the master
slaveTraction_[faceI] =
relaxationFactor_*slaveShearTraction[faceI]
+ (1-relaxationFactor_)*slaveTraction_[faceI];
}
// else we will limit the shear traction to slipTrac
else
{
numSlipFaces++;
stickSlip[faceI] = 1;
// limit shear traction
slaveTraction_[faceI] =
relaxationFactor_*slipTrac*tracDir
+ (1-relaxationFactor_)*slaveTraction_[faceI];
// limit shear traction
slaveTraction_[faceI] =
relaxationFactor_*slipTrac*tracDir
+ (1-relaxationFactor_)*slaveTraction_[faceI];
// update slave disp although it is not used for this face
// while slipping
slaveDisp_[faceI] = (I-sqr(slaveFaceNormals[faceI])) & oldSlaveDisp[faceI];
// update slave disp although it is not used for this face
// while slipping
slaveDisp_[faceI] = (I-sqr(slaveFaceNormals[faceI])) & oldSlaveDisp[faceI];
// relax the slave valueFraction to zero
//slaveValueFrac_[faceI] = (1.0 - relaxationFactor_)*slaveValueFrac_[faceI];
slaveValueFrac_[faceI] = symmTensor::zero;
}
}
// sticking faces
else
{
numStickFaces++;
stickSlip[faceI] = 2;
// relax the slave valueFraction to zero
//slaveValueFrac_[faceI] = (1.0 - relaxationFactor_)*slaveValueFrac_[faceI];
slaveValueFrac_[faceI] = symmTensor::zero;
}
}
// sticking faces
else
{
numStickFaces++;
stickSlip[faceI] = 2;
// slip is the difference of the tangential DU between the master and slave
vector slip =
(I - sqr(slaveFaceNormals[faceI])) &
(slaveDU[faceI] - masterDUInterpToSlave[faceI]);
// slip is the difference of the tangential DU between the master and slave
vector slip =
(I - sqr(slaveFaceNormals[faceI]))
& (slaveDU[faceI] - masterDUInterpToSlave[faceI]);
// increment the slave shear displacement
// we add an increment of shear disp to the slave faces until there is no
// more slip
slaveDisp_[faceI] = -1*relaxationFactor_*slip;
// slaveDisp_[faceI] is the correction to the disp so we
// add on the original disp
slaveDisp_[faceI] += oldSlaveDisp[faceI];
// remove normal component
slaveDisp_[faceI] = (I-sqr(slaveFaceNormals[faceI])) & slaveDisp_[faceI];
// increment the slave shear displacement
// we add an increment of shear disp to the slave faces until there is no
// more slip
slaveDisp_[faceI] = -1*relaxationFactor_*slip;
// slaveDisp_[faceI] is the correction to the disp so we
// add on the original disp
slaveDisp_[faceI] += oldSlaveDisp[faceI];
// remove normal component
slaveDisp_[faceI] = (I-sqr(slaveFaceNormals[faceI])) & slaveDisp_[faceI];
// set slave valueFraction
slaveValueFrac_[faceI] =
relaxationFactor_*(I - sqr(slaveFaceNormals[faceI]))
+ (1.0 - relaxationFactor_)*slaveValueFrac_[faceI];
// set slave valueFraction
slaveValueFrac_[faceI] =
relaxationFactor_*(I - sqr(slaveFaceNormals[faceI]))
+ (1.0 - relaxationFactor_)*slaveValueFrac_[faceI];
// update traction as it is passed to the master
slaveTraction_[faceI] =
relaxationFactor_*slaveShearTraction[faceI]
+ (1-relaxationFactor_)*slaveTraction_[faceI];
}
}
// no friction if pressure is negative or zero
else
{
stickSlip[faceI] = 0;
// relax to zero
slaveTraction_[faceI] = (1.0 - relaxationFactor_)*slaveTraction_[faceI];
slaveValueFrac_[faceI] = (1.0 - relaxationFactor_)*slaveValueFrac_[faceI];
}
}
// update traction as it is passed to the master
slaveTraction_[faceI] =
relaxationFactor_*slaveShearTraction[faceI]
+ (1-relaxationFactor_)*slaveTraction_[faceI];
}
}
// no friction if pressure is negative or zero
else
{
stickSlip[faceI] = 0;
// relax to zero
slaveTraction_[faceI] = (1.0 - relaxationFactor_)*slaveTraction_[faceI];
slaveValueFrac_[faceI] = (1.0 - relaxationFactor_)*slaveValueFrac_[faceI];
}
}
// correct oscillations
if(oscillationCorr_)
{
correctOscillations(slaveFaceZonePatch);
}
{
correctOscillations(slaveFaceZonePatch);
}
// get global values
// in parallel, the log is poluted with warnings that
@ -412,28 +413,28 @@ Foam::dirichletNeumannFriction::dirichletNeumannFriction
// master writes to contact info file
if(Pstream::master() && (contactIterNum_ % infoFreq_ == 0))
{
OFstream& contactFile = *contactFilePtr_;
int width = 20;
contactFile << mesh.time().value();
contactFile.width(width);
contactFile << contactIterNum_;
contactFile.width(width);
contactFile << relaxationFactor_;
contactFile.width(width);
contactFile << numSlipFaces;
contactFile.width(width);
contactFile << numStickFaces;
contactFile.width(width);
contactFile << maxMagMasterTraction << endl;
}
}
{
OFstream& contactFile = *contactFilePtr_;
int width = 20;
contactFile << mesh.time().value();
contactFile.width(width);
contactFile << contactIterNum_;
contactFile.width(width);
contactFile << relaxationFactor_;
contactFile.width(width);
contactFile << numSlipFaces;
contactFile.width(width);
contactFile << numStickFaces;
contactFile.width(width);
contactFile << maxMagMasterTraction << endl;
}
}
void Foam::dirichletNeumannFriction::correctOscillations
(
const PrimitivePatch<face, List, pointField>& slaveFaceZonePatch
)
{
void Foam::dirichletNeumannFriction::correctOscillations
(
const PrimitivePatch<face, List, pointField>& slaveFaceZonePatch
)
{
// oscillations sometimes appear in contact shear displacements/tractions
// so we will try to limit them here
// we will weight the current face slaveDisp/Traction with the average of the
@ -451,17 +452,17 @@ Foam::dirichletNeumannFriction::dirichletNeumannFriction
vectorField globalSlaveDisp(slaveFaceZonePatch.size(), vector::zero);
// symmTensorField globalSlaveValueFrac(slaveFaceZonePatch.size(), symmTensor::zero);
scalarField globalStickSlip(slaveFaceZonePatch.size(), 0.0);
const label slavePatchStart
= mesh.boundaryMesh()[slavePatchIndex].start();
const label slavePatchStart =
mesh.boundaryMesh()[slavePatchIndex].start();
forAll(slaveTraction_, i)
{
// globalSlaveTraction[mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + i)] =
// slaveTraction_[i];
globalSlaveDisp[mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + i)] =
slaveDisp_[i];
globalStickSlip[mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + i)] =
stickSlip[i];
}
{
// globalSlaveTraction[mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + i)] =
// slaveTraction_[i];
globalSlaveDisp[mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + i)] =
slaveDisp_[i];
globalStickSlip[mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + i)] =
stickSlip[i];
}
// sum because each face is only on one proc
//reduce(globalSlaveTraction, sumOp<vectorField>());
reduce(globalSlaveDisp, sumOp<vectorField>());
@ -469,78 +470,78 @@ Foam::dirichletNeumannFriction::dirichletNeumannFriction
// smooth mag of slaveTraction with face face disps
forAll(faceFaces, facei)
{
// only smooth sticking faces
//if(mag(globalSlaveValueFrac[facei]) > SMALL)
if(mag(globalStickSlip[facei] - 2.0) < SMALL)
{
//vector avTrac = vector::zero;
vector avDisp = vector::zero;
int numNei = 0;
forAll(faceFaces[facei], ffi)
{
label faceFace = faceFaces[facei][ffi];
{
// only smooth sticking faces
//if(mag(globalSlaveValueFrac[facei]) > SMALL)
if(mag(globalStickSlip[facei] - 2.0) < SMALL)
{
//vector avTrac = vector::zero;
vector avDisp = vector::zero;
int numNei = 0;
forAll(faceFaces[facei], ffi)
{
label faceFace = faceFaces[facei][ffi];
// only include other sticking faces
if( mag(globalStickSlip[faceFace] - 2.0) < SMALL )
{
avDisp += globalSlaveDisp[faceFace];
numNei++;
}
}
// only include other sticking faces
if( mag(globalStickSlip[faceFace] - 2.0) < SMALL )
{
avDisp += globalSlaveDisp[faceFace];
numNei++;
}
}
// avTracMag /= numNei;
//avTrac /= numNei;
// if(numNei > 0)
if(numNei > 1)
{
avDisp /= numNei;
}
else
{
avDisp = globalSlaveDisp[facei];
}
// avTracMag /= numNei;
//avTrac /= numNei;
// if(numNei > 0)
if(numNei > 1)
{
avDisp /= numNei;
}
else
{
avDisp = globalSlaveDisp[facei];
}
// if(numFaceFaces == 1)
// {
// // for corner/end faces, decrease the weight of the neighbours
// avTracMag += globalSlaveTraction[facei];
// avTracMag /= 2;
// }
// if(numFaceFaces == 1)
// {
// // for corner/end faces, decrease the weight of the neighbours
// avTracMag += globalSlaveTraction[facei];
// avTracMag /= 2;
// }
// weighted-average with face-faces
// globalSlaveTraction[facei] =
// oscillationCorrFac_*globalSlaveTraction[facei] + (1.0-oscillationCorrFac_)*avTrac;
globalSlaveDisp[facei] =
oscillationCorrFac_*globalSlaveDisp[facei] + (1.0-oscillationCorrFac_)*avDisp;
}
}
// weighted-average with face-faces
// globalSlaveTraction[facei] =
// oscillationCorrFac_*globalSlaveTraction[facei] + (1.0-oscillationCorrFac_)*avTrac;
globalSlaveDisp[facei] =
oscillationCorrFac_*globalSlaveDisp[facei] + (1.0-oscillationCorrFac_)*avDisp;
}
}
// convert global back to local
forAll(slaveTraction_, facei)
{
// slaveTraction_[facei] =
// globalSlaveTraction
// [
// mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + facei)
// ];
slaveDisp_[facei] =
globalSlaveDisp
[
mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + facei)
];
}
{
// slaveTraction_[facei] =
// globalSlaveTraction
// [
// mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + facei)
// ];
slaveDisp_[facei] =
globalSlaveDisp
[
mesh.faceZones()[slaveFaceZoneID()].whichFace(slavePatchStart + facei)
];
}
//Pout << "\tdone" << endl;
}
}
void Foam::dirichletNeumannFriction::writeDict(Ostream& os) const
{
void Foam::dirichletNeumannFriction::writeDict(Ostream& os) const
{
word keyword(name()+"FrictionModelDict");
os.writeKeyword(keyword)
<< frictionContactModelDict_;
}
<< frictionContactModelDict_;
}
// ************************************************************************* //

View file

@ -24,40 +24,40 @@ fvMesh solidMesh
// if (isA<symmetryPolyPatch>(solidMesh.boundaryMesh()[patchI]))
// {
// const labelList& meshPoints =
// solidMesh.boundaryMesh()[patchI].meshPoints();
// solidMesh.boundaryMesh()[patchI].meshPoints();
// vector avgN =
// gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// vector avgN =
// gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// vector i(1, 0, 0);
// vector j(0, 1, 0);
// vector k(0, 0, 1);
// vector i(1, 0, 0);
// vector j(0, 1, 0);
// vector k(0, 0, 1);
// if (mag(avgN&i) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].x() = 0;
// }
// }
// else if (mag(avgN&j) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].y() = 0;
// }
// }
// else if (mag(avgN&k) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].z() = 0;
// }
// }
// if (mag(avgN&i) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].x() = 0;
// }
// }
// else if (mag(avgN&j) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].y() = 0;
// }
// }
// else if (mag(avgN&k) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].z() = 0;
// }
// }
// avgN = gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// avgN = gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// Pout << "avgN = " << avgN << endl;
// Pout << "avgN = " << avgN << endl;
// }
// }

View file

@ -24,40 +24,40 @@ fvMesh solidMesh
// if (isA<symmetryPolyPatch>(solidMesh.boundaryMesh()[patchI]))
// {
// const labelList& meshPoints =
// solidMesh.boundaryMesh()[patchI].meshPoints();
// solidMesh.boundaryMesh()[patchI].meshPoints();
// vector avgN =
// gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// vector avgN =
// gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// vector i(1, 0, 0);
// vector j(0, 1, 0);
// vector k(0, 0, 1);
// vector i(1, 0, 0);
// vector j(0, 1, 0);
// vector k(0, 0, 1);
// if (mag(avgN&i) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].x() = 0;
// }
// }
// else if (mag(avgN&j) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].y() = 0;
// }
// }
// else if (mag(avgN&k) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].z() = 0;
// }
// }
// if (mag(avgN&i) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].x() = 0;
// }
// }
// else if (mag(avgN&j) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].y() = 0;
// }
// }
// else if (mag(avgN&k) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].z() = 0;
// }
// }
// avgN = gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// avgN = gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// Pout << "avgN = " << avgN << endl;
// Pout << "avgN = " << avgN << endl;
// }
// }

View file

@ -22,40 +22,40 @@ fvMesh solidMesh
// if (isA<symmetryPolyPatch>(solidMesh.boundaryMesh()[patchI]))
// {
// const labelList& meshPoints =
// solidMesh.boundaryMesh()[patchI].meshPoints();
// solidMesh.boundaryMesh()[patchI].meshPoints();
// vector avgN =
// gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// vector avgN =
// gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// vector i(1, 0, 0);
// vector j(0, 1, 0);
// vector k(0, 0, 1);
// vector i(1, 0, 0);
// vector j(0, 1, 0);
// vector k(0, 0, 1);
// if (mag(avgN&i) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].x() = 0;
// }
// }
// else if (mag(avgN&j) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].y() = 0;
// }
// }
// else if (mag(avgN&k) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].z() = 0;
// }
// }
// if (mag(avgN&i) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].x() = 0;
// }
// }
// else if (mag(avgN&j) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].y() = 0;
// }
// }
// else if (mag(avgN&k) > 0.95)
// {
// forAll(meshPoints, pI)
// {
// newPoints[meshPoints[pI]].z() = 0;
// }
// }
// avgN = gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// avgN = gAverage(solidMesh.boundaryMesh()[patchI].pointNormals());
// Pout << "avgN = " << avgN << endl;
// Pout << "avgN = " << avgN << endl;
// }
// }

View file

@ -8,7 +8,7 @@
fvScalarMatrix iEqn
(
fvm::ddt(rho, i)
fvm::ddt(rho, i)
+ fvm::div(phi, i)
- fvm::laplacian(turbulence->alphaEff(), i)
==

View file

@ -420,7 +420,7 @@ void Foam::decompositionMethod::fixCyclics
) << "Fixed " << nFixedCyclics << " disconnected cyclic faces";
}
}
while (nFixedCyclics > 0);
while (nFixedCyclics > 0);
}

View file

@ -114,7 +114,7 @@ public:
//- Return the solid-body motion transformation septernion
virtual septernion transformation() const;
//- Return the solid-body motion velocity
//- Return the solid-body motion velocity
virtual septernion velocity() const;
//- Update properties from given dictionary

View file

@ -125,7 +125,7 @@ public:
//- Return the solid-body motion transformation septernion
virtual septernion transformation() const;
//- Return the solid-body motion velocity
//- Return the solid-body motion velocity
virtual septernion velocity() const;
//- Update properties from given dictionary

View file

@ -148,7 +148,7 @@ public:
//- Return the solid-body motion transformation septernion
virtual septernion transformation() const;
//- Return the solid-body motion velocity
//- Return the solid-body motion velocity
virtual septernion velocity() const;
//- Update properties from given dictionary

View file

@ -131,7 +131,7 @@ public:
//- Return the solid-body motion transformation septernion
virtual septernion transformation() const;
//- Return the solid-body motion velocity
//- Return the solid-body motion velocity
virtual septernion velocity() const;
//- Update properties from given dictionary

View file

@ -107,7 +107,7 @@ public:
//- Return the solid-body motion transformation septernion
virtual septernion transformation() const;
//- Return the solid-body motion velocity
//- Return the solid-body motion velocity
virtual septernion velocity() const;
//- Update properties from given dictionary

View file

@ -128,11 +128,11 @@ public:
// Access
//- Return reference to GGI patch
const ggiFvPatch& ggiPatch() const
{
return ggiPatch_;
}
//- Return reference to GGI patch
const ggiFvPatch& ggiPatch() const
{
return ggiPatch_;
}
//- Return shadow patch field
const ggiFvPatchField<Type>& shadowPatchField() const;

View file

@ -124,24 +124,23 @@ void jumpGgiFvPatchField<Type>::initInterfaceMatrixUpdate
scalarField sField(sfc.size());
if
(
reinterpret_cast<const void*>(&psiInternal)
reinterpret_cast<const void*>(&psiInternal)
== reinterpret_cast<const void*>(&this->internalField())
)
{
const scalarField jf = jump()().component(cmpt);
const scalarField jf = jump()().component(cmpt);
forAll (sField, i)
{
forAll (sField, i)
{
sField[i] = psiInternal[sfc[i]] + jf[i];
}
}
}
else
{
forAll (sField, i)
{
forAll (sField, i)
{
sField[i] = psiInternal[sfc[i]];
}
}
}
scalarField pnf = this->ggiPatch().interpolate(sField);

View file

@ -88,27 +88,27 @@ bool Foam::dlLibraryTable::open(const fileName& functionLibName)
// Capitan) with System Integrity Protection (SIP) enabled, let's try
// building a full path using well-known environment variables. This is
// the last resort, unless you provide the full pathname yourself.
if (!functionLibPtr)
{
if (!functionLibPtr)
{
fileName l_LIBBIN_Name =
getEnv("FOAM_LIBBIN")/osxFileName;
functionLibPtr =
dlopen(l_LIBBIN_Name.c_str(), RTLD_LAZY|RTLD_GLOBAL);
}
if (!functionLibPtr)
{
}
if (!functionLibPtr)
{
fileName l_SITE_LIBBIN_Name =
getEnv("FOAM_SITE_LIBBIN")/osxFileName;
functionLibPtr =
dlopen(l_SITE_LIBBIN_Name.c_str(), RTLD_LAZY|RTLD_GLOBAL);
}
if (!functionLibPtr)
{
}
if (!functionLibPtr)
{
fileName l_USER_LIBBIN_Name =
getEnv("FOAM_USER_LIBBIN")/osxFileName;
functionLibPtr =
dlopen(l_USER_LIBBIN_Name.c_str(), RTLD_LAZY|RTLD_GLOBAL);
}
}
#elif defined mingw
if(!functionLibPtr && functionLibName.ext()=="so") {
fileName lName=functionLibName.lessExt()+".dll";

View file

@ -111,8 +111,8 @@ public:
//- Construct from components
inline pengRobinson
(
const specie& sp
);
const specie& sp
);
//- Construct from Istream
pengRobinson(Istream&);

View file

@ -112,11 +112,11 @@ class constantHeatCapacity
scalar Cp0_;
//CL: molar values
scalar cp0_;
scalar e0_std;
scalar s0_std;
scalar integral_p_dv_std;
scalar integral_dpdT_dv_std;
scalar cp_std;
scalar e0_std;
scalar s0_std;
scalar integral_p_dv_std;
scalar integral_dpdT_dv_std;
scalar cp_std;
// Private member functions
@ -126,7 +126,7 @@ class constantHeatCapacity
(
const equationOfState& st,
const scalar cp0_
);
);
//- Construct from components
//CL: used for the operator*
@ -160,7 +160,7 @@ public:
// Member Functions
//- perfect Gas Enthalpy [J/kmol]
//- perfect Gas Enthalpy [J/kmol]
inline scalar h0(const scalar T) const;
//- perfect Gas Entropy [J/(kmol K)]
@ -179,7 +179,7 @@ public:
inline scalar cp(const scalar rho, const scalar T) const;
//- non Limited Heat capacity at constant pressure [J/(kmol K)]
inline scalar cp_nonLimited(const scalar rho, const scalar T) const;
inline scalar cp_nonLimited(const scalar rho, const scalar T) const;
//- Heat capacity at constant pressure [J/(kmol K)]
inline scalar cv(const scalar rho, const scalar T) const;

View file

@ -222,7 +222,6 @@ inline Foam::scalar Foam::constantHeatCapacity<equationOfState>::cv
(
const scalar rho,
const scalar T
) const
{
return this->cv0(T) + T*this->integral_d2pdT2_dv(rho, T);
@ -273,7 +272,6 @@ inline Foam::scalar Foam::constantHeatCapacity<equationOfState>::s
(
const scalar rho,
const scalar T
) const
{
return
@ -293,7 +291,6 @@ inline void Foam::constantHeatCapacity<equationOfState>::operator+=
const constantHeatCapacity<equationOfState>& np
)
{
scalar molr1 = this->nMoles();
equationOfState::operator+=(np);

View file

@ -18,86 +18,85 @@ convertToMeters 0.001;
vertices
(
(0 0 0) //0
(120 0 0) //1
(280 0 0) //2
(600 0 0) //3
(2500 0 0) //4
(0 120 0) //5
(120 120 0) //6
(280 120 0)//7
(600 120 0) //8
(2500 120 0) //9
(164.6447 164.6447 0)//10
(235.3553 164.6447 0)//11
(248.9898 190 0) //12
(299.5733 190 0) //13
(600 190 0) //14
(2500 190 0) //15
(164.6447 235.355 0) //16
(235.3553 235.355 0) //17
(248.9898 210 0) //18
(299.5733 210 0) //19
(600 210 0) //20
(2500 210 0) //21
(0 280 0) //22
(120 280 0) //23
(280 280 0)//24
(600 280 0) //25
(2500 280 0) //26
(0 410 0) //27
(120 410 0) //28
(280 410 0) //29
(600 410 0) //30
(2500 410 0) //31
(0 0 0) //0
(120 0 0) //1
(280 0 0) //2
(600 0 0) //3
(2500 0 0) //4
(0 120 0) //5
(120 120 0) //6
(280 120 0)//7
(600 120 0) //8
(2500 120 0) //9
(164.6447 164.6447 0)//10
(235.3553 164.6447 0)//11
(248.9898 190 0) //12
(299.5733 190 0) //13
(600 190 0) //14
(2500 190 0) //15
(164.6447 235.355 0) //16
(235.3553 235.355 0) //17
(248.9898 210 0) //18
(299.5733 210 0) //19
(600 210 0) //20
(2500 210 0) //21
(0 280 0) //22
(120 280 0) //23
(280 280 0)//24
(600 280 0) //25
(2500 280 0) //26
(0 410 0) //27
(120 410 0) //28
(280 410 0) //29
(600 410 0) //30
(2500 410 0) //31
(0 0 15) //32
(120 0 15) //33
(280 0 15) //34
(600 0 15) //35
(2500 0 15) //36
(0 120 15) //37
(120 120 15) //38
(280 120 15)//39
(600 120 15) //40
(2500 120 15) //41
(164.6447 164.6447 15)//42
(235.3553 164.6447 15)//43
(248.9898 190 15) //44
(299.5733 190 15) //45
(600 190 15) //46
(2500 190 15) //47
(164.6447 235.355 15) //48
(235.3553 235.355 15) //49
(248.9898 210 15) //50
(299.5733 210 15) //51
(600 210 15) //52
(2500 210 15) //53
(0 280 15) //54
(120 280 15) //55
(280 280 15)//56
(600 280 15) //57
(2500 280 15) //58
(0 410 15) //59
(120 410 15) //60
(280 410 15) //61
(600 410 15) //62
(2500 410 15) //63
(0 0 15) //32
(120 0 15) //33
(280 0 15) //34
(600 0 15) //35
(2500 0 15) //36
(0 120 15) //37
(120 120 15) //38
(280 120 15)//39
(600 120 15) //40
(2500 120 15) //41
(164.6447 164.6447 15)//42
(235.3553 164.6447 15)//43
(248.9898 190 15) //44
(299.5733 190 15) //45
(600 190 15) //46
(2500 190 15) //47
(164.6447 235.355 15) //48
(235.3553 235.355 15) //49
(248.9898 210 15) //50
(299.5733 210 15) //51
(600 210 15) //52
(2500 210 15) //53
(0 280 15) //54
(120 280 15) //55
(280 280 15)//56
(600 280 15) //57
(2500 280 15) //58
(0 410 15) //59
(120 410 15) //60
(280 410 15) //61
(600 410 15) //62
(2500 410 15) //63
(1000 0 0) //64
(1000 120 0) //65
(1000 190 0) //66
(1000 210 0) //67
(1000 280 0) //68
(1000 410 0) //69
(1000 0 15) //70
(1000 120 15) //71
(1000 190 15) //72
(1000 210 15) //73
(1000 280 15) //74
(1000 410 15) //75
(1000 0 0) //64
(1000 120 0) //65
(1000 190 0) //66
(1000 210 0) //67
(1000 280 0) //68
(1000 410 0) //69
(1000 0 15) //70
(1000 120 15) //71
(1000 190 15) //72
(1000 210 15) //73
(1000 280 15) //74
(1000 410 15) //75
);
blocks
@ -159,116 +158,114 @@ edges
arc 13 7 (288.2725 141.3043 0)
arc 45 39 (288.2725 141.3043 15)
);
patches
(
patch plate
(
(19 18 50 51)
(20 19 51 52)
(20 52 46 14)
(13 14 46 45)
(12 13 45 44)
)
patch plate
(
(19 18 50 51)
(20 19 51 52)
(20 52 46 14)
(13 14 46 45)
(12 13 45 44)
)
patch outlet
(
(63 31 26 58)
(58 26 21 53)
(53 21 15 47)
(47 15 9 41)
(41 9 4 36)
)
patch outlet
(
(63 31 26 58)
(58 26 21 53)
(53 21 15 47)
(47 15 9 41)
(41 9 4 36)
)
patch inlet
(
(27 59 54 22)
(22 54 37 5)
(5 37 32 0)
)
patch inlet
(
(27 59 54 22)
(22 54 37 5)
(5 37 32 0)
)
patch cylinder
(
(16 48 49 17)
(17 49 50 18)
(10 42 48 16)
(11 43 42 10)
(12 44 43 11)
)
patch cylinder
(
(16 48 49 17)
(17 49 50 18)
(10 42 48 16)
(11 43 42 10)
(12 44 43 11)
)
patch bottom
(
(1 0 32 33)
(2 1 33 34)
(3 2 34 35)
(64 3 35 70)
(4 64 70 36)
)
patch bottom
(
(1 0 32 33)
(2 1 33 34)
(3 2 34 35)
(64 3 35 70)
(4 64 70 36)
)
patch top
(
(27 28 60 59)
(28 29 61 60)
(29 30 62 61)
(30 69 75 62)
(69 31 63 75)
)
patch top
(
(27 28 60 59)
(28 29 61 60)
(29 30 62 61)
(30 69 75 62)
(69 31 63 75)
)
empty frontAndBackPlanes
(
(22 23 28 27)
(23 24 29 28)
(24 25 30 29)
(25 68 69 30)
(68 26 31 69)
(5 6 23 22)
(6 10 16 23)
(16 17 24 23)
(18 19 24 17)
(19 20 25 24)
(20 67 68 25)
(67 21 26 68)
(6 7 11 10)
(7 13 12 11)
(7 8 14 13)
(8 65 66 14)
(65 9 15 66)
(0 1 6 5)
(1 2 7 6)
(2 3 8 7)
(3 64 65 8)
(64 4 9 65)
(14 66 67 20)
(66 15 21 67)
(33 32 37 38)
(34 33 38 39)
(35 34 39 40)
(70 35 40 71)
(36 70 71 41)
(38 37 54 55)
(42 38 55 48)
(39 38 42 43)
(45 39 43 44)
(40 39 45 46)
(71 40 46 72)
(41 71 72 47)
(49 48 55 56)
(51 50 49 56)
(52 51 56 57)
(73 52 57 74)
(53 73 74 58)
(55 54 59 60)
(56 55 60 61)
(57 56 61 62)
(74 57 62 75)
(58 74 75 63)
(72 46 52 73)
(47 72 73 53)
)
empty frontAndBackPlanes
(
(22 23 28 27)
(23 24 29 28)
(24 25 30 29)
(25 68 69 30)
(68 26 31 69)
(5 6 23 22)
(6 10 16 23)
(16 17 24 23)
(18 19 24 17)
(19 20 25 24)
(20 67 68 25)
(67 21 26 68)
(6 7 11 10)
(7 13 12 11)
(7 8 14 13)
(8 65 66 14)
(65 9 15 66)
(0 1 6 5)
(1 2 7 6)
(2 3 8 7)
(3 64 65 8)
(64 4 9 65)
(14 66 67 20)
(66 15 21 67)
(33 32 37 38)
(34 33 38 39)
(35 34 39 40)
(70 35 40 71)
(36 70 71 41)
(38 37 54 55)
(42 38 55 48)
(39 38 42 43)
(45 39 43 44)
(40 39 45 46)
(71 40 46 72)
(41 71 72 47)
(49 48 55 56)
(51 50 49 56)
(52 51 56 57)
(73 52 57 74)
(53 73 74 58)
(55 54 59 60)
(56 55 60 61)
(57 56 61 62)
(74 57 62 75)
(58 74 75 63)
(72 46 52 73)
(47 72 73 53)
)
);
mergePatchPairs

View file

@ -18,86 +18,85 @@ convertToMeters 0.001;
vertices
(
(0 0 0) //0
(129.289 0 0) //1
(270.7106 0 0) //2
(600 0 0) //3
(2500 0 0) //4
(0 129.289 0) //5
(129.289 129.289 0) //6
(270.7106 129.289 0)//7
(600 129.289 0) //8
(2500 129.289 0) //9
(164.6447 164.6447 0)//10
(235.3553 164.6447 0)//11
(248.9898 190 0) //12
(299.4987 190 0) //13
(600 190 0) //14
(2500 190 0) //15
(164.6447 235.355 0) //16
(235.3553 235.355 0) //17
(248.9898 210 0) //18
(299.4987 210 0) //19
(600 210 0) //20
(2500 210 0) //21
(0 270.7107 0) //22
(129.289 270.7107 0) //23
(270.7106 270.7107 0)//24
(600 270.7107 0) //25
(2500 270.7107 0) //26
(0 410 0) //27
(129.289 410 0) //28
(270.7106 410 0) //29
(600 410 0) //30
(2500 410 0) //31
(0 0 0) //0
(129.289 0 0) //1
(270.7106 0 0) //2
(600 0 0) //3
(2500 0 0) //4
(0 129.289 0) //5
(129.289 129.289 0) //6
(270.7106 129.289 0)//7
(600 129.289 0) //8
(2500 129.289 0) //9
(164.6447 164.6447 0)//10
(235.3553 164.6447 0)//11
(248.9898 190 0) //12
(299.4987 190 0) //13
(600 190 0) //14
(2500 190 0) //15
(164.6447 235.355 0) //16
(235.3553 235.355 0) //17
(248.9898 210 0) //18
(299.4987 210 0) //19
(600 210 0) //20
(2500 210 0) //21
(0 270.7107 0) //22
(129.289 270.7107 0) //23
(270.7106 270.7107 0)//24
(600 270.7107 0) //25
(2500 270.7107 0) //26
(0 410 0) //27
(129.289 410 0) //28
(270.7106 410 0) //29
(600 410 0) //30
(2500 410 0) //31
(0 0 0.05067) //32
(129.289 0 0.05067) //33
(270.7106 0 0.05067) //34
(600 0 0.05067) //35
(2500 0 0.05067) //36
(0 129.289 0.05067) //37
(129.289 129.289 0.05067) //38
(270.7106 129.289 0.05067)//39
(600 129.289 0.05067) //40
(2500 129.289 0.05067) //41
(164.6447 164.6447 0.05067)//42
(235.3553 164.6447 0.05067)//43
(248.9898 190 0.05067) //44
(299.4987 190 0.05067) //45
(600 190 0.05067) //46
(2500 190 0.05067) //47
(164.6447 235.355 0.05067) //48
(235.3553 235.355 0.05067) //49
(248.9898 210 0.05067) //50
(299.4987 210 0.05067) //51
(600 210 0.05067) //52
(2500 210 0.05067) //53
(0 270.7107 0.05067) //54
(129.289 270.7107 0.05067) //55
(270.7106 270.7107 0.05067)//56
(600 270.7107 0.05067) //57
(2500 270.7107 0.05067) //58
(0 410 0.05067) //59
(129.289 410 0.05067) //60
(270.7106 410 0.05067) //61
(600 410 0.05067) //62
(2500 410 0.05067) //63
(0 0 0.05067) //32
(129.289 0 0.05067) //33
(270.7106 0 0.05067) //34
(600 0 0.05067) //35
(2500 0 0.05067) //36
(0 129.289 0.05067) //37
(129.289 129.289 0.05067) //38
(270.7106 129.289 0.05067)//39
(600 129.289 0.05067) //40
(2500 129.289 0.05067) //41
(164.6447 164.6447 0.05067)//42
(235.3553 164.6447 0.05067)//43
(248.9898 190 0.05067) //44
(299.4987 190 0.05067) //45
(600 190 0.05067) //46
(2500 190 0.05067) //47
(164.6447 235.355 0.05067) //48
(235.3553 235.355 0.05067) //49
(248.9898 210 0.05067) //50
(299.4987 210 0.05067) //51
(600 210 0.05067) //52
(2500 210 0.05067) //53
(0 270.7107 0.05067) //54
(129.289 270.7107 0.05067) //55
(270.7106 270.7107 0.05067)//56
(600 270.7107 0.05067) //57
(2500 270.7107 0.05067) //58
(0 410 0.05067) //59
(129.289 410 0.05067) //60
(270.7106 410 0.05067) //61
(600 410 0.05067) //62
(2500 410 0.05067) //63
(1000 0 0) //64
(1000 129.289 0) //65
(1000 190 0) //66
(1000 210 0) //67
(1000 270.7107 0) //68
(1000 410 0) //69
(1000 0 0.05067) //70
(1000 129.289 0.05067) //71
(1000 190 0.05067) //72
(1000 210 0.05067) //73
(1000 270.7107 0.05067) //74
(1000 410 0.05067) //75
(1000 0 0) //64
(1000 129.289 0) //65
(1000 190 0) //66
(1000 210 0) //67
(1000 270.7107 0) //68
(1000 410 0) //69
(1000 0 0.05067) //70
(1000 129.289 0.05067) //71
(1000 190 0.05067) //72
(1000 210 0.05067) //73
(1000 270.7107 0.05067) //74
(1000 410 0.05067) //75
);
blocks
@ -159,116 +158,114 @@ edges
arc 13 7 (286.6025 150 0)
arc 45 39 (286.6025 150 0.05067)
);
patches
(
patch plate
(
(19 18 50 51)
(12 13 45 44)
(20 19 51 52)
(13 14 46 45)
(20 52 46 14)
)
patch plate
(
(19 18 50 51)
(12 13 45 44)
(20 19 51 52)
(13 14 46 45)
(20 52 46 14)
)
patch outlet
(
(63 31 26 58)
(58 26 21 53)
(53 21 15 47)
(47 15 9 41)
(41 9 4 36)
)
patch outlet
(
(63 31 26 58)
(58 26 21 53)
(53 21 15 47)
(47 15 9 41)
(41 9 4 36)
)
patch inlet
(
(27 59 54 22)
(22 54 37 5)
(5 37 32 0)
)
patch inlet
(
(27 59 54 22)
(22 54 37 5)
(5 37 32 0)
)
patch cylinder
(
(16 48 49 17)
(17 49 50 18)
(10 42 48 16)
(11 43 42 10)
(12 44 43 11)
)
patch cylinder
(
(16 48 49 17)
(17 49 50 18)
(10 42 48 16)
(11 43 42 10)
(12 44 43 11)
)
patch bottom
(
(1 0 32 33)
(2 1 33 34)
(3 2 34 35)
(64 3 35 70)
(4 64 70 36)
)
patch bottom
(
(1 0 32 33)
(2 1 33 34)
(3 2 34 35)
(64 3 35 70)
(4 64 70 36)
)
patch top
(
(27 28 60 59)
(28 29 61 60)
(29 30 62 61)
(30 69 75 62)
(69 31 63 75)
)
patch top
(
(27 28 60 59)
(28 29 61 60)
(29 30 62 61)
(30 69 75 62)
(69 31 63 75)
)
empty frontAndBackPlanes
(
(22 23 28 27)
(23 24 29 28)
(24 25 30 29)
(25 68 69 30)
(68 26 31 69)
(5 6 23 22)
(6 10 16 23)
(16 17 24 23)
(18 19 24 17)
(19 20 25 24)
(20 67 68 25)
(67 21 26 68)
(6 7 11 10)
(7 13 12 11)
(7 8 14 13)
(8 65 66 14)
(65 9 15 66)
(0 1 6 5)
(1 2 7 6)
(2 3 8 7)
(3 64 65 8)
(64 4 9 65)
(14 66 67 20)
(66 15 21 67)
(33 32 37 38)
(34 33 38 39)
(35 34 39 40)
(70 35 40 71)
(36 70 71 41)
(38 37 54 55)
(42 38 55 48)
(39 38 42 43)
(45 39 43 44)
(40 39 45 46)
(71 40 46 72)
(41 71 72 47)
(49 48 55 56)
(51 50 49 56)
(52 51 56 57)
(73 52 57 74)
(53 73 74 58)
(55 54 59 60)
(56 55 60 61)
(57 56 61 62)
(74 57 62 75)
(58 74 75 63)
(72 46 52 73)
(47 72 73 53)
)
empty frontAndBackPlanes
(
(22 23 28 27)
(23 24 29 28)
(24 25 30 29)
(25 68 69 30)
(68 26 31 69)
(5 6 23 22)
(6 10 16 23)
(16 17 24 23)
(18 19 24 17)
(19 20 25 24)
(20 67 68 25)
(67 21 26 68)
(6 7 11 10)
(7 13 12 11)
(7 8 14 13)
(8 65 66 14)
(65 9 15 66)
(0 1 6 5)
(1 2 7 6)
(2 3 8 7)
(3 64 65 8)
(64 4 9 65)
(14 66 67 20)
(66 15 21 67)
(33 32 37 38)
(34 33 38 39)
(35 34 39 40)
(70 35 40 71)
(36 70 71 41)
(38 37 54 55)
(42 38 55 48)
(39 38 42 43)
(45 39 43 44)
(40 39 45 46)
(71 40 46 72)
(41 71 72 47)
(49 48 55 56)
(51 50 49 56)
(52 51 56 57)
(73 52 57 74)
(53 73 74 58)
(55 54 59 60)
(56 55 60 61)
(57 56 61 62)
(74 57 62 75)
(58 74 75 63)
(72 46 52 73)
(47 72 73 53)
)
);
mergePatchPairs

View file

@ -18,15 +18,15 @@ convertToMeters 0.001;
vertices
(
(248.9898 190 0) //0=12
(600 190 0) //1=14
(600 210 0) //2=20
(248.9898 210 0) //3=18
(248.9898 190 0) //0=12
(600 190 0) //1=14
(600 210 0) //2=20
(248.9898 210 0) //3=18
(248.9898 190 15) //4=44
(600 190 15) //5=46
(600 210 15) //6=52
(248.9898 210 15) //7=50
(248.9898 190 15) //4=44
(600 190 15) //5=46
(600 210 15) //6=52
(248.9898 210 15) //7=50
);
blocks
@ -40,24 +40,23 @@ edges
patches
(
patch plateFix
(
(3 7 4 0)
)
patch plateFix
(
(3 7 4 0)
)
patch plate
(
(3 2 6 7)
(6 2 1 5)
(1 0 4 5)
)
empty frontAndBackPlanes
(
(0 1 2 3)
(7 6 5 4)
)
patch plate
(
(3 2 6 7)
(6 2 1 5)
(1 0 4 5)
)
empty frontAndBackPlanes
(
(0 1 2 3)
(7 6 5 4)
)
);
mergePatchPairs

View file

@ -54,15 +54,15 @@ mixture CO2 1 44.01 73.773e5 304.13 49436.5054 -626.411601 5.30172524 0.
//CL: description of coefficients
// *********************************************************************************************************************** //
// Coefficient:
// CO2 --> Name
// CO2 --> Name
// 1
// 44.01 --> Molar Volume
// 77.773e5 --> critical pressure
// 304.13 --> critical temperatur
// 0.22394 --> acentric factor (not needed for redlich kwong)
// 467.6 --> critical density (only for aungier redlich kwong)
// 49436.5054 --> 2.849677801e-13 --> 7 heat capacity polynomial coefficent's
// .... --> two coefficent's for sutherlandTransport or for the constRealGasTransport model
// 839 --> perfect gas heat capacity Cp0 (J/kgK), needed for constantHeatCapacity
// 44.01 --> Molar Volume
// 77.773e5 --> critical pressure
// 304.13 --> critical temperatur
// 0.22394 --> acentric factor (not needed for redlich kwong)
// 467.6 --> critical density (only for aungier redlich kwong)
// 49436.5054 --> 2.849677801e-13 --> 7 heat capacity polynomial coefficent's
// .... --> two coefficent's for sutherlandTransport or for the constRealGasTransport model
// 839 --> perfect gas heat capacity Cp0 (J/kgK), needed for constantHeatCapacity
// *********************************************************************************************************************** //

View file

@ -23,12 +23,12 @@ solvers
tolerance 1e-14;
relTol 0.001;
smoother GaussSeidel;
minIter 4;
//maxIter 100;
minIter 4;
//maxIter 100;
cacheAgglomeration true;
nPreSweeps 1;
nPostSweeps 3;
nFinestSweeps 3;
nPreSweeps 1;
nPostSweeps 3;
nFinestSweeps 3;
nCellsInCoarsestLevel 20;
agglomerator faceAreaPair;
mergeLevels 1;

View file

@ -23,12 +23,12 @@ solvers
tolerance 1e-14;
relTol 0.001;
smoother GaussSeidel;
minIter 4;
//maxIter 100;
minIter 4;
//maxIter 100;
cacheAgglomeration true;
nPreSweeps 1;
nPostSweeps 3;
nFinestSweeps 3;
nPreSweeps 1;
nPostSweeps 3;
nFinestSweeps 3;
nCellsInCoarsestLevel 20;
agglomerator faceAreaPair;
mergeLevels 1;

View file

@ -23,8 +23,8 @@ solvers
tolerance 1e-14;
relTol 0.001;
smoother GaussSeidel;
minIter 4;
//maxIter 100;
minIter 4;
//maxIter 100;
cacheAgglomeration true;
nPreSweeps 1;
nPostSweeps 3;

View file

@ -54,15 +54,15 @@ mixture CO2 1 44.01 73.773e5 304.13 49436.5054 -626.411601 5.30172524 0.
//CL: description of coefficients
// *********************************************************************************************************************** //
// Coefficient:
// CO2 --> Name
// CO2 --> Name
// 1
// 44.01 --> Molar Volume
// 77.773e5 --> critical pressure
// 304.13 --> critical temperatur
// 0.22394 --> acentric factor (not needed for redlich kwong)
// 467.6 --> critical density (only for aungier redlich kwong)
// 49436.5054 --> 2.849677801e-13 --> 7 heat capacity polynomial coefficent's
// .... --> two coefficent's for sutherlandRealGasTransport or for the constRealGasTransport model
// 839 --> perfect gas heat capacity Cp0 (J/kgK), needed for constantHeatCapacity
// 44.01 --> Molar Volume
// 77.773e5 --> critical pressure
// 304.13 --> critical temperatur
// 0.22394 --> acentric factor (not needed for redlich kwong)
// 467.6 --> critical density (only for aungier redlich kwong)
// 49436.5054 --> 2.849677801e-13 --> 7 heat capacity polynomial coefficent's
// .... --> two coefficent's for sutherlandRealGasTransport or for the constRealGasTransport model
// 839 --> perfect gas heat capacity Cp0 (J/kgK), needed for constantHeatCapacity
// *********************************************************************************************************************** //

View file

@ -24,12 +24,12 @@ p
tolerance 1e-14;
relTol 0.001;
smoother GaussSeidel;
minIter 4;
//maxIter 100;
minIter 4;
//maxIter 100;
cacheAgglomeration true;
nPreSweeps 1;
nPostSweeps 3;
nFinestSweeps 3;
nPreSweeps 1;
nPostSweeps 3;
nFinestSweeps 3;
nCellsInCoarsestLevel 20;
agglomerator faceAreaPair;
mergeLevels 1;

View file

@ -24,14 +24,14 @@ boundaryField
GVINLET
{
type fixedValue;
value uniform 305.66;
value uniform 305.66;
}
GVOUTLET
{
type ggiEnthalpyJump;
patchType ggi;
patchType ggi;
rotating false;
value uniform 305.66;
value uniform 305.66;
}
GVCYCLIC
{
@ -52,16 +52,16 @@ boundaryField
RUINLET
{
type ggiEnthalpyJump;
patchType ggi;
rotating true;
value uniform 305.66;
patchType ggi;
rotating true;
value uniform 305.66;
}
RUOUTLET
{
type ggiEnthalpyJump;
patchType ggi;
rotating true;
value uniform 305.66;
patchType ggi;
rotating true;
value uniform 305.66;
}
RUCYCLIC1
{
@ -86,9 +86,9 @@ boundaryField
DTINLET
{
type ggiEnthalpyJump;
patchType ggi;
patchType ggi;
rotating false;
value uniform 305.66;
value uniform 305.66;
}
DTOUTLET
{

View file

@ -28,7 +28,7 @@ boundaryField
GVOUTLET
{
type ggi;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
GVCYCLIC
{
@ -52,12 +52,12 @@ boundaryField
RUINLET
{
type ggi;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
RUOUTLET
{
type ggi;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
RUCYCLIC1
{
@ -85,7 +85,7 @@ boundaryField
DTINLET
{
type ggi;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
DTOUTLET
{

View file

@ -24,14 +24,14 @@ boundaryField
GVINLET
{
type fixedValue;
value uniform 305.66;
value uniform 305.66;
}
GVOUTLET
{
type ggiEnthalpyJump;
patchType ggi;
patchType ggi;
rotating false;
value uniform 305.66;
value uniform 305.66;
}
GVCYCLIC
{
@ -52,16 +52,16 @@ boundaryField
RUINLET
{
type ggiEnthalpyJump;
patchType ggi;
rotating true;
value uniform 305.66;
patchType ggi;
rotating true;
value uniform 305.66;
}
RUOUTLET
{
type ggiEnthalpyJump;
patchType ggi;
rotating true;
value uniform 305.66;
patchType ggi;
rotating true;
value uniform 305.66;
}
RUCYCLIC1
{
@ -86,9 +86,9 @@ boundaryField
DTINLET
{
type ggiEnthalpyJump;
patchType ggi;
patchType ggi;
rotating false;
value uniform 305.66;
value uniform 305.66;
}
DTOUTLET
{

View file

@ -28,7 +28,7 @@ boundaryField
GVOUTLET
{
type ggi;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
GVCYCLIC
{
@ -52,12 +52,12 @@ boundaryField
RUINLET
{
type ggi;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
RUOUTLET
{
type ggi;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
RUCYCLIC1
{
@ -85,7 +85,7 @@ boundaryField
DTINLET
{
type ggi;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
DTOUTLET
{

View file

@ -22,7 +22,7 @@ ddtSchemes
// ddt(rho,U) steadyInertial phi rho 0.25;
ddt(rho,h) steadyState;
ddt(rho,i) steadyState;
ddt(rho,i) steadyState;
// ddt(rho,h) steadyInertial phi rho 0.25;
ddt(psi,p) steadyInertial phi rho 1;
// ddt(psi,p) steadyState;
@ -44,7 +44,7 @@ divSchemes
default none;
div(phi,U) Gauss upwind;
div(phi,h) Gauss upwind;
div(phi,i) Gauss upwind;
div(phi,i) Gauss upwind;
div(phid,p) Gauss upwind;
div(phi,k) Gauss upwind;
@ -74,10 +74,10 @@ snGradSchemes
mixingPlane
{
default areaAveraging;
U areaAveraging;
k fluxAveraging;
omega areaAveraging;
default areaAveraging;
U areaAveraging;
k fluxAveraging;
omega areaAveraging;
}
// ************************************************************************* //

View file

@ -57,7 +57,8 @@ solvers
tolerance 1e-7;
relTol 0.1;
}
T
T
{
solver smoothSolver;
smoother GaussSeidel;
@ -65,6 +66,7 @@ solvers
tolerance 1e-7;
relTol 0.1;
}
i
{
solver smoothSolver;
@ -97,9 +99,9 @@ relaxationFactors
U 0.1;
p 0.1;
h 0.1;
i 0.1;
i 0.1;
rho 0.1;
T 0.1;
T 0.1;
k 0.1;
epsilon 0.1;
@ -107,10 +109,10 @@ relaxationFactors
fieldBounds
{
p 50 1e8;
T 100 1000;
U 1000;
epsilon 0 1e6;
p 50 1e8;
T 100 1000;
U 1000;
epsilon 0 1e6;
}

View file

@ -28,7 +28,7 @@ boundaryField
GVOUTLET
{
type mixingPlane;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
GVCYCLIC
{
@ -52,12 +52,12 @@ boundaryField
RUINLET
{
type mixingPlane;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
RUOUTLET
{
type mixingPlane;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
RUCYCLIC1
{
@ -85,7 +85,7 @@ boundaryField
DTINLET
{
type mixingPlane;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
DTOUTLET
{

View file

@ -28,7 +28,7 @@ boundaryField
GVOUTLET
{
type mixingPlane;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
GVCYCLIC
{
@ -52,12 +52,12 @@ boundaryField
RUINLET
{
type mixingPlane;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
RUOUTLET
{
type mixingPlane;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
RUCYCLIC1
{
@ -85,7 +85,7 @@ boundaryField
DTINLET
{
type mixingPlane;
value uniform (0 0 -1);
value uniform (0 0 -1);
}
DTOUTLET
{

View file

@ -22,7 +22,7 @@ ddtSchemes
// ddt(rho,U) steadyInertial phi rho 0.25;
ddt(rho,h) steadyState;
ddt(rho,i) steadyState;
ddt(rho,i) steadyState;
// ddt(rho,h) steadyInertial phi rho 0.25;
ddt(psi,p) steadyInertial phi rho 1;
// ddt(psi,p) steadyState;
@ -44,7 +44,7 @@ divSchemes
default none;
div(phi,U) Gauss upwind;
div(phi,h) Gauss upwind;
div(phi,i) Gauss upwind;
div(phi,i) Gauss upwind;
div(phid,p) Gauss upwind;
div(phi,k) Gauss upwind;
@ -74,10 +74,10 @@ snGradSchemes
mixingPlane
{
default areaAveraging;
U areaAveraging;
k fluxAveraging;
omega areaAveraging;
default areaAveraging;
U areaAveraging;
k fluxAveraging;
omega areaAveraging;
}

View file

@ -1,76 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,i) Gauss limitedLinear 1;
div(phid,p) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div((nuEff*dev(grad(U).T()))) Gauss linear;
div((muEff*dev2(grad(U).T()))) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(muEff,U) Gauss linear corrected;
laplacian(alphaEff,i) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(U) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p;
}
mixingPlane
{
default areaAveraging;
//U fluxAveragingAdjustMassFlow;
//p zeroGradientAreaAveragingMix;
}
// ************************************************************************* //

View file

@ -47,7 +47,8 @@ solvers
tolerance 1e-7;
relTol 0.1;
}
T
T
{
solver smoothSolver;
smoother GaussSeidel;
@ -55,6 +56,7 @@ solvers
tolerance 1e-7;
relTol 0.1;
}
i
{
solver smoothSolver;
@ -87,9 +89,9 @@ relaxationFactors
U 0.1;
p 0.1;
h 0.1;
i 0.1;
i 0.1;
rho 0.1;
T 0.1;
T 0.1;
k 0.1;
epsilon 0.1;
@ -97,10 +99,10 @@ relaxationFactors
fieldBounds
{
p 50 1e8;
T 100 1000;
U 1000;
epsilon 0 1e6;
p 50 1e8;
T 100 1000;
U 1000;
epsilon 0 1e6;
}

View file

@ -40,7 +40,6 @@ boundaryField
deadCellValue 0;
value uniform 0;
}
input

View file

@ -23,13 +23,12 @@ immersedBoundarySolidBodyMotionFvMeshCoeffs
(
ibCylinder
{
solidBodyMotionFunction rotatingOscillation;
rotatingOscillationCoeffs
{
origin (0 0 0);
amplitude (0 0 14);
period 0.5;
origin (0 0 0);
amplitude (0 0 14);
period 0.5;
}
}
);

View file

@ -19,39 +19,39 @@ convertToMeters 1;
vertices
(
( -0.1 -0.2 0 )
( -0.015 -0.2 0 )
( 0.4 -0.2 0 )
( 0.5 -0.2 0 )
( -0.1 -0.05 0 )
( -0.015 -0.05 0 )
( 0.4 -0.05 0 )
( 0.5 -0.05 0 )
( -0.1 0.05 0 )
( -0.015 0.05 0 )
( 0.4 0.05 0 )
( 0.5 0.05 0 )
( -0.1 0.2 0 )
( -0.015 0.2 0 )
( 0.4 0.2 0 )
( 0.5 0.2 0 )
( -0.1 -0.2 0 )
( -0.015 -0.2 0 )
( 0.4 -0.2 0 )
( 0.5 -0.2 0 )
( -0.1 -0.05 0 )
( -0.015 -0.05 0 )
( 0.4 -0.05 0 )
( 0.5 -0.05 0 )
( -0.1 0.05 0 )
( -0.015 0.05 0 )
( 0.4 0.05 0 )
( 0.5 0.05 0 )
( -0.1 0.2 0 )
( -0.015 0.2 0 )
( 0.4 0.2 0 )
( 0.5 0.2 0 )
( -0.1 -0.2 0.001 )
( -0.015 -0.2 0.001 )
( 0.4 -0.2 0.001 )
( 0.5 -0.2 0.001 )
( -0.1 -0.05 0.001 )
( -0.015 -0.05 0.001 )
( 0.4 -0.05 0.001 )
( 0.5 -0.05 0.001 )
( -0.1 0.05 0.001 )
( -0.015 0.05 0.001 )
( 0.4 0.05 0.001 )
( 0.5 0.05 0.001 )
( -0.1 0.2 0.001 )
( -0.015 0.2 0.001 )
( 0.4 0.2 0.001 )
( 0.5 0.2 0.001 )
( -0.1 -0.2 0.001 )
( -0.015 -0.2 0.001 )
( 0.4 -0.2 0.001 )
( 0.5 -0.2 0.001 )
( -0.1 -0.05 0.001 )
( -0.015 -0.05 0.001 )
( 0.4 -0.05 0.001 )
( 0.5 -0.05 0.001 )
( -0.1 0.05 0.001 )
( -0.015 0.05 0.001 )
( 0.4 0.05 0.001 )
( 0.5 0.05 0.001 )
( -0.1 0.2 0.001 )
( -0.015 0.2 0.001 )
( 0.4 0.2 0.001 )
( 0.5 0.2 0.001 )
@ -61,15 +61,15 @@ vertices
blocks
(
hex ( 8 9 13 12 24 25 29 28 ) ( 44 54 1 ) simpleGrading ( 0.1111111111 14 1 )
hex ( 9 10 14 13 25 26 30 29 ) ( 830 54 1 ) simpleGrading ( 1 14 1 )
hex ( 10 11 15 14 26 27 31 30 ) ( 47 54 1 ) simpleGrading ( 10 14 1 )
hex ( 4 5 9 8 20 21 25 24 ) ( 44 200 1 ) simpleGrading ( 0.1111111111 1 1 )
hex ( 5 6 10 9 21 22 26 25 ) ( 830 200 1 ) simpleGrading ( 1 1 1 )
hex ( 6 7 11 10 22 23 27 26 ) ( 47 200 1 ) simpleGrading ( 10 1 1 )
hex ( 0 1 5 4 16 17 21 20 ) ( 44 76 1 ) simpleGrading ( 0.1111111111 0.1111111111 1 )
hex ( 1 2 6 5 17 18 22 21 ) ( 830 76 1 ) simpleGrading ( 1 0.1111111111 1 )
hex ( 2 3 7 6 18 19 23 22 ) ( 47 76 1 ) simpleGrading ( 10 0.1111111111 1 )
hex ( 8 9 13 12 24 25 29 28 ) ( 44 54 1 ) simpleGrading ( 0.1111111111 14 1 )
hex ( 9 10 14 13 25 26 30 29 ) ( 830 54 1 ) simpleGrading ( 1 14 1 )
hex ( 10 11 15 14 26 27 31 30 ) ( 47 54 1 ) simpleGrading ( 10 14 1 )
hex ( 4 5 9 8 20 21 25 24 ) ( 44 200 1 ) simpleGrading ( 0.1111111111 1 1 )
hex ( 5 6 10 9 21 22 26 25 ) ( 830 200 1 ) simpleGrading ( 1 1 1 )
hex ( 6 7 11 10 22 23 27 26 ) ( 47 200 1 ) simpleGrading ( 10 1 1 )
hex ( 0 1 5 4 16 17 21 20 ) ( 44 76 1 ) simpleGrading ( 0.1111111111 0.1111111111 1 )
hex ( 1 2 6 5 17 18 22 21 ) ( 830 76 1 ) simpleGrading ( 1 0.1111111111 1 )
hex ( 2 3 7 6 18 19 23 22 ) ( 47 76 1 ) simpleGrading ( 10 0.1111111111 1 )
);
@ -83,55 +83,55 @@ patches
patch input
(
( 0 16 20 4 )
( 4 20 24 8 )
( 8 24 28 12 )
( 0 16 20 4 )
( 4 20 24 8 )
( 8 24 28 12 )
)
patch output
(
( 19 3 7 23 )
( 23 7 11 27 )
( 27 11 15 31 )
( 19 3 7 23 )
( 23 7 11 27 )
( 27 11 15 31 )
)
wall fixedWalls
(
( 12 28 29 13 )
( 13 29 30 14 )
( 14 30 31 15 )
( 12 28 29 13 )
( 13 29 30 14 )
( 14 30 31 15 )
( 0 1 17 16 )
( 1 2 18 17 )
( 2 3 19 18 )
( 0 1 17 16 )
( 1 2 18 17 )
( 2 3 19 18 )
)
empty frontAndBack
(
( 0 4 5 1 )
( 1 5 6 2 )
( 2 6 7 3 )
( 4 8 9 5 )
( 5 9 10 6 )
( 6 10 11 7 )
( 8 12 13 9 )
( 9 13 14 10 )
( 10 14 15 11 )
( 0 4 5 1 )
( 1 5 6 2 )
( 2 6 7 3 )
( 4 8 9 5 )
( 5 9 10 6 )
( 6 10 11 7 )
( 8 12 13 9 )
( 9 13 14 10 )
( 10 14 15 11 )
( 16 17 21 20 )
( 17 18 22 21 )
( 18 19 23 22 )
( 20 21 25 24 )
( 21 22 26 25 )
( 22 23 27 26 )
( 24 25 29 28 )
( 25 26 30 29 )
( 26 27 31 30 )
( 16 17 21 20 )
( 17 18 22 21 )
( 18 19 23 22 )
( 20 21 25 24 )
( 21 22 26 25 )
( 22 23 27 26 )
( 24 25 29 28 )
( 25 26 30 29 )
( 26 27 31 30 )
)
@ -139,8 +139,8 @@ patches
mergePatchPairs
(
//(0 4 7 3)
//(1 5 6 2)
//(0 4 7 3)
//(1 5 6 2)
);
// ************************************************************************* //

View file

@ -17,38 +17,36 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
boundaryCellSize 4.5;
//keepCellsIntersectingBoundary 1;
maxCellSize 9;
//minCellSize 0.375;
boundaryCellSize 4.5;
//keepCellsIntersectingBoundary 1;
maxCellSize 9;
//minCellSize 0.375;
surfaceFile "socket.fms";
surfaceFile "socket.fms";
boundaryLayers
{
maxFirstLayerThickness 2.0;
nLayers 1;
thicknessRatio 1.2;
maxFirstLayerThickness 2.0;
nLayers 1;
thicknessRatio 1.2;
patchBoundaryLayers
{
patch7
{
allowDiscontinuity 0;
maxFirstLayerThickness 1.0;
nLayers 2;
thicknessRatio 1.1;
allowDiscontinuity 0;
maxFirstLayerThickness 1.0;
nLayers 2;
thicknessRatio 1.1;
}
}
}
localRefinement
{
patch15
{
additionalRefinementLevels 1;
additionalRefinementLevels 1;
}
subset1