Convert tabs to fours spaces systematically
This commit is contained in:
parent
3241862b6c
commit
8141282b1d
321 changed files with 8612 additions and 8598 deletions
|
@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
|
|||
}
|
||||
else if(divDSigmaExpMethod == "decompose")
|
||||
{
|
||||
surfaceTensorField shearGradDU =
|
||||
((I - n*n)&fvc::interpolate(gradDU));
|
||||
surfaceTensorField shearGradDU = ((I - n*n)&fvc::interpolate(gradDU));
|
||||
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
*(
|
||||
*
|
||||
(
|
||||
- (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
|
||||
+ lambdaf*tr(shearGradDU&(I - n*n))*n
|
||||
+ muf*(shearGradDU&n)
|
||||
|
|
|
@ -33,9 +33,13 @@ if(Pstream::parRun())
|
|||
label slaveID = contacts[contactI].slavePatch().index();
|
||||
|
||||
primitivePatchInterpolation masterInterpolator
|
||||
(mesh.boundaryMesh()[masterID]);
|
||||
(
|
||||
mesh.boundaryMesh()[masterID]
|
||||
);
|
||||
primitivePatchInterpolation slaveInterpolator
|
||||
(mesh.boundaryMesh()[slaveID]);
|
||||
(
|
||||
mesh.boundaryMesh()[slaveID]
|
||||
);
|
||||
|
||||
//- U must be interpolated to the vertices, this ignores the faceZone
|
||||
//- points with no U (unlike volPointInterpolation)
|
||||
|
@ -65,23 +69,17 @@ if(Pstream::parRun())
|
|||
{
|
||||
label pointGlobalLabel = masterPointLabels[pointI];
|
||||
newPoints[pointGlobalLabel] =
|
||||
oldMasterPoints[pointI]
|
||||
+
|
||||
correctMasterPointU[pointI];
|
||||
oldMasterPoints[pointI] + correctMasterPointU[pointI];
|
||||
}
|
||||
forAll(slavePointLabels, pointI)
|
||||
{
|
||||
label pointGlobalLabel = slavePointLabels[pointI];
|
||||
newPoints[pointGlobalLabel] =
|
||||
oldSlavePoints[pointI]
|
||||
+
|
||||
correctSlavePointU[pointI];
|
||||
oldSlavePoints[pointI] + correctSlavePointU[pointI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//***** NOW FIX AND SYNCHRONISE ALL THE FACEZONE POINTS *****//
|
||||
|
||||
forAll(mesh.faceZones(), faceZoneI)
|
||||
|
@ -117,8 +115,7 @@ if(Pstream::parRun())
|
|||
{
|
||||
label procPoint =
|
||||
mesh.faceZones()[faceZoneI]().meshPoints()[localPoint];
|
||||
globalFZnewPoints[globalPointI] =
|
||||
newPoints[procPoint];
|
||||
globalFZnewPoints[globalPointI] = newPoints[procPoint];
|
||||
pointNumProcs[globalPointI] = 1;
|
||||
}
|
||||
}
|
||||
|
@ -141,20 +138,16 @@ if(Pstream::parRun())
|
|||
forAll(globalFZnewPoints, globalPointI)
|
||||
{
|
||||
label localPoint = procToGlobalFZmap[faceZoneI][globalPointI];
|
||||
|
||||
procFZnewPoints[localPoint] =
|
||||
globalFZnewPoints[globalPointI];
|
||||
procFZnewPoints[localPoint] = globalFZnewPoints[globalPointI];
|
||||
}
|
||||
|
||||
//- now fix the newPoints points on the globalFaceZones
|
||||
labelList procFZmeshPoints =
|
||||
mesh.faceZones()[faceZoneI]().meshPoints();
|
||||
labelList procFZmeshPoints = mesh.faceZones()[faceZoneI]().meshPoints();
|
||||
|
||||
forAll(procFZmeshPoints, pointI)
|
||||
{
|
||||
label procPoint = procFZmeshPoints[pointI];
|
||||
newPoints[procPoint] =
|
||||
procFZnewPoints[pointI];
|
||||
newPoints[procPoint] = procFZnewPoints[pointI];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,9 @@ if(Pstream::parRun())
|
|||
|
||||
//- set all slave points to zero because only the master order is used
|
||||
if(!Pstream::master())
|
||||
{
|
||||
globalFZpoints *= 0.0;
|
||||
}
|
||||
|
||||
//- pass points to all procs
|
||||
reduce(globalFZpoints, sumOp<vectorField>());
|
||||
|
@ -93,6 +95,7 @@ if(Pstream::parRun())
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//- procToGlobalFZmap now contains the local FZpoint label for each
|
||||
//- global FZ point label - for each faceZone
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ solidInterface* solidInterfacePtr(NULL);
|
|||
solidInterfacePtr->modifyProperties(muf, lambdaf);
|
||||
gradDU = solidInterfacePtr->grad(DU);
|
||||
|
||||
//- solidInterface needs muf and lambdaf to be used for divSigmaExp
|
||||
//- solidInterface needs muf and lambdaf to be used for divDSigmaExp
|
||||
if(divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "decompose")
|
||||
{
|
||||
FatalError << "divDSigmaExp must be decompose or surface when solidInterface is on"
|
||||
|
|
|
@ -101,7 +101,9 @@ int main(int argc, char *argv[])
|
|||
//- reset DU to zero at the start of the time-step if
|
||||
//- a predictor is not required
|
||||
if(!predictor)
|
||||
{
|
||||
DU = dimensionedVector("zero", dimLength, vector::zero);
|
||||
}
|
||||
|
||||
do //- start of momentum loop
|
||||
{
|
||||
|
|
|
@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
|
|||
|
||||
pointInterpolation.interpolate(DU, pointDU);
|
||||
|
||||
const vectorField& pointDUI =
|
||||
pointDU.internalField();
|
||||
const vectorField& pointDUI = pointDU.internalField();
|
||||
|
||||
//- Move mesh
|
||||
vectorField newPoints = mesh.allPoints();
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
//- how explicit component of sigma is to be calculated
|
||||
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
|
||||
Info << divDSigmaExpMethod << " method chosen for calculation of sigmaExp" << endl;
|
||||
if(divDSigmaExpMethod != "standard" && divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "decompose" && divDSigmaExpMethod != "laplacian")
|
||||
if
|
||||
(
|
||||
divDSigmaExpMethod != "standard"
|
||||
&& divDSigmaExpMethod != "surface"
|
||||
&& divDSigmaExpMethod != "decompose"
|
||||
&& divDSigmaExpMethod != "laplacian"
|
||||
)
|
||||
{
|
||||
FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
|
||||
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"
|
||||
|
|
|
@ -44,6 +44,7 @@ if (runTime.outputTime())
|
|||
),
|
||||
tr(sigma)/3.0
|
||||
);
|
||||
|
||||
//- boundary surface pressure
|
||||
forAll(pressure.boundaryField(), patchi)
|
||||
{
|
||||
|
|
|
@ -69,5 +69,4 @@ FieldField<Field, vector> extraVecs(ptc.size());
|
|||
|
||||
curExtraVectors.setSize(nFacesAroundPoint);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -91,7 +91,8 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
|
||||
// Update coupled boundaries
|
||||
// Work-around for cyclic parallels.
|
||||
/*if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
|
||||
/*
|
||||
if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
|
||||
{
|
||||
forAll (volPointSumWeights.boundaryField(), patchI)
|
||||
{
|
||||
|
@ -111,7 +112,8 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
// Re-scale the weights for the current point
|
||||
forAll (ptc, pointI)
|
||||
|
|
|
@ -33,9 +33,13 @@ if(Pstream::parRun())
|
|||
label slaveID = contacts[contactI].slavePatch().index();
|
||||
|
||||
primitivePatchInterpolation masterInterpolator
|
||||
(mesh.boundaryMesh()[masterID]);
|
||||
(
|
||||
mesh.boundaryMesh()[masterID]
|
||||
);
|
||||
primitivePatchInterpolation slaveInterpolator
|
||||
(mesh.boundaryMesh()[slaveID]);
|
||||
(
|
||||
mesh.boundaryMesh()[slaveID]
|
||||
);
|
||||
|
||||
//- DU must be interpolated to the vertices, this ignores the faceZone
|
||||
//- points with no DU (unlike volPointInterpolation)
|
||||
|
@ -65,23 +69,17 @@ if(Pstream::parRun())
|
|||
{
|
||||
label pointGlobalLabel = masterPointLabels[pointI];
|
||||
newPoints[pointGlobalLabel] =
|
||||
oldMasterPoints[pointI]
|
||||
+
|
||||
correctMasterPointDU[pointI];
|
||||
oldMasterPoints[pointI] + correctMasterPointDU[pointI];
|
||||
}
|
||||
forAll(slavePointLabels, pointI)
|
||||
{
|
||||
label pointGlobalLabel = slavePointLabels[pointI];
|
||||
newPoints[pointGlobalLabel] =
|
||||
oldSlavePoints[pointI]
|
||||
+
|
||||
correctSlavePointDU[pointI];
|
||||
oldSlavePoints[pointI] + correctSlavePointDU[pointI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//***** NOW FIX AND SYNCHRONISE ALL THE FACEZONE POINTS *****//
|
||||
|
||||
forAll(mesh.faceZones(), faceZoneI)
|
||||
|
@ -117,8 +115,7 @@ if(Pstream::parRun())
|
|||
{
|
||||
label procPoint =
|
||||
mesh.faceZones()[faceZoneI]().meshPoints()[localPoint];
|
||||
globalFZnewPoints[globalPointI] =
|
||||
newPoints[procPoint];
|
||||
globalFZnewPoints[globalPointI] = newPoints[procPoint];
|
||||
pointNumProcs[globalPointI] = 1;
|
||||
}
|
||||
}
|
||||
|
@ -141,20 +138,16 @@ if(Pstream::parRun())
|
|||
forAll(globalFZnewPoints, globalPointI)
|
||||
{
|
||||
label localPoint = procToGlobalFZmap[faceZoneI][globalPointI];
|
||||
|
||||
procFZnewPoints[localPoint] =
|
||||
globalFZnewPoints[globalPointI];
|
||||
procFZnewPoints[localPoint] = globalFZnewPoints[globalPointI];
|
||||
}
|
||||
|
||||
//- now fix the newPoints points on the globalFaceZones
|
||||
labelList procFZmeshPoints =
|
||||
mesh.faceZones()[faceZoneI]().meshPoints();
|
||||
labelList procFZmeshPoints = mesh.faceZones()[faceZoneI]().meshPoints();
|
||||
|
||||
forAll(procFZmeshPoints, pointI)
|
||||
{
|
||||
label procPoint = procFZmeshPoints[pointI];
|
||||
newPoints[procPoint] =
|
||||
procFZnewPoints[pointI];
|
||||
newPoints[procPoint] = procFZnewPoints[pointI];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,9 @@ if(Pstream::parRun())
|
|||
|
||||
//- set all slave points to zero because only the master order is used
|
||||
if(!Pstream::master())
|
||||
{
|
||||
globalFZpoints *= 0.0;
|
||||
}
|
||||
|
||||
//- pass points to all procs
|
||||
reduce(globalFZpoints, sumOp<vectorField>());
|
||||
|
@ -93,8 +95,6 @@ if(Pstream::parRun())
|
|||
}
|
||||
}
|
||||
}
|
||||
//- procToGlobalFZmap now contains the local FZpoint label for each
|
||||
//- global FZ point label - for each faceZone
|
||||
|
||||
//- check what points are on the current proc patch
|
||||
pointOnLocalProcPatch[faceZoneI].setSize(globalFZpoints.size(), 0);
|
||||
|
|
|
@ -135,7 +135,6 @@ int main(int argc, char *argv[])
|
|||
fvm::laplacian(2*mu + lambda, DU, "laplacian(DDU,DU)")
|
||||
+ divDSigmaExp
|
||||
+ divDSigmaLargeStrainExp
|
||||
|
||||
);
|
||||
|
||||
solverPerf = DUEqn.solve();
|
||||
|
|
|
@ -41,8 +41,7 @@ if(min(J.internalField()) > 0)
|
|||
|
||||
//pointDU.write();
|
||||
|
||||
const vectorField& pointDUI =
|
||||
pointDU.internalField();
|
||||
const vectorField& pointDUI = pointDU.internalField();
|
||||
|
||||
// Move mesh
|
||||
vectorField newPoints = mesh.allPoints();
|
||||
|
|
|
@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
|
|||
|
||||
pointInterpolation.interpolate(DU, pointDU);
|
||||
|
||||
const vectorField& pointDUI =
|
||||
pointDU.internalField();
|
||||
const vectorField& pointDUI = pointDU.internalField();
|
||||
|
||||
//- Move mesh
|
||||
vectorField newPoints = mesh.allPoints();
|
||||
|
|
|
@ -7,7 +7,8 @@ pointVectorField& pf = pointDU;
|
|||
|
||||
// Do the correction
|
||||
//GeometricField<Type, pointPatchField, pointMesh> pfCorr
|
||||
/*pointVectorField pfCorr
|
||||
/*
|
||||
pointVectorField pfCorr
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
@ -23,7 +24,8 @@ pointVectorField& pf = pointDU;
|
|||
//dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero),
|
||||
dimensionedVector("zero", pf.dimensions(), vector::zero),
|
||||
pf.boundaryField().types()
|
||||
);*/
|
||||
);
|
||||
*/
|
||||
|
||||
pointVectorField pfCorr
|
||||
(
|
||||
|
@ -96,21 +98,25 @@ forAll (ptc, pointI)
|
|||
}
|
||||
|
||||
// Update coupled boundaries
|
||||
/*forAll (pfCorr.boundaryField(), patchI)
|
||||
/*
|
||||
forAll (pfCorr.boundaryField(), patchI)
|
||||
{
|
||||
if (pfCorr.boundaryField()[patchI].coupled())
|
||||
{
|
||||
pfCorr.boundaryField()[patchI].initAddField();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
/*forAll (pfCorr.boundaryField(), patchI)
|
||||
/*
|
||||
forAll (pfCorr.boundaryField(), patchI)
|
||||
{
|
||||
if (pfCorr.boundaryField()[patchI].coupled())
|
||||
{
|
||||
pfCorr.boundaryField()[patchI].addField(pfCorr.internalField());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//Info << "pfCorr: " << pfCorr << endl;
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
//- how explicit component of sigma is to be calculated
|
||||
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
|
||||
Info << divDSigmaExpMethod << " method chosen for calculation of DSigmaExp" << endl;
|
||||
if(divDSigmaExpMethod != "standard" && divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "decompose" && divDSigmaExpMethod != "laplacian")
|
||||
if
|
||||
(
|
||||
divDSigmaExpMethod != "standard"
|
||||
&& divDSigmaExpMethod != "surface"
|
||||
&& divDSigmaExpMethod != "decompose"
|
||||
&& divDSigmaExpMethod != "laplacian"
|
||||
)
|
||||
{
|
||||
FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
|
||||
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"
|
||||
|
|
|
@ -17,8 +17,7 @@ if(divSigmaExpMethod == "standard")
|
|||
}
|
||||
else if(divSigmaExpMethod == "decompose")
|
||||
{
|
||||
surfaceTensorField shearGradU =
|
||||
((I - n*n)&fvc::interpolate(gradU));
|
||||
surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradU));
|
||||
|
||||
divSigmaExp = fvc::div
|
||||
(
|
||||
|
|
|
@ -33,9 +33,13 @@ if(Pstream::parRun())
|
|||
label slaveID = contacts[contactI].slavePatch().index();
|
||||
|
||||
primitivePatchInterpolation masterInterpolator
|
||||
(mesh.boundaryMesh()[masterID]);
|
||||
(
|
||||
mesh.boundaryMesh()[masterID]
|
||||
);
|
||||
primitivePatchInterpolation slaveInterpolator
|
||||
(mesh.boundaryMesh()[slaveID]);
|
||||
(
|
||||
mesh.boundaryMesh()[slaveID]
|
||||
);
|
||||
|
||||
//- U must be interpolated to the vertices, this ignores the faceZone
|
||||
//- points with no U (unlike volPointInterpolation)
|
||||
|
@ -65,23 +69,17 @@ if(Pstream::parRun())
|
|||
{
|
||||
label pointGlobalLabel = masterPointLabels[pointI];
|
||||
newPoints[pointGlobalLabel] =
|
||||
oldMasterPoints[pointI]
|
||||
+
|
||||
correctMasterPointU[pointI];
|
||||
oldMasterPoints[pointI] + correctMasterPointU[pointI];
|
||||
}
|
||||
forAll(slavePointLabels, pointI)
|
||||
{
|
||||
label pointGlobalLabel = slavePointLabels[pointI];
|
||||
newPoints[pointGlobalLabel] =
|
||||
oldSlavePoints[pointI]
|
||||
+
|
||||
correctSlavePointU[pointI];
|
||||
oldSlavePoints[pointI] + correctSlavePointU[pointI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//***** NOW FIX AND SYNCHRONISE ALL THE FACEZONE POINTS *****//
|
||||
|
||||
forAll(mesh.faceZones(), faceZoneI)
|
||||
|
@ -117,8 +115,7 @@ if(Pstream::parRun())
|
|||
{
|
||||
label procPoint =
|
||||
mesh.faceZones()[faceZoneI]().meshPoints()[localPoint];
|
||||
globalFZnewPoints[globalPointI] =
|
||||
newPoints[procPoint];
|
||||
globalFZnewPoints[globalPointI] = newPoints[procPoint];
|
||||
pointNumProcs[globalPointI] = 1;
|
||||
}
|
||||
}
|
||||
|
@ -141,20 +138,16 @@ if(Pstream::parRun())
|
|||
forAll(globalFZnewPoints, globalPointI)
|
||||
{
|
||||
label localPoint = procToGlobalFZmap[faceZoneI][globalPointI];
|
||||
|
||||
procFZnewPoints[localPoint] =
|
||||
globalFZnewPoints[globalPointI];
|
||||
procFZnewPoints[localPoint] = globalFZnewPoints[globalPointI];
|
||||
}
|
||||
|
||||
//- now fix the newPoints points on the globalFaceZones
|
||||
labelList procFZmeshPoints =
|
||||
mesh.faceZones()[faceZoneI]().meshPoints();
|
||||
labelList procFZmeshPoints = mesh.faceZones()[faceZoneI]().meshPoints();
|
||||
|
||||
forAll(procFZmeshPoints, pointI)
|
||||
{
|
||||
label procPoint = procFZmeshPoints[pointI];
|
||||
newPoints[procPoint] =
|
||||
procFZnewPoints[pointI];
|
||||
newPoints[procPoint] = procFZnewPoints[pointI];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,9 @@ if(Pstream::parRun())
|
|||
|
||||
//- set all slave points to zero because only the master order is used
|
||||
if(!Pstream::master())
|
||||
{
|
||||
globalFZpoints *= 0.0;
|
||||
}
|
||||
|
||||
//- pass points to all procs
|
||||
reduce(globalFZpoints, sumOp<vectorField>());
|
||||
|
@ -93,8 +95,6 @@ if(Pstream::parRun())
|
|||
}
|
||||
}
|
||||
}
|
||||
//- procToGlobalFZmap now contains the local FZpoint label for each
|
||||
//- global FZ point label - for each faceZone
|
||||
|
||||
//- check what points are on the current proc patch
|
||||
pointOnLocalProcPatch[faceZoneI].setSize(globalFZpoints.size(), 0);
|
||||
|
|
|
@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
|
|||
|
||||
pointInterpolation.interpolate(DU, pointDU);
|
||||
|
||||
const vectorField& pointDUI =
|
||||
pointDU.internalField();
|
||||
const vectorField& pointDUI = pointDU.internalField();
|
||||
|
||||
//- Move mesh
|
||||
vectorField newPoints = mesh.allPoints();
|
||||
|
|
|
@ -17,8 +17,7 @@ if(divSigmaExpMethod == "standard")
|
|||
}
|
||||
else if(divSigmaExpMethod == "decompose")
|
||||
{
|
||||
surfaceTensorField shearGradU =
|
||||
((I - n*n)&fvc::interpolate(gradU));
|
||||
surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradU));
|
||||
|
||||
divSigmaExp = fvc::div
|
||||
(
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
//- how explicit component of sigma is to be calculated
|
||||
word divSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divSigmaExp"));
|
||||
Info << "Selecting divSigmaExp calculation method " << divSigmaExpMethod << endl;
|
||||
if(divSigmaExpMethod != "standard" && divSigmaExpMethod != "surface" && divSigmaExpMethod != "decompose" && divSigmaExpMethod != "laplacian")
|
||||
if
|
||||
(
|
||||
divSigmaExpMethod != "standard"
|
||||
&& divSigmaExpMethod != "surface"
|
||||
&& divSigmaExpMethod != "decompose"
|
||||
&& divSigmaExpMethod != "laplacian"
|
||||
)
|
||||
{
|
||||
FatalError << "divSigmaExp method " << divSigmaExpMethod << " not found!" << nl
|
||||
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"
|
||||
|
|
|
@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
|
|||
}
|
||||
else if(divDSigmaExpMethod == "decompose")
|
||||
{
|
||||
surfaceTensorField shearGradDU =
|
||||
((I - n*n)&fvc::interpolate(gradDU));
|
||||
surfaceTensorField shearGradDU = ((I - n*n)&fvc::interpolate(gradDU));
|
||||
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
*(
|
||||
*
|
||||
(
|
||||
- (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
|
||||
+ lambdaf*tr(shearGradDU&(I - n*n))*n
|
||||
+ muf*(shearGradDU&n)
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
//- how explicit component of sigma is to be calculated
|
||||
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
|
||||
Info << "Selecting divDSigmaExp calculation method " << divDSigmaExpMethod << endl;
|
||||
if(divDSigmaExpMethod != "standard" && divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "decompose" && divDSigmaExpMethod != "laplacian")
|
||||
if
|
||||
(
|
||||
divDSigmaExpMethod != "standard"
|
||||
&& divDSigmaExpMethod != "surface"
|
||||
&& divDSigmaExpMethod != "decompose"
|
||||
&& divDSigmaExpMethod != "laplacian"
|
||||
)
|
||||
{
|
||||
FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
|
||||
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"
|
||||
|
|
|
@ -7,9 +7,10 @@ if(leftPatchID == -1)
|
|||
}
|
||||
|
||||
//- calculate force in x direction on leftClamp patch
|
||||
scalar leftForce = gSum(
|
||||
vector(1, 0, 0) &
|
||||
(mesh.boundary()[leftPatchID].Sf() & sigma.boundaryField()[leftPatchID])
|
||||
scalar leftForce = gSum
|
||||
(
|
||||
vector(1, 0, 0)
|
||||
& (mesh.boundary()[leftPatchID].Sf() & sigma.boundaryField()[leftPatchID])
|
||||
);
|
||||
|
||||
//- patchIntegrate utility integrates it this way but this is worng because the sigma tensor should
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{
|
||||
forAll(mesh.boundary(), patchID)
|
||||
{
|
||||
if(U.boundaryField()[patchID].type()
|
||||
if
|
||||
(
|
||||
U.boundaryField()[patchID].type()
|
||||
== solidDirectionMixedFvPatchVectorField::typeName
|
||||
)
|
||||
{
|
||||
|
|
|
@ -83,7 +83,8 @@ int main(int argc, char *argv[])
|
|||
fvm::d2dt2(rho, U)
|
||||
==
|
||||
fvm::laplacian(2*mu + lambda, U, "laplacian(DU,U)")
|
||||
+ fvc::div(
|
||||
+ fvc::div
|
||||
(
|
||||
- ( (mu + lambda) * gradU )
|
||||
+ ( mu * gradU.T() )
|
||||
+ ( mu * (gradU & gradU.T()) )
|
||||
|
|
|
@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
|
|||
|
||||
pointInterpolation.interpolate(U, pointU);
|
||||
|
||||
const vectorField& pointUI =
|
||||
pointU.internalField();
|
||||
const vectorField& pointUI = pointU.internalField();
|
||||
|
||||
//- Move mesh
|
||||
vectorField newPoints = mesh.allPoints();
|
||||
|
|
|
@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
|
|||
}
|
||||
else if(divDSigmaExpMethod == "decompose")
|
||||
{
|
||||
surfaceTensorField shearGradDU =
|
||||
((I - n*n)&fvc::interpolate(gradDU));
|
||||
surfaceTensorField shearGradDU = ((I - n*n)&fvc::interpolate(gradDU));
|
||||
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
*(
|
||||
*
|
||||
(
|
||||
- (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
|
||||
+ lambdaf*tr(shearGradDU&(I - n*n))*n
|
||||
+ muf*(shearGradDU&n)
|
||||
|
|
|
@ -69,5 +69,4 @@ FieldField<Field, vector> extraVecs(ptc.size());
|
|||
|
||||
curExtraVectors.setSize(nFacesAroundPoint);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -91,7 +91,8 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
|
||||
// Update coupled boundaries
|
||||
// Work-around for cyclic parallels.
|
||||
/*if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
|
||||
/*
|
||||
if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
|
||||
{
|
||||
forAll (volPointSumWeights.boundaryField(), patchI)
|
||||
{
|
||||
|
@ -111,7 +112,8 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
// Re-scale the weights for the current point
|
||||
forAll (ptc, pointI)
|
||||
|
|
|
@ -38,8 +38,7 @@ if(min(J.internalField()) > 0)
|
|||
//- that class no longer works
|
||||
# include "performEdgeCorrectedVolPointInterpolation.H"
|
||||
|
||||
const vectorField& pointDUI =
|
||||
pointDU.internalField();
|
||||
const vectorField& pointDUI = pointDU.internalField();
|
||||
|
||||
//- see the effect of correctBCs
|
||||
|
||||
|
|
|
@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
|
|||
|
||||
pointInterpolation.interpolate(DU, pointDU);
|
||||
|
||||
const vectorField& pointDUI =
|
||||
pointDU.internalField();
|
||||
const vectorField& pointDUI = pointDU.internalField();
|
||||
|
||||
//- Move mesh
|
||||
vectorField newPoints = mesh.allPoints();
|
||||
|
|
|
@ -7,7 +7,8 @@ pointVectorField& pf = pointDU;
|
|||
|
||||
// Do the correction
|
||||
//GeometricField<Type, pointPatchField, pointMesh> pfCorr
|
||||
/*pointVectorField pfCorr
|
||||
/*
|
||||
pointVectorField pfCorr
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
@ -23,7 +24,8 @@ pointVectorField& pf = pointDU;
|
|||
//dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero),
|
||||
dimensionedVector("zero", pf.dimensions(), vector::zero),
|
||||
pf.boundaryField().types()
|
||||
);*/
|
||||
);
|
||||
*/
|
||||
|
||||
pointVectorField pfCorr
|
||||
(
|
||||
|
@ -96,21 +98,25 @@ forAll (ptc, pointI)
|
|||
}
|
||||
|
||||
// Update coupled boundaries
|
||||
/*forAll (pfCorr.boundaryField(), patchI)
|
||||
/*
|
||||
forAll (pfCorr.boundaryField(), patchI)
|
||||
{
|
||||
if (pfCorr.boundaryField()[patchI].coupled())
|
||||
{
|
||||
pfCorr.boundaryField()[patchI].initAddField();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
/*forAll (pfCorr.boundaryField(), patchI)
|
||||
/*
|
||||
forAll (pfCorr.boundaryField(), patchI)
|
||||
{
|
||||
if (pfCorr.boundaryField()[patchI].coupled())
|
||||
{
|
||||
pfCorr.boundaryField()[patchI].addField(pfCorr.internalField());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//Info << "pfCorr: " << pfCorr << endl;
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
//- the method used to calculate the explicit component of sigma
|
||||
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
|
||||
Info << "Calculation of divDSigmaExp method: " << divDSigmaExpMethod << endl;
|
||||
if(divDSigmaExpMethod != "standard"
|
||||
if
|
||||
(
|
||||
divDSigmaExpMethod != "standard"
|
||||
&& divDSigmaExpMethod != "surface"
|
||||
&& divDSigmaExpMethod != "decompose"
|
||||
&& divDSigmaExpMethod != "laplacian")
|
||||
&& divDSigmaExpMethod != "laplacian"
|
||||
)
|
||||
{
|
||||
FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
|
||||
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"
|
||||
|
|
|
@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
|
|||
}
|
||||
else if(divDSigmaExpMethod == "decompose")
|
||||
{
|
||||
surfaceTensorField shearGradDU =
|
||||
((I - n*n)&fvc::interpolate(gradDU));
|
||||
surfaceTensorField shearGradDU = ((I - n*n)&fvc::interpolate(gradDU));
|
||||
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
*(
|
||||
*
|
||||
(
|
||||
- (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
|
||||
+ lambdaf*tr(shearGradDU&(I - n*n))*n
|
||||
+ muf*(shearGradDU&n)
|
||||
|
|
|
@ -69,5 +69,4 @@ FieldField<Field, vector> extraVecs(ptc.size());
|
|||
|
||||
curExtraVectors.setSize(nFacesAroundPoint);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -91,7 +91,8 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
|
||||
// Update coupled boundaries
|
||||
// Work-around for cyclic parallels.
|
||||
/*if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
|
||||
/*
|
||||
if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
|
||||
{
|
||||
forAll (volPointSumWeights.boundaryField(), patchI)
|
||||
{
|
||||
|
@ -111,7 +112,8 @@ FieldField<Field, scalar> w(ptc.size());
|
|||
);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
// Re-scale the weights for the current point
|
||||
forAll (ptc, pointI)
|
||||
|
|
|
@ -41,8 +41,7 @@ if(min(J.internalField()) > 0)
|
|||
|
||||
//pointDU.write();
|
||||
|
||||
const vectorField& pointDUI =
|
||||
pointDU.internalField();
|
||||
const vectorField& pointDUI = pointDU.internalField();
|
||||
|
||||
// Move mesh
|
||||
vectorField newPoints = mesh.allPoints();
|
||||
|
|
|
@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
|
|||
|
||||
pointInterpolation.interpolate(DU, pointDU);
|
||||
|
||||
const vectorField& pointDUI =
|
||||
pointDU.internalField();
|
||||
const vectorField& pointDUI = pointDU.internalField();
|
||||
|
||||
//- Move mesh
|
||||
vectorField newPoints = mesh.allPoints();
|
||||
|
|
|
@ -7,7 +7,8 @@ pointVectorField& pf = pointDU;
|
|||
|
||||
// Do the correction
|
||||
//GeometricField<Type, pointPatchField, pointMesh> pfCorr
|
||||
/*pointVectorField pfCorr
|
||||
/*
|
||||
pointVectorField pfCorr
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
@ -23,7 +24,8 @@ pointVectorField& pf = pointDU;
|
|||
//dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero),
|
||||
dimensionedVector("zero", pf.dimensions(), vector::zero),
|
||||
pf.boundaryField().types()
|
||||
);*/
|
||||
);
|
||||
*/
|
||||
|
||||
pointVectorField pfCorr
|
||||
(
|
||||
|
@ -96,21 +98,25 @@ forAll (ptc, pointI)
|
|||
}
|
||||
|
||||
// Update coupled boundaries
|
||||
/*forAll (pfCorr.boundaryField(), patchI)
|
||||
/*
|
||||
forAll (pfCorr.boundaryField(), patchI)
|
||||
{
|
||||
if (pfCorr.boundaryField()[patchI].coupled())
|
||||
{
|
||||
pfCorr.boundaryField()[patchI].initAddField();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
/*forAll (pfCorr.boundaryField(), patchI)
|
||||
/*
|
||||
forAll (pfCorr.boundaryField(), patchI)
|
||||
{
|
||||
if (pfCorr.boundaryField()[patchI].coupled())
|
||||
{
|
||||
pfCorr.boundaryField()[patchI].addField(pfCorr.internalField());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//Info << "pfCorr: " << pfCorr << endl;
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
//- the method used to calculate the explicit component of sigma
|
||||
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
|
||||
Info << "Calculation of divDSigmaExp method: " << divDSigmaExpMethod << endl;
|
||||
if(divDSigmaExpMethod != "standard"
|
||||
if
|
||||
(
|
||||
divDSigmaExpMethod != "standard"
|
||||
&& divDSigmaExpMethod != "surface"
|
||||
&& divDSigmaExpMethod != "decompose"
|
||||
&& divDSigmaExpMethod != "laplacian")
|
||||
&& divDSigmaExpMethod != "laplacian"
|
||||
)
|
||||
{
|
||||
FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
|
||||
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"
|
||||
|
|
|
@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
|
|||
}
|
||||
else if(divDSigmaExpMethod == "decompose")
|
||||
{
|
||||
surfaceTensorField shearGradU =
|
||||
((I - n*n)&fvc::interpolate(gradDU));
|
||||
surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradDU));
|
||||
|
||||
divDSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
*(
|
||||
*
|
||||
(
|
||||
- (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n))
|
||||
+ lambdaf*tr(shearGradU&(I - n*n))*n
|
||||
+ muf*(shearGradU&n)
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
//- how explicit component of sigma is to be calculated
|
||||
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
|
||||
Info << "Selecting divDSigmaExp calculation method " << divDSigmaExpMethod << endl;
|
||||
if(divDSigmaExpMethod != "standard" && divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "decompose" && divDSigmaExpMethod != "laplacian")
|
||||
if
|
||||
(
|
||||
divDSigmaExpMethod != "standard"
|
||||
&& divDSigmaExpMethod != "surface"
|
||||
&& divDSigmaExpMethod != "decompose"
|
||||
&& divDSigmaExpMethod != "laplacian"
|
||||
)
|
||||
{
|
||||
FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
|
||||
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"
|
||||
|
|
|
@ -17,13 +17,13 @@ if(divSigmaExpMethod == "standard")
|
|||
}
|
||||
else if(divSigmaExpMethod == "decompose")
|
||||
{
|
||||
surfaceTensorField shearGradU =
|
||||
((I - n*n)&fvc::interpolate(gradU));
|
||||
surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradU));
|
||||
|
||||
divSigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
*(
|
||||
*
|
||||
(
|
||||
- (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n))
|
||||
+ lambdaf*tr(shearGradU&(I - n*n))*n
|
||||
+ muf*(shearGradU&n)
|
||||
|
|
|
@ -17,13 +17,13 @@ if(sigmaExpMethod == "standard")
|
|||
}
|
||||
else if(sigmaExpMethod == "decompose")
|
||||
{
|
||||
surfaceTensorField shearGradU =
|
||||
((I - n*n)&fvc::interpolate(gradU));
|
||||
surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradU));
|
||||
|
||||
sigmaExp = fvc::div
|
||||
(
|
||||
mesh.magSf()
|
||||
*(
|
||||
*
|
||||
(
|
||||
- (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n))
|
||||
+ lambdaf*tr(shearGradU&(I - n*n))*n
|
||||
+ muf*(shearGradU&n)
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
}
|
||||
|
||||
//- update patch
|
||||
if(
|
||||
if
|
||||
(
|
||||
U.boundaryField()[patchID].type()
|
||||
== fixedValueFvPatchVectorField::typeName
|
||||
)
|
||||
|
@ -27,7 +28,6 @@
|
|||
<< " to " << disp
|
||||
<< endl;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
SeriousError << "Loading Patch " << patchName << " is type "
|
||||
|
|
|
@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
|
|||
|
||||
pointInterpolation.interpolate(DU, pointDU);
|
||||
|
||||
const vectorField& pointDUI =
|
||||
pointDU.internalField();
|
||||
const vectorField& pointDUI = pointDU.internalField();
|
||||
|
||||
//- Move mesh
|
||||
vectorField newPoints = stressMesh.allPoints();
|
||||
|
|
|
@ -68,23 +68,28 @@ Foam::contactPatchPair::contactPatchPair
|
|||
// ),
|
||||
// vectorField(cp_.mesh().boundaryMesh()[slavePatch_.index()].pointNormals().size(), vector::zero)
|
||||
// ),
|
||||
slavePointPenetration_(
|
||||
slavePointPenetration_
|
||||
(
|
||||
cp_.mesh().boundaryMesh()[slavePatch_.index()].pointNormals().size(),
|
||||
0.0
|
||||
),
|
||||
masterPointPenetration_(
|
||||
masterPointPenetration_
|
||||
(
|
||||
cp_.mesh().boundaryMesh()[masterPatch_.index()].pointNormals().size(),
|
||||
0.0
|
||||
),
|
||||
globalSlavePointPenetration_(
|
||||
globalSlavePointPenetration_
|
||||
(
|
||||
cp_.mesh().pointZones()[cp_.mesh().faceZones().findZoneID(slaveFaceZoneName_)].size(),
|
||||
0.0
|
||||
),
|
||||
globalMasterPointPenetration_(
|
||||
globalMasterPointPenetration_
|
||||
(
|
||||
cp_.mesh().pointZones()[cp_.mesh().faceZones().findZoneID(masterFaceZoneName_)].size(),
|
||||
0.0
|
||||
),
|
||||
oldTotalSlavePointForce_(
|
||||
oldTotalSlavePointForce_
|
||||
(
|
||||
cp_.mesh().boundaryMesh()[slavePatch_.index()].pointNormals().size(),
|
||||
vector::zero
|
||||
),
|
||||
|
@ -92,7 +97,8 @@ Foam::contactPatchPair::contactPatchPair
|
|||
penetrationLimit_(readScalar(dict.lookup("penetrationLimit"))),
|
||||
rigidMaster_(dict.lookup("rigidMaster")),
|
||||
interpolationMethod_(dict.lookup("interpolationMethod")),
|
||||
faceZoneMasterToSlaveInterpolator_(
|
||||
faceZoneMasterToSlaveInterpolator_
|
||||
(
|
||||
cp_.mesh().faceZones()[cp_.mesh().faceZones().findZoneID(masterFaceZoneName_)](), // from
|
||||
cp_.mesh().faceZones()[cp_.mesh().faceZones().findZoneID(slaveFaceZoneName_)](), // to zone
|
||||
alg_,
|
||||
|
|
|
@ -34,7 +34,6 @@ Description
|
|||
|
||||
void Foam::contactPatchPair::correct()
|
||||
{
|
||||
|
||||
//---------------------PRELIMINARIES---------------------------------//
|
||||
const fvMesh& mesh = cp_.mesh();
|
||||
const label& masterIndex = masterPatch_.index();
|
||||
|
@ -42,28 +41,24 @@ void Foam::contactPatchPair::correct()
|
|||
scalar maxMagSlaveTraction = 0.0;
|
||||
contactIterNum_++;
|
||||
|
||||
|
||||
//--------CALCULATE MASTER AND SLAVE PENETRATIONS----------------------//
|
||||
scalarField& globalSlavePointPenetration = globalSlavePointPenetration_;
|
||||
//scalarField& globalMasterPointPenetration = globalMasterPointPenetration_;
|
||||
|
||||
|
||||
//- tell zoneToZone that mesh has moved, so the intersection will be recalculated
|
||||
faceZoneMasterToSlaveInterpolator_.movePoints();
|
||||
//- calculate intersection distances
|
||||
//- this is the slowest part of the contact correction especially when the slavePatch
|
||||
//- has many points. parallelisation of this step should be considered.
|
||||
globalSlavePointPenetration
|
||||
= faceZoneMasterToSlaveInterpolator_.pointDistanceToIntersection();
|
||||
|
||||
//globalMasterPointPenetration
|
||||
//= faceZoneSlaveToMasterInterpolator.pointDistanceToIntersection();
|
||||
globalSlavePointPenetration =
|
||||
faceZoneMasterToSlaveInterpolator_.pointDistanceToIntersection();
|
||||
|
||||
//globalMasterPointPenetration =
|
||||
// faceZoneSlaveToMasterInterpolator.pointDistanceToIntersection();
|
||||
|
||||
scalarField& slavePointPenetration = slavePointPenetration_;
|
||||
//scalarField& masterPointPenetration = masterPointPenetration_;
|
||||
|
||||
|
||||
forAll(slavePointPenetration, pointI)
|
||||
{
|
||||
//label pointGlobalLabel = slavePointLabels[pointI];
|
||||
|
@ -95,8 +90,6 @@ void Foam::contactPatchPair::correct()
|
|||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
//------CALCULATE SLAVE VERTEX FORCES BASED ON PENETRATION-------------//
|
||||
//- approximation of penaltyFactor
|
||||
//- this should be automatic, these numbers don't really matter, the scaleFactor
|
||||
|
@ -111,9 +104,9 @@ void Foam::contactPatchPair::correct()
|
|||
const vectorField& slavePointNormals = mesh.boundaryMesh()[slaveIndex].pointNormals();
|
||||
vectorField& totalSlavePointForce = totalSlavePointForce_;
|
||||
|
||||
int numSlaveContactPoints = 0;
|
||||
int numSlaveContactPointsReducing = 0;
|
||||
int numSlavesUpdated = 0;
|
||||
label numSlaveContactPoints = 0;
|
||||
label numSlaveContactPointsReducing = 0;
|
||||
label numSlavesUpdated = 0;
|
||||
|
||||
//- so the procs know the global min
|
||||
//scalar minSlavePointPenetration = gMin(slavePointPenetration);
|
||||
|
@ -134,7 +127,9 @@ void Foam::contactPatchPair::correct()
|
|||
numSlavesUpdated++;
|
||||
//- force is linearly dependent on penetration
|
||||
totalSlavePointForce[pointI] +=
|
||||
( slavePointNormals[pointI] * penaltyFactor * slavePointPenetration[pointI] );
|
||||
(
|
||||
slavePointNormals[pointI]*penaltyFactor*slavePointPenetration[pointI]
|
||||
);
|
||||
}
|
||||
//- else if point is within contact tolerance then don't add any more force
|
||||
else if(slavePointPenetration[pointI] < 0.0)
|
||||
|
@ -151,7 +146,9 @@ void Foam::contactPatchPair::correct()
|
|||
// point forces must be reduced slowly
|
||||
|
||||
totalSlavePointForce[pointI] +=
|
||||
( slavePointNormals[pointI] * returnPenaltyFactor * slavePointPenetration[pointI] );
|
||||
(
|
||||
slavePointNormals[pointI]*returnPenaltyFactor*slavePointPenetration[pointI]
|
||||
);
|
||||
|
||||
// if a tensile force develops
|
||||
if((totalSlavePointForce[pointI] & slavePointNormals[pointI]) > 0.0)
|
||||
|
@ -185,10 +182,10 @@ void Foam::contactPatchPair::correct()
|
|||
//- for a deformable master
|
||||
if(!rigidMaster_)
|
||||
{
|
||||
const label slaveFaceZoneID
|
||||
= mesh.faceZones().findZoneID(slaveFaceZoneName_);
|
||||
const label slavePatchStart
|
||||
= mesh.boundaryMesh()[slaveIndex].start();
|
||||
const label slaveFaceZoneID =
|
||||
mesh.faceZones().findZoneID(slaveFaceZoneName_);
|
||||
const label slavePatchStart =
|
||||
mesh.boundaryMesh()[slaveIndex].start();
|
||||
|
||||
scalarField globalSlavePressure
|
||||
(
|
||||
|
@ -231,14 +228,13 @@ void Foam::contactPatchPair::correct()
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
//- exchange parallel data
|
||||
reduce(globalMasterPressure, maxOp<scalarField>());
|
||||
|
||||
//Pout << "The max global master trac is " << max(globalMasterPressure) << endl;
|
||||
|
||||
const label masterPatchStart
|
||||
= mesh.boundaryMesh()[masterIndex].start();
|
||||
const label masterPatchStart =
|
||||
mesh.boundaryMesh()[masterIndex].start();
|
||||
|
||||
scalarField masterPressure(mesh.boundaryMesh()[masterIndex].size(), 0.0);
|
||||
|
||||
|
|
|
@ -147,8 +147,6 @@ void contactProblem::correct()
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//**********************CONTACT AREA FUNCTION***********************************//
|
||||
tmp<volScalarField> contactProblem::contactArea() const
|
||||
{
|
||||
|
@ -189,19 +187,19 @@ tmp<volScalarField> contactProblem::contactArea() const
|
|||
label slaveIndex = contacts[contactI].slavePatch().index();
|
||||
scalarField masterFrac = contacts[contactI].masterTouchFraction();
|
||||
scalarField slaveFrac = contacts[contactI].slaveTouchFraction();
|
||||
scalar contactAreaMaster =
|
||||
gSum
|
||||
scalar contactAreaMaster = gSum
|
||||
(
|
||||
masterFrac *
|
||||
mag(
|
||||
mag
|
||||
(
|
||||
mesh().Sf().boundaryField()[masterIndex]
|
||||
)
|
||||
);
|
||||
scalar contactAreaSlave =
|
||||
gSum
|
||||
scalar contactAreaSlave = gSum
|
||||
(
|
||||
slaveFrac *
|
||||
mag(
|
||||
mag
|
||||
(
|
||||
mesh().Sf().boundaryField()[slaveIndex]
|
||||
)
|
||||
);
|
||||
|
@ -275,8 +273,6 @@ void contactProblem::contactPointForce(pointVectorField& cPointForce)
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
tmp<volScalarField> contactProblem::contactPressure() const
|
||||
{
|
||||
tmp<volScalarField> tcPress
|
||||
|
|
|
@ -312,7 +312,6 @@ void plasticityModel::correct()
|
|||
{
|
||||
betaPatch[faceI] = 0;
|
||||
curDEpsEPred = DEpsilonPatch[faceI];
|
||||
|
||||
if
|
||||
(
|
||||
(DEpsilonEqPatch[faceI] >= 0)
|
||||
|
@ -448,7 +447,6 @@ void plasticityModel::updateYieldStress()
|
|||
|
||||
bool plasticityModel::read()
|
||||
{
|
||||
|
||||
if (regIOobject::read())
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -37,13 +37,15 @@ solvers
|
|||
}
|
||||
|
||||
|
||||
/* U
|
||||
/*
|
||||
U
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-09;
|
||||
relTol 0.99;
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
stressedFoam
|
||||
|
|
|
@ -31,7 +31,6 @@ boundaryField
|
|||
|
||||
cohesive
|
||||
{
|
||||
|
||||
type cohesiveZone;
|
||||
cohesiveLaw Dugdale;
|
||||
relaxationFactor 0.9;
|
||||
|
|
|
@ -273,6 +273,7 @@ int main(int argc, char *argv[])
|
|||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0.0)
|
||||
);
|
||||
|
||||
forAll(theta.internalField(), celli)
|
||||
{
|
||||
const scalar& x = mesh.C().internalField()[celli][vector::X];
|
||||
|
@ -311,9 +312,12 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
const scalar& t = theta.internalField()[celli];
|
||||
|
||||
rotMat.internalField()[celli] = tensor(::cos(t), ::sin(t), 0,
|
||||
rotMat.internalField()[celli] = tensor
|
||||
(
|
||||
::cos(t), ::sin(t), 0,
|
||||
-::sin(t), ::cos(t), 0,
|
||||
0, 0, 1);
|
||||
0, 0, 1
|
||||
);
|
||||
}
|
||||
|
||||
forAll(rotMat.boundaryField(), patchi)
|
||||
|
@ -322,9 +326,12 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
const scalar& t = theta.boundaryField()[patchi][facei];
|
||||
|
||||
rotMat.boundaryField()[patchi][facei] = tensor(::cos(t), ::sin(t), 0,
|
||||
rotMat.boundaryField()[patchi][facei] = tensor
|
||||
(
|
||||
::cos(t), ::sin(t), 0,
|
||||
-::sin(t), ::cos(t), 0,
|
||||
0, 0, 1);
|
||||
0, 0, 1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,9 +357,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
const tensor& rot = rotMat.internalField()[celli];
|
||||
|
||||
symmTensor sigmaCart(r, 0, 0,
|
||||
t, 0,
|
||||
z);
|
||||
symmTensor sigmaCart(r, 0, 0, t, 0, z);
|
||||
|
||||
sigma.internalField()[celli] =
|
||||
symm(rot.T() & sigmaCart & rot);
|
||||
|
@ -374,16 +379,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
const tensor& rot = rotMat.boundaryField()[patchi][facei];
|
||||
|
||||
symmTensor sigmaCart(r, 0, 0,
|
||||
t, 0,
|
||||
z);
|
||||
symmTensor sigmaCart(r, 0, 0, t, 0, z);
|
||||
sigma.boundaryField()[patchi][facei] =
|
||||
symm(rot.T() & sigmaCart & rot);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Info << "\nWriting analytical sigma tensor" << endl;
|
||||
sigma.write();
|
||||
|
||||
|
|
|
@ -110,14 +110,10 @@ int main(int argc, char *argv[])
|
|||
label refFace = cells[celli][0];
|
||||
|
||||
//- insert first four abaqusCellPoints
|
||||
abaqusCellPoints[celli][0]
|
||||
= (faces[refFace][3] + 1);
|
||||
abaqusCellPoints[celli][1]
|
||||
= (faces[refFace][2] + 1);
|
||||
abaqusCellPoints[celli][2]
|
||||
= (faces[refFace][1] + 1);
|
||||
abaqusCellPoints[celli][3]
|
||||
= (faces[refFace][0] + 1);
|
||||
abaqusCellPoints[celli][0] = (faces[refFace][3] + 1);
|
||||
abaqusCellPoints[celli][1] = (faces[refFace][2] + 1);
|
||||
abaqusCellPoints[celli][2] = (faces[refFace][1] + 1);
|
||||
abaqusCellPoints[celli][3] = (faces[refFace][0] + 1);
|
||||
|
||||
//- now find the opposite face in the cell
|
||||
//Info << "Finding oppFace" << endl << endl;
|
||||
|
@ -181,29 +177,25 @@ int main(int argc, char *argv[])
|
|||
label globalPpi = oppFacePPs[oppFacePointi];
|
||||
if(globalPpi == faces[refFace][0])
|
||||
{
|
||||
abaqusCellPoints[celli][7]
|
||||
= globalPointi + 1;
|
||||
abaqusCellPoints[celli][7] = globalPointi + 1;
|
||||
ppFound = true;
|
||||
break;
|
||||
}
|
||||
else if(globalPpi == faces[refFace][1])
|
||||
{
|
||||
abaqusCellPoints[celli][6]
|
||||
= globalPointi + 1;
|
||||
abaqusCellPoints[celli][6] = globalPointi + 1;
|
||||
ppFound = true;
|
||||
break;
|
||||
}
|
||||
else if(globalPpi == faces[refFace][2])
|
||||
{
|
||||
abaqusCellPoints[celli][5]
|
||||
= globalPointi + 1;
|
||||
abaqusCellPoints[celli][5] = globalPointi + 1;
|
||||
ppFound = true;
|
||||
break;
|
||||
}
|
||||
else if(globalPpi == faces[refFace][3])
|
||||
{
|
||||
abaqusCellPoints[celli][4]
|
||||
= globalPointi + 1;
|
||||
abaqusCellPoints[celli][4] = globalPointi + 1;
|
||||
ppFound = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -78,4 +78,3 @@
|
|||
|
||||
DSigmaCorr -= sigma;
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,6 @@ int main(int argc, char *argv[])
|
|||
gradDU = fvc::grad(DU);
|
||||
|
||||
# include "calculateDEpsilonDSigma.H"
|
||||
|
||||
}
|
||||
while
|
||||
(
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -126,16 +126,14 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::skewness() const
|
|||
|
||||
forAll (nei, faceI)
|
||||
{
|
||||
scalar dOwn =
|
||||
mag
|
||||
scalar dOwn = mag
|
||||
(
|
||||
(faceCtrs[faceI] - cellCtrs[own[faceI]])
|
||||
&areas[faceI]
|
||||
)
|
||||
/mag(areas[faceI]);
|
||||
|
||||
scalar dNei =
|
||||
mag
|
||||
scalar dNei = mag
|
||||
(
|
||||
(cellCtrs[nei[faceI]] - faceCtrs[faceI])
|
||||
&areas[faceI]
|
||||
|
@ -176,8 +174,8 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::skewness() const
|
|||
+ ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n;
|
||||
|
||||
scalar skewness =
|
||||
mag(faceCentres[faceI] - faceIntersection)/
|
||||
(
|
||||
mag(faceCentres[faceI] - faceIntersection)
|
||||
/(
|
||||
mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]])
|
||||
+ VSMALL
|
||||
);
|
||||
|
@ -273,16 +271,14 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const
|
|||
|
||||
forAll (nei, faceI)
|
||||
{
|
||||
scalar dOwn =
|
||||
mag
|
||||
scalar dOwn = mag
|
||||
(
|
||||
(faceCtrs[faceI] - cellCtrs[own[faceI]])
|
||||
&areas[faceI]
|
||||
)
|
||||
/mag(areas[faceI]);
|
||||
|
||||
scalar dNei =
|
||||
mag
|
||||
scalar dNei = mag
|
||||
(
|
||||
(cellCtrs[nei[faceI]] - faceCtrs[faceI])
|
||||
&areas[faceI]
|
||||
|
@ -322,8 +318,8 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const
|
|||
+ ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n;
|
||||
|
||||
result[globalFaceI++] =
|
||||
mag(faceCentres[faceI] - faceIntersection)/
|
||||
(
|
||||
mag(faceCentres[faceI] - faceIntersection)
|
||||
/(
|
||||
mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]])
|
||||
+ VSMALL
|
||||
);
|
||||
|
|
|
@ -38,8 +38,8 @@ namespace Foam
|
|||
{
|
||||
|
||||
// Temporary hack: useful for tracking balance of phi across interface
|
||||
void
|
||||
traceMixingPlaneFlux(
|
||||
void traceMixingPlaneFlux
|
||||
(
|
||||
volVectorField& U,
|
||||
surfaceScalarField& phi,
|
||||
scalar& masterPatchScaleFactor,
|
||||
|
@ -93,12 +93,9 @@ traceMixingPlaneFlux(
|
|||
<< mag(phiFromU - shadowPhiFromU)/(phiFromU + SMALL)*100
|
||||
<< " %"
|
||||
<< endl;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../linux64Gcc/mplibSYSTEMOPENMPI
|
1
wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI
Normal file
1
wmake/rules/linuxPPC64Gcc/mplibSYSTEMOPENMPI
Normal file
|
@ -0,0 +1 @@
|
|||
PFLAGS = -DOMPI_SKIP_MPICXX
|
Reference in a new issue