--HG--
branch : bgschaid/minorAdditionsBranch
This commit is contained in:
Bernhard F.W. Gschaider 2013-07-19 00:36:27 +02:00
commit 72c243a96f
1416 changed files with 18017 additions and 18012 deletions

View file

@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
} }
else if(divDSigmaExpMethod == "decompose") else if(divDSigmaExpMethod == "decompose")
{ {
surfaceTensorField shearGradDU = surfaceTensorField shearGradDU = ((I - n*n)&fvc::interpolate(gradDU));
((I - n*n)&fvc::interpolate(gradDU));
divDSigmaExp = fvc::div divDSigmaExp = fvc::div
( (
mesh.magSf() mesh.magSf()
*( *
(
- (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n)) - (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
+ lambdaf*tr(shearGradDU&(I - n*n))*n + lambdaf*tr(shearGradDU&(I - n*n))*n
+ muf*(shearGradDU&n) + muf*(shearGradDU&n)

View file

@ -33,9 +33,13 @@ if(Pstream::parRun())
label slaveID = contacts[contactI].slavePatch().index(); label slaveID = contacts[contactI].slavePatch().index();
primitivePatchInterpolation masterInterpolator primitivePatchInterpolation masterInterpolator
(mesh.boundaryMesh()[masterID]); (
mesh.boundaryMesh()[masterID]
);
primitivePatchInterpolation slaveInterpolator primitivePatchInterpolation slaveInterpolator
(mesh.boundaryMesh()[slaveID]); (
mesh.boundaryMesh()[slaveID]
);
//- U must be interpolated to the vertices, this ignores the faceZone //- U must be interpolated to the vertices, this ignores the faceZone
//- points with no U (unlike volPointInterpolation) //- points with no U (unlike volPointInterpolation)
@ -65,23 +69,17 @@ if(Pstream::parRun())
{ {
label pointGlobalLabel = masterPointLabels[pointI]; label pointGlobalLabel = masterPointLabels[pointI];
newPoints[pointGlobalLabel] = newPoints[pointGlobalLabel] =
oldMasterPoints[pointI] oldMasterPoints[pointI] + correctMasterPointU[pointI];
+
correctMasterPointU[pointI];
} }
forAll(slavePointLabels, pointI) forAll(slavePointLabels, pointI)
{ {
label pointGlobalLabel = slavePointLabels[pointI]; label pointGlobalLabel = slavePointLabels[pointI];
newPoints[pointGlobalLabel] = newPoints[pointGlobalLabel] =
oldSlavePoints[pointI] oldSlavePoints[pointI] + correctSlavePointU[pointI];
+
correctSlavePointU[pointI];
} }
} }
//***** NOW FIX AND SYNCHRONISE ALL THE FACEZONE POINTS *****// //***** NOW FIX AND SYNCHRONISE ALL THE FACEZONE POINTS *****//
forAll(mesh.faceZones(), faceZoneI) forAll(mesh.faceZones(), faceZoneI)
@ -117,8 +115,7 @@ if(Pstream::parRun())
{ {
label procPoint = label procPoint =
mesh.faceZones()[faceZoneI]().meshPoints()[localPoint]; mesh.faceZones()[faceZoneI]().meshPoints()[localPoint];
globalFZnewPoints[globalPointI] = globalFZnewPoints[globalPointI] = newPoints[procPoint];
newPoints[procPoint];
pointNumProcs[globalPointI] = 1; pointNumProcs[globalPointI] = 1;
} }
} }
@ -141,20 +138,16 @@ if(Pstream::parRun())
forAll(globalFZnewPoints, globalPointI) forAll(globalFZnewPoints, globalPointI)
{ {
label localPoint = procToGlobalFZmap[faceZoneI][globalPointI]; label localPoint = procToGlobalFZmap[faceZoneI][globalPointI];
procFZnewPoints[localPoint] = globalFZnewPoints[globalPointI];
procFZnewPoints[localPoint] =
globalFZnewPoints[globalPointI];
} }
//- now fix the newPoints points on the globalFaceZones //- now fix the newPoints points on the globalFaceZones
labelList procFZmeshPoints = labelList procFZmeshPoints = mesh.faceZones()[faceZoneI]().meshPoints();
mesh.faceZones()[faceZoneI]().meshPoints();
forAll(procFZmeshPoints, pointI) forAll(procFZmeshPoints, pointI)
{ {
label procPoint = procFZmeshPoints[pointI]; label procPoint = procFZmeshPoints[pointI];
newPoints[procPoint] = newPoints[procPoint] = procFZnewPoints[pointI];
procFZnewPoints[pointI];
} }
} }
} }

View file

@ -70,7 +70,9 @@ if(Pstream::parRun())
//- set all slave points to zero because only the master order is used //- set all slave points to zero because only the master order is used
if(!Pstream::master()) if(!Pstream::master())
{
globalFZpoints *= 0.0; globalFZpoints *= 0.0;
}
//- pass points to all procs //- pass points to all procs
reduce(globalFZpoints, sumOp<vectorField>()); reduce(globalFZpoints, sumOp<vectorField>());
@ -93,6 +95,7 @@ if(Pstream::parRun())
} }
} }
} }
//- procToGlobalFZmap now contains the local FZpoint label for each //- procToGlobalFZmap now contains the local FZpoint label for each
//- global FZ point label - for each faceZone //- global FZ point label - for each faceZone

View file

@ -15,7 +15,7 @@ solidInterface* solidInterfacePtr(NULL);
solidInterfacePtr->modifyProperties(muf, lambdaf); solidInterfacePtr->modifyProperties(muf, lambdaf);
gradDU = solidInterfacePtr->grad(DU); 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") if(divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "decompose")
{ {
FatalError << "divDSigmaExp must be decompose or surface when solidInterface is on" FatalError << "divDSigmaExp must be decompose or surface when solidInterface is on"

View file

@ -101,7 +101,9 @@ int main(int argc, char *argv[])
//- reset DU to zero at the start of the time-step if //- reset DU to zero at the start of the time-step if
//- a predictor is not required //- a predictor is not required
if(!predictor) if(!predictor)
{
DU = dimensionedVector("zero", dimLength, vector::zero); DU = dimensionedVector("zero", dimLength, vector::zero);
}
do //- start of momentum loop do //- start of momentum loop
{ {

View file

@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
pointInterpolation.interpolate(DU, pointDU); pointInterpolation.interpolate(DU, pointDU);
const vectorField& pointDUI = const vectorField& pointDUI = pointDU.internalField();
pointDU.internalField();
//- Move mesh //- Move mesh
vectorField newPoints = mesh.allPoints(); vectorField newPoints = mesh.allPoints();

View file

@ -1,7 +1,13 @@
//- how explicit component of sigma is to be calculated //- how explicit component of sigma is to be calculated
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp")); word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
Info << divDSigmaExpMethod << " method chosen for calculation of sigmaExp" << endl; 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 FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"

View file

@ -44,6 +44,7 @@ if (runTime.outputTime())
), ),
tr(sigma)/3.0 tr(sigma)/3.0
); );
//- boundary surface pressure //- boundary surface pressure
forAll(pressure.boundaryField(), patchi) forAll(pressure.boundaryField(), patchi)
{ {

View file

@ -69,5 +69,4 @@ FieldField<Field, vector> extraVecs(ptc.size());
curExtraVectors.setSize(nFacesAroundPoint); curExtraVectors.setSize(nFacesAroundPoint);
} }
} }

View file

@ -91,7 +91,8 @@ FieldField<Field, scalar> w(ptc.size());
// Update coupled boundaries // Update coupled boundaries
// Work-around for cyclic parallels. // Work-around for cyclic parallels.
/*if (Pstream::parRun() && !mesh.parallelData().cyclicParallel()) /*
if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
{ {
forAll (volPointSumWeights.boundaryField(), patchI) forAll (volPointSumWeights.boundaryField(), patchI)
{ {
@ -111,7 +112,8 @@ FieldField<Field, scalar> w(ptc.size());
); );
} }
} }
}*/ }
*/
// Re-scale the weights for the current point // Re-scale the weights for the current point
forAll (ptc, pointI) forAll (ptc, pointI)

View file

@ -33,9 +33,13 @@ if(Pstream::parRun())
label slaveID = contacts[contactI].slavePatch().index(); label slaveID = contacts[contactI].slavePatch().index();
primitivePatchInterpolation masterInterpolator primitivePatchInterpolation masterInterpolator
(mesh.boundaryMesh()[masterID]); (
mesh.boundaryMesh()[masterID]
);
primitivePatchInterpolation slaveInterpolator primitivePatchInterpolation slaveInterpolator
(mesh.boundaryMesh()[slaveID]); (
mesh.boundaryMesh()[slaveID]
);
//- DU must be interpolated to the vertices, this ignores the faceZone //- DU must be interpolated to the vertices, this ignores the faceZone
//- points with no DU (unlike volPointInterpolation) //- points with no DU (unlike volPointInterpolation)
@ -65,23 +69,17 @@ if(Pstream::parRun())
{ {
label pointGlobalLabel = masterPointLabels[pointI]; label pointGlobalLabel = masterPointLabels[pointI];
newPoints[pointGlobalLabel] = newPoints[pointGlobalLabel] =
oldMasterPoints[pointI] oldMasterPoints[pointI] + correctMasterPointDU[pointI];
+
correctMasterPointDU[pointI];
} }
forAll(slavePointLabels, pointI) forAll(slavePointLabels, pointI)
{ {
label pointGlobalLabel = slavePointLabels[pointI]; label pointGlobalLabel = slavePointLabels[pointI];
newPoints[pointGlobalLabel] = newPoints[pointGlobalLabel] =
oldSlavePoints[pointI] oldSlavePoints[pointI] + correctSlavePointDU[pointI];
+
correctSlavePointDU[pointI];
} }
} }
//***** NOW FIX AND SYNCHRONISE ALL THE FACEZONE POINTS *****// //***** NOW FIX AND SYNCHRONISE ALL THE FACEZONE POINTS *****//
forAll(mesh.faceZones(), faceZoneI) forAll(mesh.faceZones(), faceZoneI)
@ -117,8 +115,7 @@ if(Pstream::parRun())
{ {
label procPoint = label procPoint =
mesh.faceZones()[faceZoneI]().meshPoints()[localPoint]; mesh.faceZones()[faceZoneI]().meshPoints()[localPoint];
globalFZnewPoints[globalPointI] = globalFZnewPoints[globalPointI] = newPoints[procPoint];
newPoints[procPoint];
pointNumProcs[globalPointI] = 1; pointNumProcs[globalPointI] = 1;
} }
} }
@ -141,20 +138,16 @@ if(Pstream::parRun())
forAll(globalFZnewPoints, globalPointI) forAll(globalFZnewPoints, globalPointI)
{ {
label localPoint = procToGlobalFZmap[faceZoneI][globalPointI]; label localPoint = procToGlobalFZmap[faceZoneI][globalPointI];
procFZnewPoints[localPoint] = globalFZnewPoints[globalPointI];
procFZnewPoints[localPoint] =
globalFZnewPoints[globalPointI];
} }
//- now fix the newPoints points on the globalFaceZones //- now fix the newPoints points on the globalFaceZones
labelList procFZmeshPoints = labelList procFZmeshPoints = mesh.faceZones()[faceZoneI]().meshPoints();
mesh.faceZones()[faceZoneI]().meshPoints();
forAll(procFZmeshPoints, pointI) forAll(procFZmeshPoints, pointI)
{ {
label procPoint = procFZmeshPoints[pointI]; label procPoint = procFZmeshPoints[pointI];
newPoints[procPoint] = newPoints[procPoint] = procFZnewPoints[pointI];
procFZnewPoints[pointI];
} }
} }
} }

View file

@ -70,7 +70,9 @@ if(Pstream::parRun())
//- set all slave points to zero because only the master order is used //- set all slave points to zero because only the master order is used
if(!Pstream::master()) if(!Pstream::master())
{
globalFZpoints *= 0.0; globalFZpoints *= 0.0;
}
//- pass points to all procs //- pass points to all procs
reduce(globalFZpoints, sumOp<vectorField>()); 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 //- check what points are on the current proc patch
pointOnLocalProcPatch[faceZoneI].setSize(globalFZpoints.size(), 0); pointOnLocalProcPatch[faceZoneI].setSize(globalFZpoints.size(), 0);

View file

@ -135,7 +135,6 @@ int main(int argc, char *argv[])
fvm::laplacian(2*mu + lambda, DU, "laplacian(DDU,DU)") fvm::laplacian(2*mu + lambda, DU, "laplacian(DDU,DU)")
+ divDSigmaExp + divDSigmaExp
+ divDSigmaLargeStrainExp + divDSigmaLargeStrainExp
); );
solverPerf = DUEqn.solve(); solverPerf = DUEqn.solve();

View file

@ -41,8 +41,7 @@ if(min(J.internalField()) > 0)
//pointDU.write(); //pointDU.write();
const vectorField& pointDUI = const vectorField& pointDUI = pointDU.internalField();
pointDU.internalField();
// Move mesh // Move mesh
vectorField newPoints = mesh.allPoints(); vectorField newPoints = mesh.allPoints();

View file

@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
pointInterpolation.interpolate(DU, pointDU); pointInterpolation.interpolate(DU, pointDU);
const vectorField& pointDUI = const vectorField& pointDUI = pointDU.internalField();
pointDU.internalField();
//- Move mesh //- Move mesh
vectorField newPoints = mesh.allPoints(); vectorField newPoints = mesh.allPoints();

View file

@ -7,7 +7,8 @@ pointVectorField& pf = pointDU;
// Do the correction // Do the correction
//GeometricField<Type, pointPatchField, pointMesh> pfCorr //GeometricField<Type, pointPatchField, pointMesh> pfCorr
/*pointVectorField pfCorr /*
pointVectorField pfCorr
( (
IOobject IOobject
( (
@ -23,7 +24,8 @@ pointVectorField& pf = pointDU;
//dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero), //dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero),
dimensionedVector("zero", pf.dimensions(), vector::zero), dimensionedVector("zero", pf.dimensions(), vector::zero),
pf.boundaryField().types() pf.boundaryField().types()
);*/ );
*/
pointVectorField pfCorr pointVectorField pfCorr
( (
@ -96,21 +98,25 @@ forAll (ptc, pointI)
} }
// Update coupled boundaries // Update coupled boundaries
/*forAll (pfCorr.boundaryField(), patchI) /*
forAll (pfCorr.boundaryField(), patchI)
{ {
if (pfCorr.boundaryField()[patchI].coupled()) if (pfCorr.boundaryField()[patchI].coupled())
{ {
pfCorr.boundaryField()[patchI].initAddField(); pfCorr.boundaryField()[patchI].initAddField();
} }
}*/ }
*/
/*forAll (pfCorr.boundaryField(), patchI) /*
forAll (pfCorr.boundaryField(), patchI)
{ {
if (pfCorr.boundaryField()[patchI].coupled()) if (pfCorr.boundaryField()[patchI].coupled())
{ {
pfCorr.boundaryField()[patchI].addField(pfCorr.internalField()); pfCorr.boundaryField()[patchI].addField(pfCorr.internalField());
} }
}*/ }
*/
//Info << "pfCorr: " << pfCorr << endl; //Info << "pfCorr: " << pfCorr << endl;

View file

@ -1,7 +1,13 @@
//- how explicit component of sigma is to be calculated //- how explicit component of sigma is to be calculated
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp")); word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
Info << divDSigmaExpMethod << " method chosen for calculation of DSigmaExp" << endl; 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 FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"

View file

@ -17,8 +17,7 @@ if(divSigmaExpMethod == "standard")
} }
else if(divSigmaExpMethod == "decompose") else if(divSigmaExpMethod == "decompose")
{ {
surfaceTensorField shearGradU = surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradU));
((I - n*n)&fvc::interpolate(gradU));
divSigmaExp = fvc::div divSigmaExp = fvc::div
( (

View file

@ -33,9 +33,13 @@ if(Pstream::parRun())
label slaveID = contacts[contactI].slavePatch().index(); label slaveID = contacts[contactI].slavePatch().index();
primitivePatchInterpolation masterInterpolator primitivePatchInterpolation masterInterpolator
(mesh.boundaryMesh()[masterID]); (
mesh.boundaryMesh()[masterID]
);
primitivePatchInterpolation slaveInterpolator primitivePatchInterpolation slaveInterpolator
(mesh.boundaryMesh()[slaveID]); (
mesh.boundaryMesh()[slaveID]
);
//- U must be interpolated to the vertices, this ignores the faceZone //- U must be interpolated to the vertices, this ignores the faceZone
//- points with no U (unlike volPointInterpolation) //- points with no U (unlike volPointInterpolation)
@ -65,23 +69,17 @@ if(Pstream::parRun())
{ {
label pointGlobalLabel = masterPointLabels[pointI]; label pointGlobalLabel = masterPointLabels[pointI];
newPoints[pointGlobalLabel] = newPoints[pointGlobalLabel] =
oldMasterPoints[pointI] oldMasterPoints[pointI] + correctMasterPointU[pointI];
+
correctMasterPointU[pointI];
} }
forAll(slavePointLabels, pointI) forAll(slavePointLabels, pointI)
{ {
label pointGlobalLabel = slavePointLabels[pointI]; label pointGlobalLabel = slavePointLabels[pointI];
newPoints[pointGlobalLabel] = newPoints[pointGlobalLabel] =
oldSlavePoints[pointI] oldSlavePoints[pointI] + correctSlavePointU[pointI];
+
correctSlavePointU[pointI];
} }
} }
//***** NOW FIX AND SYNCHRONISE ALL THE FACEZONE POINTS *****// //***** NOW FIX AND SYNCHRONISE ALL THE FACEZONE POINTS *****//
forAll(mesh.faceZones(), faceZoneI) forAll(mesh.faceZones(), faceZoneI)
@ -117,8 +115,7 @@ if(Pstream::parRun())
{ {
label procPoint = label procPoint =
mesh.faceZones()[faceZoneI]().meshPoints()[localPoint]; mesh.faceZones()[faceZoneI]().meshPoints()[localPoint];
globalFZnewPoints[globalPointI] = globalFZnewPoints[globalPointI] = newPoints[procPoint];
newPoints[procPoint];
pointNumProcs[globalPointI] = 1; pointNumProcs[globalPointI] = 1;
} }
} }
@ -141,20 +138,16 @@ if(Pstream::parRun())
forAll(globalFZnewPoints, globalPointI) forAll(globalFZnewPoints, globalPointI)
{ {
label localPoint = procToGlobalFZmap[faceZoneI][globalPointI]; label localPoint = procToGlobalFZmap[faceZoneI][globalPointI];
procFZnewPoints[localPoint] = globalFZnewPoints[globalPointI];
procFZnewPoints[localPoint] =
globalFZnewPoints[globalPointI];
} }
//- now fix the newPoints points on the globalFaceZones //- now fix the newPoints points on the globalFaceZones
labelList procFZmeshPoints = labelList procFZmeshPoints = mesh.faceZones()[faceZoneI]().meshPoints();
mesh.faceZones()[faceZoneI]().meshPoints();
forAll(procFZmeshPoints, pointI) forAll(procFZmeshPoints, pointI)
{ {
label procPoint = procFZmeshPoints[pointI]; label procPoint = procFZmeshPoints[pointI];
newPoints[procPoint] = newPoints[procPoint] = procFZnewPoints[pointI];
procFZnewPoints[pointI];
} }
} }
} }

View file

@ -70,7 +70,9 @@ if(Pstream::parRun())
//- set all slave points to zero because only the master order is used //- set all slave points to zero because only the master order is used
if(!Pstream::master()) if(!Pstream::master())
{
globalFZpoints *= 0.0; globalFZpoints *= 0.0;
}
//- pass points to all procs //- pass points to all procs
reduce(globalFZpoints, sumOp<vectorField>()); 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 //- check what points are on the current proc patch
pointOnLocalProcPatch[faceZoneI].setSize(globalFZpoints.size(), 0); pointOnLocalProcPatch[faceZoneI].setSize(globalFZpoints.size(), 0);

View file

@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
pointInterpolation.interpolate(DU, pointDU); pointInterpolation.interpolate(DU, pointDU);
const vectorField& pointDUI = const vectorField& pointDUI = pointDU.internalField();
pointDU.internalField();
//- Move mesh //- Move mesh
vectorField newPoints = mesh.allPoints(); vectorField newPoints = mesh.allPoints();

View file

@ -17,8 +17,7 @@ if(divSigmaExpMethod == "standard")
} }
else if(divSigmaExpMethod == "decompose") else if(divSigmaExpMethod == "decompose")
{ {
surfaceTensorField shearGradU = surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradU));
((I - n*n)&fvc::interpolate(gradU));
divSigmaExp = fvc::div divSigmaExp = fvc::div
( (

View file

@ -1,7 +1,13 @@
//- how explicit component of sigma is to be calculated //- how explicit component of sigma is to be calculated
word divSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divSigmaExp")); word divSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divSigmaExp"));
Info << "Selecting divSigmaExp calculation method " << divSigmaExpMethod << endl; 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 FatalError << "divSigmaExp method " << divSigmaExpMethod << " not found!" << nl
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"

View file

@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
} }
else if(divDSigmaExpMethod == "decompose") else if(divDSigmaExpMethod == "decompose")
{ {
surfaceTensorField shearGradDU = surfaceTensorField shearGradDU = ((I - n*n)&fvc::interpolate(gradDU));
((I - n*n)&fvc::interpolate(gradDU));
divDSigmaExp = fvc::div divDSigmaExp = fvc::div
( (
mesh.magSf() mesh.magSf()
*( *
(
- (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n)) - (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
+ lambdaf*tr(shearGradDU&(I - n*n))*n + lambdaf*tr(shearGradDU&(I - n*n))*n
+ muf*(shearGradDU&n) + muf*(shearGradDU&n)

View file

@ -1,7 +1,13 @@
//- how explicit component of sigma is to be calculated //- how explicit component of sigma is to be calculated
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp")); word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
Info << "Selecting divDSigmaExp calculation method " << divDSigmaExpMethod << endl; 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 FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"

View file

@ -7,9 +7,10 @@ if(leftPatchID == -1)
} }
//- calculate force in x direction on leftClamp patch //- calculate force in x direction on leftClamp patch
scalar leftForce = gSum( scalar leftForce = gSum
vector(1, 0, 0) & (
(mesh.boundary()[leftPatchID].Sf() & sigma.boundaryField()[leftPatchID]) 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 //- patchIntegrate utility integrates it this way but this is worng because the sigma tensor should

View file

@ -1,7 +1,9 @@
{ {
forAll(mesh.boundary(), patchID) forAll(mesh.boundary(), patchID)
{ {
if(U.boundaryField()[patchID].type() if
(
U.boundaryField()[patchID].type()
== solidDirectionMixedFvPatchVectorField::typeName == solidDirectionMixedFvPatchVectorField::typeName
) )
{ {

View file

@ -83,7 +83,8 @@ int main(int argc, char *argv[])
fvm::d2dt2(rho, U) fvm::d2dt2(rho, U)
== ==
fvm::laplacian(2*mu + lambda, U, "laplacian(DU,U)") fvm::laplacian(2*mu + lambda, U, "laplacian(DU,U)")
+ fvc::div( + fvc::div
(
- ( (mu + lambda) * gradU ) - ( (mu + lambda) * gradU )
+ ( mu * gradU.T() ) + ( mu * gradU.T() )
+ ( mu * (gradU & gradU.T()) ) + ( mu * (gradU & gradU.T()) )

View file

@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
pointInterpolation.interpolate(U, pointU); pointInterpolation.interpolate(U, pointU);
const vectorField& pointUI = const vectorField& pointUI = pointU.internalField();
pointU.internalField();
//- Move mesh //- Move mesh
vectorField newPoints = mesh.allPoints(); vectorField newPoints = mesh.allPoints();

View file

@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
} }
else if(divDSigmaExpMethod == "decompose") else if(divDSigmaExpMethod == "decompose")
{ {
surfaceTensorField shearGradDU = surfaceTensorField shearGradDU = ((I - n*n)&fvc::interpolate(gradDU));
((I - n*n)&fvc::interpolate(gradDU));
divDSigmaExp = fvc::div divDSigmaExp = fvc::div
( (
mesh.magSf() mesh.magSf()
*( *
(
- (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n)) - (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
+ lambdaf*tr(shearGradDU&(I - n*n))*n + lambdaf*tr(shearGradDU&(I - n*n))*n
+ muf*(shearGradDU&n) + muf*(shearGradDU&n)

View file

@ -69,5 +69,4 @@ FieldField<Field, vector> extraVecs(ptc.size());
curExtraVectors.setSize(nFacesAroundPoint); curExtraVectors.setSize(nFacesAroundPoint);
} }
} }

View file

@ -91,7 +91,8 @@ FieldField<Field, scalar> w(ptc.size());
// Update coupled boundaries // Update coupled boundaries
// Work-around for cyclic parallels. // Work-around for cyclic parallels.
/*if (Pstream::parRun() && !mesh.parallelData().cyclicParallel()) /*
if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
{ {
forAll (volPointSumWeights.boundaryField(), patchI) forAll (volPointSumWeights.boundaryField(), patchI)
{ {
@ -111,7 +112,8 @@ FieldField<Field, scalar> w(ptc.size());
); );
} }
} }
}*/ }
*/
// Re-scale the weights for the current point // Re-scale the weights for the current point
forAll (ptc, pointI) forAll (ptc, pointI)

View file

@ -38,8 +38,7 @@ if(min(J.internalField()) > 0)
//- that class no longer works //- that class no longer works
# include "performEdgeCorrectedVolPointInterpolation.H" # include "performEdgeCorrectedVolPointInterpolation.H"
const vectorField& pointDUI = const vectorField& pointDUI = pointDU.internalField();
pointDU.internalField();
//- see the effect of correctBCs //- see the effect of correctBCs

View file

@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
pointInterpolation.interpolate(DU, pointDU); pointInterpolation.interpolate(DU, pointDU);
const vectorField& pointDUI = const vectorField& pointDUI = pointDU.internalField();
pointDU.internalField();
//- Move mesh //- Move mesh
vectorField newPoints = mesh.allPoints(); vectorField newPoints = mesh.allPoints();

View file

@ -7,7 +7,8 @@ pointVectorField& pf = pointDU;
// Do the correction // Do the correction
//GeometricField<Type, pointPatchField, pointMesh> pfCorr //GeometricField<Type, pointPatchField, pointMesh> pfCorr
/*pointVectorField pfCorr /*
pointVectorField pfCorr
( (
IOobject IOobject
( (
@ -23,7 +24,8 @@ pointVectorField& pf = pointDU;
//dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero), //dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero),
dimensionedVector("zero", pf.dimensions(), vector::zero), dimensionedVector("zero", pf.dimensions(), vector::zero),
pf.boundaryField().types() pf.boundaryField().types()
);*/ );
*/
pointVectorField pfCorr pointVectorField pfCorr
( (
@ -96,21 +98,25 @@ forAll (ptc, pointI)
} }
// Update coupled boundaries // Update coupled boundaries
/*forAll (pfCorr.boundaryField(), patchI) /*
forAll (pfCorr.boundaryField(), patchI)
{ {
if (pfCorr.boundaryField()[patchI].coupled()) if (pfCorr.boundaryField()[patchI].coupled())
{ {
pfCorr.boundaryField()[patchI].initAddField(); pfCorr.boundaryField()[patchI].initAddField();
} }
}*/ }
*/
/*forAll (pfCorr.boundaryField(), patchI) /*
forAll (pfCorr.boundaryField(), patchI)
{ {
if (pfCorr.boundaryField()[patchI].coupled()) if (pfCorr.boundaryField()[patchI].coupled())
{ {
pfCorr.boundaryField()[patchI].addField(pfCorr.internalField()); pfCorr.boundaryField()[patchI].addField(pfCorr.internalField());
} }
}*/ }
*/
//Info << "pfCorr: " << pfCorr << endl; //Info << "pfCorr: " << pfCorr << endl;

View file

@ -1,10 +1,13 @@
//- the method used to calculate the explicit component of sigma //- the method used to calculate the explicit component of sigma
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp")); word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
Info << "Calculation of divDSigmaExp method: " << divDSigmaExpMethod << endl; Info << "Calculation of divDSigmaExp method: " << divDSigmaExpMethod << endl;
if(divDSigmaExpMethod != "standard" if
(
divDSigmaExpMethod != "standard"
&& divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "surface"
&& divDSigmaExpMethod != "decompose" && divDSigmaExpMethod != "decompose"
&& divDSigmaExpMethod != "laplacian") && divDSigmaExpMethod != "laplacian"
)
{ {
FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"

View file

@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
} }
else if(divDSigmaExpMethod == "decompose") else if(divDSigmaExpMethod == "decompose")
{ {
surfaceTensorField shearGradDU = surfaceTensorField shearGradDU = ((I - n*n)&fvc::interpolate(gradDU));
((I - n*n)&fvc::interpolate(gradDU));
divDSigmaExp = fvc::div divDSigmaExp = fvc::div
( (
mesh.magSf() mesh.magSf()
*( *
(
- (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n)) - (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
+ lambdaf*tr(shearGradDU&(I - n*n))*n + lambdaf*tr(shearGradDU&(I - n*n))*n
+ muf*(shearGradDU&n) + muf*(shearGradDU&n)

View file

@ -69,5 +69,4 @@ FieldField<Field, vector> extraVecs(ptc.size());
curExtraVectors.setSize(nFacesAroundPoint); curExtraVectors.setSize(nFacesAroundPoint);
} }
} }

View file

@ -91,7 +91,8 @@ FieldField<Field, scalar> w(ptc.size());
// Update coupled boundaries // Update coupled boundaries
// Work-around for cyclic parallels. // Work-around for cyclic parallels.
/*if (Pstream::parRun() && !mesh.parallelData().cyclicParallel()) /*
if (Pstream::parRun() && !mesh.parallelData().cyclicParallel())
{ {
forAll (volPointSumWeights.boundaryField(), patchI) forAll (volPointSumWeights.boundaryField(), patchI)
{ {
@ -111,7 +112,8 @@ FieldField<Field, scalar> w(ptc.size());
); );
} }
} }
}*/ }
*/
// Re-scale the weights for the current point // Re-scale the weights for the current point
forAll (ptc, pointI) forAll (ptc, pointI)

View file

@ -41,8 +41,7 @@ if(min(J.internalField()) > 0)
//pointDU.write(); //pointDU.write();
const vectorField& pointDUI = const vectorField& pointDUI = pointDU.internalField();
pointDU.internalField();
// Move mesh // Move mesh
vectorField newPoints = mesh.allPoints(); vectorField newPoints = mesh.allPoints();

View file

@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
pointInterpolation.interpolate(DU, pointDU); pointInterpolation.interpolate(DU, pointDU);
const vectorField& pointDUI = const vectorField& pointDUI = pointDU.internalField();
pointDU.internalField();
//- Move mesh //- Move mesh
vectorField newPoints = mesh.allPoints(); vectorField newPoints = mesh.allPoints();

View file

@ -7,7 +7,8 @@ pointVectorField& pf = pointDU;
// Do the correction // Do the correction
//GeometricField<Type, pointPatchField, pointMesh> pfCorr //GeometricField<Type, pointPatchField, pointMesh> pfCorr
/*pointVectorField pfCorr /*
pointVectorField pfCorr
( (
IOobject IOobject
( (
@ -23,7 +24,8 @@ pointVectorField& pf = pointDU;
//dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero), //dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero),
dimensionedVector("zero", pf.dimensions(), vector::zero), dimensionedVector("zero", pf.dimensions(), vector::zero),
pf.boundaryField().types() pf.boundaryField().types()
);*/ );
*/
pointVectorField pfCorr pointVectorField pfCorr
( (
@ -96,21 +98,25 @@ forAll (ptc, pointI)
} }
// Update coupled boundaries // Update coupled boundaries
/*forAll (pfCorr.boundaryField(), patchI) /*
forAll (pfCorr.boundaryField(), patchI)
{ {
if (pfCorr.boundaryField()[patchI].coupled()) if (pfCorr.boundaryField()[patchI].coupled())
{ {
pfCorr.boundaryField()[patchI].initAddField(); pfCorr.boundaryField()[patchI].initAddField();
} }
}*/ }
*/
/*forAll (pfCorr.boundaryField(), patchI) /*
forAll (pfCorr.boundaryField(), patchI)
{ {
if (pfCorr.boundaryField()[patchI].coupled()) if (pfCorr.boundaryField()[patchI].coupled())
{ {
pfCorr.boundaryField()[patchI].addField(pfCorr.internalField()); pfCorr.boundaryField()[patchI].addField(pfCorr.internalField());
} }
}*/ }
*/
//Info << "pfCorr: " << pfCorr << endl; //Info << "pfCorr: " << pfCorr << endl;

View file

@ -1,10 +1,13 @@
//- the method used to calculate the explicit component of sigma //- the method used to calculate the explicit component of sigma
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp")); word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
Info << "Calculation of divDSigmaExp method: " << divDSigmaExpMethod << endl; Info << "Calculation of divDSigmaExp method: " << divDSigmaExpMethod << endl;
if(divDSigmaExpMethod != "standard" if
(
divDSigmaExpMethod != "standard"
&& divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "surface"
&& divDSigmaExpMethod != "decompose" && divDSigmaExpMethod != "decompose"
&& divDSigmaExpMethod != "laplacian") && divDSigmaExpMethod != "laplacian"
)
{ {
FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"

View file

@ -17,13 +17,13 @@ if(divDSigmaExpMethod == "standard")
} }
else if(divDSigmaExpMethod == "decompose") else if(divDSigmaExpMethod == "decompose")
{ {
surfaceTensorField shearGradU = surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradDU));
((I - n*n)&fvc::interpolate(gradDU));
divDSigmaExp = fvc::div divDSigmaExp = fvc::div
( (
mesh.magSf() mesh.magSf()
*( *
(
- (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n)) - (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n))
+ lambdaf*tr(shearGradU&(I - n*n))*n + lambdaf*tr(shearGradU&(I - n*n))*n
+ muf*(shearGradU&n) + muf*(shearGradU&n)

View file

@ -1,7 +1,13 @@
//- how explicit component of sigma is to be calculated //- how explicit component of sigma is to be calculated
word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp")); word divDSigmaExpMethod(mesh.solutionDict().subDict("stressedFoam").lookup("divDSigmaExp"));
Info << "Selecting divDSigmaExp calculation method " << divDSigmaExpMethod << endl; 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 FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << nl
<< "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian"

View file

@ -17,13 +17,13 @@ if(divSigmaExpMethod == "standard")
} }
else if(divSigmaExpMethod == "decompose") else if(divSigmaExpMethod == "decompose")
{ {
surfaceTensorField shearGradU = surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradU));
((I - n*n)&fvc::interpolate(gradU));
divSigmaExp = fvc::div divSigmaExp = fvc::div
( (
mesh.magSf() mesh.magSf()
*( *
(
- (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n)) - (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n))
+ lambdaf*tr(shearGradU&(I - n*n))*n + lambdaf*tr(shearGradU&(I - n*n))*n
+ muf*(shearGradU&n) + muf*(shearGradU&n)

View file

@ -17,13 +17,13 @@ if(sigmaExpMethod == "standard")
} }
else if(sigmaExpMethod == "decompose") else if(sigmaExpMethod == "decompose")
{ {
surfaceTensorField shearGradU = surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradU));
((I - n*n)&fvc::interpolate(gradU));
sigmaExp = fvc::div sigmaExp = fvc::div
( (
mesh.magSf() mesh.magSf()
*( *
(
- (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n)) - (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n))
+ lambdaf*tr(shearGradU&(I - n*n))*n + lambdaf*tr(shearGradU&(I - n*n))*n
+ muf*(shearGradU&n) + muf*(shearGradU&n)

View file

@ -13,7 +13,8 @@
} }
//- update patch //- update patch
if( if
(
U.boundaryField()[patchID].type() U.boundaryField()[patchID].type()
== fixedValueFvPatchVectorField::typeName == fixedValueFvPatchVectorField::typeName
) )
@ -27,7 +28,6 @@
<< " to " << disp << " to " << disp
<< endl; << endl;
} }
else else
{ {
SeriousError << "Loading Patch " << patchName << " is type " SeriousError << "Loading Patch " << patchName << " is type "

View file

@ -103,7 +103,7 @@
word solidDdtScheme word solidDdtScheme
( (
stressMesh.ddtScheme("ddt(" + DU.name() +')') stressMesh.schemesDict().ddtScheme("ddt(" + DU.name() +')')
); );
// if // if

View file

@ -31,8 +31,7 @@ if(min(J.internalField()) > 0)
pointInterpolation.interpolate(DU, pointDU); pointInterpolation.interpolate(DU, pointDU);
const vectorField& pointDUI = const vectorField& pointDUI = pointDU.internalField();
pointDU.internalField();
//- Move mesh //- Move mesh
vectorField newPoints = stressMesh.allPoints(); vectorField newPoints = stressMesh.allPoints();

View file

@ -68,23 +68,28 @@ Foam::contactPatchPair::contactPatchPair
// ), // ),
// vectorField(cp_.mesh().boundaryMesh()[slavePatch_.index()].pointNormals().size(), vector::zero) // vectorField(cp_.mesh().boundaryMesh()[slavePatch_.index()].pointNormals().size(), vector::zero)
// ), // ),
slavePointPenetration_( slavePointPenetration_
(
cp_.mesh().boundaryMesh()[slavePatch_.index()].pointNormals().size(), cp_.mesh().boundaryMesh()[slavePatch_.index()].pointNormals().size(),
0.0 0.0
), ),
masterPointPenetration_( masterPointPenetration_
(
cp_.mesh().boundaryMesh()[masterPatch_.index()].pointNormals().size(), cp_.mesh().boundaryMesh()[masterPatch_.index()].pointNormals().size(),
0.0 0.0
), ),
globalSlavePointPenetration_( globalSlavePointPenetration_
(
cp_.mesh().pointZones()[cp_.mesh().faceZones().findZoneID(slaveFaceZoneName_)].size(), cp_.mesh().pointZones()[cp_.mesh().faceZones().findZoneID(slaveFaceZoneName_)].size(),
0.0 0.0
), ),
globalMasterPointPenetration_( globalMasterPointPenetration_
(
cp_.mesh().pointZones()[cp_.mesh().faceZones().findZoneID(masterFaceZoneName_)].size(), cp_.mesh().pointZones()[cp_.mesh().faceZones().findZoneID(masterFaceZoneName_)].size(),
0.0 0.0
), ),
oldTotalSlavePointForce_( oldTotalSlavePointForce_
(
cp_.mesh().boundaryMesh()[slavePatch_.index()].pointNormals().size(), cp_.mesh().boundaryMesh()[slavePatch_.index()].pointNormals().size(),
vector::zero vector::zero
), ),
@ -92,7 +97,8 @@ Foam::contactPatchPair::contactPatchPair
penetrationLimit_(readScalar(dict.lookup("penetrationLimit"))), penetrationLimit_(readScalar(dict.lookup("penetrationLimit"))),
rigidMaster_(dict.lookup("rigidMaster")), rigidMaster_(dict.lookup("rigidMaster")),
interpolationMethod_(dict.lookup("interpolationMethod")), interpolationMethod_(dict.lookup("interpolationMethod")),
faceZoneMasterToSlaveInterpolator_( faceZoneMasterToSlaveInterpolator_
(
cp_.mesh().faceZones()[cp_.mesh().faceZones().findZoneID(masterFaceZoneName_)](), // from cp_.mesh().faceZones()[cp_.mesh().faceZones().findZoneID(masterFaceZoneName_)](), // from
cp_.mesh().faceZones()[cp_.mesh().faceZones().findZoneID(slaveFaceZoneName_)](), // to zone cp_.mesh().faceZones()[cp_.mesh().faceZones().findZoneID(slaveFaceZoneName_)](), // to zone
alg_, alg_,

View file

@ -34,7 +34,6 @@ Description
void Foam::contactPatchPair::correct() void Foam::contactPatchPair::correct()
{ {
//---------------------PRELIMINARIES---------------------------------// //---------------------PRELIMINARIES---------------------------------//
const fvMesh& mesh = cp_.mesh(); const fvMesh& mesh = cp_.mesh();
const label& masterIndex = masterPatch_.index(); const label& masterIndex = masterPatch_.index();
@ -42,28 +41,24 @@ void Foam::contactPatchPair::correct()
scalar maxMagSlaveTraction = 0.0; scalar maxMagSlaveTraction = 0.0;
contactIterNum_++; contactIterNum_++;
//--------CALCULATE MASTER AND SLAVE PENETRATIONS----------------------// //--------CALCULATE MASTER AND SLAVE PENETRATIONS----------------------//
scalarField& globalSlavePointPenetration = globalSlavePointPenetration_; scalarField& globalSlavePointPenetration = globalSlavePointPenetration_;
//scalarField& globalMasterPointPenetration = globalMasterPointPenetration_; //scalarField& globalMasterPointPenetration = globalMasterPointPenetration_;
//- tell zoneToZone that mesh has moved, so the intersection will be recalculated //- tell zoneToZone that mesh has moved, so the intersection will be recalculated
faceZoneMasterToSlaveInterpolator_.movePoints(); faceZoneMasterToSlaveInterpolator_.movePoints();
//- calculate intersection distances //- calculate intersection distances
//- this is the slowest part of the contact correction especially when the slavePatch //- this is the slowest part of the contact correction especially when the slavePatch
//- has many points. parallelisation of this step should be considered. //- has many points. parallelisation of this step should be considered.
globalSlavePointPenetration globalSlavePointPenetration =
= faceZoneMasterToSlaveInterpolator_.pointDistanceToIntersection(); faceZoneMasterToSlaveInterpolator_.pointDistanceToIntersection();
//globalMasterPointPenetration
//= faceZoneSlaveToMasterInterpolator.pointDistanceToIntersection();
//globalMasterPointPenetration =
// faceZoneSlaveToMasterInterpolator.pointDistanceToIntersection();
scalarField& slavePointPenetration = slavePointPenetration_; scalarField& slavePointPenetration = slavePointPenetration_;
//scalarField& masterPointPenetration = masterPointPenetration_; //scalarField& masterPointPenetration = masterPointPenetration_;
forAll(slavePointPenetration, pointI) forAll(slavePointPenetration, pointI)
{ {
//label pointGlobalLabel = slavePointLabels[pointI]; //label pointGlobalLabel = slavePointLabels[pointI];
@ -95,8 +90,6 @@ void Foam::contactPatchPair::correct()
// } // }
//------CALCULATE SLAVE VERTEX FORCES BASED ON PENETRATION-------------// //------CALCULATE SLAVE VERTEX FORCES BASED ON PENETRATION-------------//
//- approximation of penaltyFactor //- approximation of penaltyFactor
//- this should be automatic, these numbers don't really matter, the scaleFactor //- 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(); const vectorField& slavePointNormals = mesh.boundaryMesh()[slaveIndex].pointNormals();
vectorField& totalSlavePointForce = totalSlavePointForce_; vectorField& totalSlavePointForce = totalSlavePointForce_;
int numSlaveContactPoints = 0; label numSlaveContactPoints = 0;
int numSlaveContactPointsReducing = 0; label numSlaveContactPointsReducing = 0;
int numSlavesUpdated = 0; label numSlavesUpdated = 0;
//- so the procs know the global min //- so the procs know the global min
//scalar minSlavePointPenetration = gMin(slavePointPenetration); //scalar minSlavePointPenetration = gMin(slavePointPenetration);
@ -134,7 +127,9 @@ void Foam::contactPatchPair::correct()
numSlavesUpdated++; numSlavesUpdated++;
//- force is linearly dependent on penetration //- force is linearly dependent on penetration
totalSlavePointForce[pointI] += 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 point is within contact tolerance then don't add any more force
else if(slavePointPenetration[pointI] < 0.0) else if(slavePointPenetration[pointI] < 0.0)
@ -151,7 +146,9 @@ void Foam::contactPatchPair::correct()
// point forces must be reduced slowly // point forces must be reduced slowly
totalSlavePointForce[pointI] += totalSlavePointForce[pointI] +=
( slavePointNormals[pointI] * returnPenaltyFactor * slavePointPenetration[pointI] ); (
slavePointNormals[pointI]*returnPenaltyFactor*slavePointPenetration[pointI]
);
// if a tensile force develops // if a tensile force develops
if((totalSlavePointForce[pointI] & slavePointNormals[pointI]) > 0.0) if((totalSlavePointForce[pointI] & slavePointNormals[pointI]) > 0.0)
@ -185,10 +182,10 @@ void Foam::contactPatchPair::correct()
//- for a deformable master //- for a deformable master
if(!rigidMaster_) if(!rigidMaster_)
{ {
const label slaveFaceZoneID const label slaveFaceZoneID =
= mesh.faceZones().findZoneID(slaveFaceZoneName_); mesh.faceZones().findZoneID(slaveFaceZoneName_);
const label slavePatchStart const label slavePatchStart =
= mesh.boundaryMesh()[slaveIndex].start(); mesh.boundaryMesh()[slaveIndex].start();
scalarField globalSlavePressure scalarField globalSlavePressure
( (
@ -231,14 +228,13 @@ void Foam::contactPatchPair::correct()
); );
} }
//- exchange parallel data //- exchange parallel data
reduce(globalMasterPressure, maxOp<scalarField>()); reduce(globalMasterPressure, maxOp<scalarField>());
//Pout << "The max global master trac is " << max(globalMasterPressure) << endl; //Pout << "The max global master trac is " << max(globalMasterPressure) << endl;
const label masterPatchStart const label masterPatchStart =
= mesh.boundaryMesh()[masterIndex].start(); mesh.boundaryMesh()[masterIndex].start();
scalarField masterPressure(mesh.boundaryMesh()[masterIndex].size(), 0.0); scalarField masterPressure(mesh.boundaryMesh()[masterIndex].size(), 0.0);

View file

@ -147,8 +147,6 @@ void contactProblem::correct()
} }
//**********************CONTACT AREA FUNCTION***********************************// //**********************CONTACT AREA FUNCTION***********************************//
tmp<volScalarField> contactProblem::contactArea() const tmp<volScalarField> contactProblem::contactArea() const
{ {
@ -189,19 +187,19 @@ tmp<volScalarField> contactProblem::contactArea() const
label slaveIndex = contacts[contactI].slavePatch().index(); label slaveIndex = contacts[contactI].slavePatch().index();
scalarField masterFrac = contacts[contactI].masterTouchFraction(); scalarField masterFrac = contacts[contactI].masterTouchFraction();
scalarField slaveFrac = contacts[contactI].slaveTouchFraction(); scalarField slaveFrac = contacts[contactI].slaveTouchFraction();
scalar contactAreaMaster = scalar contactAreaMaster = gSum
gSum
( (
masterFrac * masterFrac *
mag( mag
(
mesh().Sf().boundaryField()[masterIndex] mesh().Sf().boundaryField()[masterIndex]
) )
); );
scalar contactAreaSlave = scalar contactAreaSlave = gSum
gSum
( (
slaveFrac * slaveFrac *
mag( mag
(
mesh().Sf().boundaryField()[slaveIndex] mesh().Sf().boundaryField()[slaveIndex]
) )
); );
@ -275,8 +273,6 @@ void contactProblem::contactPointForce(pointVectorField& cPointForce)
} }
tmp<volScalarField> contactProblem::contactPressure() const tmp<volScalarField> contactProblem::contactPressure() const
{ {
tmp<volScalarField> tcPress tmp<volScalarField> tcPress

View file

@ -312,7 +312,6 @@ void plasticityModel::correct()
{ {
betaPatch[faceI] = 0; betaPatch[faceI] = 0;
curDEpsEPred = DEpsilonPatch[faceI]; curDEpsEPred = DEpsilonPatch[faceI];
if if
( (
(DEpsilonEqPatch[faceI] >= 0) (DEpsilonEqPatch[faceI] >= 0)
@ -448,7 +447,6 @@ void plasticityModel::updateYieldStress()
bool plasticityModel::read() bool plasticityModel::read()
{ {
if (regIOobject::read()) if (regIOobject::read())
{ {
return true; return true;

View file

@ -37,13 +37,15 @@ solvers
} }
/* U /*
U
{ {
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1e-09; tolerance 1e-09;
relTol 0.99; relTol 0.99;
}*/ }
*/
} }
stressedFoam stressedFoam

View file

@ -31,7 +31,6 @@ boundaryField
cohesive cohesive
{ {
type cohesiveZone; type cohesiveZone;
cohesiveLaw Dugdale; cohesiveLaw Dugdale;
relaxationFactor 0.9; relaxationFactor 0.9;

View file

@ -273,6 +273,7 @@ int main(int argc, char *argv[])
mesh, mesh,
dimensionedScalar("zero", dimless, 0.0) dimensionedScalar("zero", dimless, 0.0)
); );
forAll(theta.internalField(), celli) forAll(theta.internalField(), celli)
{ {
const scalar& x = mesh.C().internalField()[celli][vector::X]; 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]; 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, -::sin(t), ::cos(t), 0,
0, 0, 1); 0, 0, 1
);
} }
forAll(rotMat.boundaryField(), patchi) forAll(rotMat.boundaryField(), patchi)
@ -322,9 +326,12 @@ int main(int argc, char *argv[])
{ {
const scalar& t = theta.boundaryField()[patchi][facei]; 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, -::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]; const tensor& rot = rotMat.internalField()[celli];
symmTensor sigmaCart(r, 0, 0, symmTensor sigmaCart(r, 0, 0, t, 0, z);
t, 0,
z);
sigma.internalField()[celli] = sigma.internalField()[celli] =
symm(rot.T() & sigmaCart & rot); symm(rot.T() & sigmaCart & rot);
@ -374,16 +379,12 @@ int main(int argc, char *argv[])
const tensor& rot = rotMat.boundaryField()[patchi][facei]; const tensor& rot = rotMat.boundaryField()[patchi][facei];
symmTensor sigmaCart(r, 0, 0, symmTensor sigmaCart(r, 0, 0, t, 0, z);
t, 0,
z);
sigma.boundaryField()[patchi][facei] = sigma.boundaryField()[patchi][facei] =
symm(rot.T() & sigmaCart & rot); symm(rot.T() & sigmaCart & rot);
} }
} }
Info << "\nWriting analytical sigma tensor" << endl; Info << "\nWriting analytical sigma tensor" << endl;
sigma.write(); sigma.write();

View file

@ -110,14 +110,10 @@ int main(int argc, char *argv[])
label refFace = cells[celli][0]; label refFace = cells[celli][0];
//- insert first four abaqusCellPoints //- insert first four abaqusCellPoints
abaqusCellPoints[celli][0] abaqusCellPoints[celli][0] = (faces[refFace][3] + 1);
= (faces[refFace][3] + 1); abaqusCellPoints[celli][1] = (faces[refFace][2] + 1);
abaqusCellPoints[celli][1] abaqusCellPoints[celli][2] = (faces[refFace][1] + 1);
= (faces[refFace][2] + 1); abaqusCellPoints[celli][3] = (faces[refFace][0] + 1);
abaqusCellPoints[celli][2]
= (faces[refFace][1] + 1);
abaqusCellPoints[celli][3]
= (faces[refFace][0] + 1);
//- now find the opposite face in the cell //- now find the opposite face in the cell
//Info << "Finding oppFace" << endl << endl; //Info << "Finding oppFace" << endl << endl;
@ -181,29 +177,25 @@ int main(int argc, char *argv[])
label globalPpi = oppFacePPs[oppFacePointi]; label globalPpi = oppFacePPs[oppFacePointi];
if(globalPpi == faces[refFace][0]) if(globalPpi == faces[refFace][0])
{ {
abaqusCellPoints[celli][7] abaqusCellPoints[celli][7] = globalPointi + 1;
= globalPointi + 1;
ppFound = true; ppFound = true;
break; break;
} }
else if(globalPpi == faces[refFace][1]) else if(globalPpi == faces[refFace][1])
{ {
abaqusCellPoints[celli][6] abaqusCellPoints[celli][6] = globalPointi + 1;
= globalPointi + 1;
ppFound = true; ppFound = true;
break; break;
} }
else if(globalPpi == faces[refFace][2]) else if(globalPpi == faces[refFace][2])
{ {
abaqusCellPoints[celli][5] abaqusCellPoints[celli][5] = globalPointi + 1;
= globalPointi + 1;
ppFound = true; ppFound = true;
break; break;
} }
else if(globalPpi == faces[refFace][3]) else if(globalPpi == faces[refFace][3])
{ {
abaqusCellPoints[celli][4] abaqusCellPoints[celli][4] = globalPointi + 1;
= globalPointi + 1;
ppFound = true; ppFound = true;
break; break;
} }

View file

@ -78,4 +78,3 @@
DSigmaCorr -= sigma; DSigmaCorr -= sigma;
} }

View file

@ -110,7 +110,6 @@ int main(int argc, char *argv[])
gradDU = fvc::grad(DU); gradDU = fvc::grad(DU);
# include "calculateDEpsilonDSigma.H" # include "calculateDEpsilonDSigma.H"
} }
while while
( (

View file

@ -112,12 +112,6 @@ Foam::axisCoordinateRotation::axisCoordinateRotation
scalar theta = readScalar(dict.lookup("theta")); scalar theta = readScalar(dict.lookup("theta"));
scalar psi = readScalar(dict.lookup("psi")); scalar psi = readScalar(dict.lookup("psi"));
bool inDegrees = true;
if (dict.found("degrees"))
{
inDegrees = Switch(dict.lookup("degrees"));
}
calcTransform calcTransform
( (
phi, phi,

View file

@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be author's reputation will not be affected by problems that might be
introduced by others. introduced by others.
Finally, software patents pose a constant threat to the existence of Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a effectively restrict the users of a free program by obtaining a
@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The "work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must former contains code derived from the library, whereas the latter must
be combined with the library in order to run. be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@ -158,7 +158,7 @@ Library.
You may charge a fee for the physical act of transferring a copy, You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a and you may at your option offer warranty protection in exchange for a
fee. fee.
2. You may modify your copy or copies of the Library or any portion 2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1 distribute such modifications or work under the terms of Section 1
@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in that version instead if you wish.) Do not make any other change in
these notices. these notices.
Once this change is made in a given copy, it is irreversible for Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy. subsequent copies and derivative works made from that copy.
@ -267,7 +267,7 @@ Library will still fall under Section 6.)
distribute the object code for the work under the terms of Section 6. distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6, Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself. whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or 6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work work containing portions of the Library, and distribute that work
@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you use both them and the Library together in an executable that you
distribute. distribute.
7. You may place library facilities that are a work based on the 7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined facilities not covered by this License, and distribute such a combined
@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein. restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with You are not responsible for enforcing compliance by third parties with
this License. this License.
11. If, as a consequence of a court judgment or allegation of patent 11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues), infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or conditions are imposed on you (whether by court order, agreement or
@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by license version number, you may choose any version ever published by
the Free Software Foundation. the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free 14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these, programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is write to the author to ask for permission. For software which is
@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES. DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest If you develop a new library, and you want it to be of the greatest

View file

@ -27,6 +27,7 @@ License
#include "dimensionedScalar.H" #include "dimensionedScalar.H"
#include "equationReader.H" #include "equationReader.H"
#include "equationOperation.H" #include "equationOperation.H"
#include "error.H"
//#include "equationOperationList.H" //#include "equationOperationList.H"
class dimensionedScalar; class dimensionedScalar;
@ -396,6 +397,16 @@ Foam::word Foam::equationOperation::opName
return "min"; return "min";
case otstabilise: case otstabilise:
return "stabilise"; return "stabilise";
default:
FatalErrorIn
(
"Foam::word Foam::equationOperation::opName"
"(const Foam::equationOperation::operationType& op)"
)
<< "invalid operation"
<< exit(FatalError);
return "invalid";
} }
} }
@ -423,6 +434,16 @@ Foam::word Foam::equationOperation::sourceName
return "equation"; return "equation";
case slstorage: case slstorage:
return "memory"; return "memory";
default:
FatalErrorIn
(
"Foam::word Foam::equationOperation::opName"
"(const Foam::equationOperation::operationType& op)"
)
<< "invalid source"
<< exit(FatalError);
return "invalid";
} }
} }

View file

@ -81,7 +81,6 @@ Foam::tmp<Foam::scalarField> Foam::mixingPlaneGAMGInterface::agglomerateCoeffs
// AMG agglomeration missing // AMG agglomeration missing
notImplemented("mixingPlaneGAMGInterface::agglomerateCoeffs"); notImplemented("mixingPlaneGAMGInterface::agglomerateCoeffs");
tmp<scalarField> tcoarseCoeffs(new scalarField(size(), 0.0)); tmp<scalarField> tcoarseCoeffs(new scalarField(size(), 0.0));
scalarField& coarseCoeffs = tcoarseCoeffs();
return tcoarseCoeffs; return tcoarseCoeffs;
} }

View file

@ -102,7 +102,6 @@ void Foam::polyMesh::initMesh()
nCells++; nCells++;
label nUsedFaces = 0; label nUsedFaces = 0;
label nIntFaces = 0;
// Use patch info if provided, use all faces otherwise // Use patch info if provided, use all faces otherwise
if (boundary_.size()) if (boundary_.size())
@ -110,13 +109,11 @@ void Foam::polyMesh::initMesh()
nUsedFaces = nUsedFaces =
boundary_[boundary_.size() - 1].start() boundary_[boundary_.size() - 1].start()
+ boundary_[boundary_.size() - 1].size(); + boundary_[boundary_.size() - 1].size();
nIntFaces = boundary_[0].start();
} }
else else
{ {
// No patch info. Assume all faces are used. // No patch info. Assume all faces are used.
nUsedFaces = owner_.size(); nUsedFaces = owner_.size();
nIntFaces = neighbour_.size();
} }

View file

@ -57,7 +57,8 @@ bool dynamicTopoFvMesh::meshQuality
label nCells = 0, minCell = -1; label nCells = 0, minCell = -1;
scalar maxQuality = -GREAT; scalar maxQuality = -GREAT;
scalar minQuality = GREAT; scalar minQuality = GREAT;
scalar cQuality, meanQuality = 0.0; scalar cQuality = 0.0;
scalar meanQuality = 0.0;
// Track slivers // Track slivers
bool sliversAbsent = true; bool sliversAbsent = true;
@ -1682,7 +1683,8 @@ bool dynamicTopoFvMesh::checkCollapse
) const ) const
{ {
label faceIndex = -1; label faceIndex = -1;
scalar cQuality = 0.0, oldVolume = 0.0; scalar cQuality = 0.0;
scalar oldVolume = 0.0;
const cell& cellToCheck = cells_[cellIndex]; const cell& cellToCheck = cells_[cellIndex];
// Look for a face that doesn't contain 'pointIndex' // Look for a face that doesn't contain 'pointIndex'

View file

@ -180,7 +180,8 @@ void eMesh::calcEdgePoints() const
// NOTE: Will work only on tetrahedral meshes! // NOTE: Will work only on tetrahedral meshes!
bool found; bool found;
label faceIndex = -1, cellIndex = -1; label faceIndex = -1
label cellIndex = -1;
const labelList& owner = mesh_.faceOwner(); const labelList& owner = mesh_.faceOwner();
const labelList& neighbour = mesh_.faceNeighbour(); const labelList& neighbour = mesh_.faceNeighbour();
const cellList& cells = mesh_.cells(); const cellList& cells = mesh_.cells();

View file

@ -126,16 +126,14 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::skewness() const
forAll (nei, faceI) forAll (nei, faceI)
{ {
scalar dOwn = scalar dOwn = mag
mag
( (
(faceCtrs[faceI] - cellCtrs[own[faceI]]) (faceCtrs[faceI] - cellCtrs[own[faceI]])
&areas[faceI] &areas[faceI]
) )
/mag(areas[faceI]); /mag(areas[faceI]);
scalar dNei = scalar dNei = mag
mag
( (
(cellCtrs[nei[faceI]] - faceCtrs[faceI]) (cellCtrs[nei[faceI]] - faceCtrs[faceI])
&areas[faceI] &areas[faceI]
@ -176,8 +174,8 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::skewness() const
+ ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n; + ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n;
scalar skewness = scalar skewness =
mag(faceCentres[faceI] - faceIntersection)/ mag(faceCentres[faceI] - faceIntersection)
( /(
mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]]) mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]])
+ VSMALL + VSMALL
); );
@ -273,16 +271,14 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const
forAll (nei, faceI) forAll (nei, faceI)
{ {
scalar dOwn = scalar dOwn = mag
mag
( (
(faceCtrs[faceI] - cellCtrs[own[faceI]]) (faceCtrs[faceI] - cellCtrs[own[faceI]])
&areas[faceI] &areas[faceI]
) )
/mag(areas[faceI]); /mag(areas[faceI]);
scalar dNei = scalar dNei = mag
mag
( (
(cellCtrs[nei[faceI]] - faceCtrs[faceI]) (cellCtrs[nei[faceI]] - faceCtrs[faceI])
&areas[faceI] &areas[faceI]
@ -322,8 +318,8 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const
+ ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n; + ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n;
result[globalFaceI++] = result[globalFaceI++] =
mag(faceCentres[faceI] - faceIntersection)/ mag(faceCentres[faceI] - faceIntersection)
( /(
mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]]) mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]])
+ VSMALL + VSMALL
); );

View file

@ -14,13 +14,10 @@
if(valves_[valveI].curLift() >= valves_[valveI].deformationLift()) if(valves_[valveI].curLift() >= valves_[valveI].deformationLift())
{ {
bool isMoving(false);
if(mag(valves_[valveI].curVelocity()) > 0) if(mag(valves_[valveI].curVelocity()) > 0)
{ {
Info<< "Valve n. " << valveI << " is moving with velocity = " Info<< "Valve n. " << valveI << " is moving with velocity = "
<< valves_[valveI].curVelocity() << endl; << valves_[valveI].curVelocity() << endl;
isMoving = true;
} }
Info<< "Valve displacement for valve " << valveI << " = " Info<< "Valve displacement for valve " << valveI << " = "

View file

@ -94,7 +94,6 @@ void Foam::layerAR::addZonesAndModifiers()
bool foundAtLeastOne = false; bool foundAtLeastOne = false;
scalar zHigher = GREAT; scalar zHigher = GREAT;
scalar zLower = GREAT;
scalar dh = GREAT; scalar dh = GREAT;
scalar dl = GREAT; scalar dl = GREAT;
@ -108,7 +107,6 @@ void Foam::layerAR::addZonesAndModifiers()
{ {
if (zPistV - zc > 0 && zPistV - zc < dl) if (zPistV - zc > 0 && zPistV - zc < dl)
{ {
zLower = zc;
dl = zPistV - zc; dl = zPistV - zc;
} }

View file

@ -95,7 +95,6 @@ void Foam::layerARGambit::addZonesAndModifiers()
bool foundAtLeastOne = false; bool foundAtLeastOne = false;
scalar zHigher = GREAT; scalar zHigher = GREAT;
scalar zLower = GREAT;
scalar dh = GREAT; scalar dh = GREAT;
scalar dl = GREAT; scalar dl = GREAT;
@ -109,7 +108,6 @@ void Foam::layerARGambit::addZonesAndModifiers()
{ {
if (zPistV - zc > 0 && zPistV - zc < dl) if (zPistV - zc > 0 && zPistV - zc < dl)
{ {
zLower = zc;
dl = zPistV - zc; dl = zPistV - zc;
} }

View file

@ -105,7 +105,6 @@ void Foam::simpleTwoStroke::addZonesAndModifiers()
bool foundAtLeastOne = false; bool foundAtLeastOne = false;
scalar zHigher = GREAT; scalar zHigher = GREAT;
scalar zLower = GREAT;
scalar dh = GREAT; scalar dh = GREAT;
scalar dl = GREAT; scalar dl = GREAT;
@ -127,7 +126,6 @@ void Foam::simpleTwoStroke::addZonesAndModifiers()
{ {
if (zPistV - zc > 0 && zPistV - zc < dl) if (zPistV - zc > 0 && zPistV - zc < dl)
{ {
zLower = zc;
dl = zPistV - zc; dl = zPistV - zc;
} }

View file

@ -21,7 +21,6 @@
bool foundAtLeastOne = false; bool foundAtLeastOne = false;
scalar zHigher = GREAT; scalar zHigher = GREAT;
scalar zLower = GREAT;
scalar dh = GREAT; scalar dh = GREAT;
scalar dl = GREAT; scalar dl = GREAT;
@ -35,7 +34,6 @@
{ {
if (zPistV - zc > 0 && zPistV - zc < dl) if (zPistV - zc > 0 && zPistV - zc < dl)
{ {
zLower = zc;
dl = zPistV - zc; dl = zPistV - zc;
} }

View file

@ -14,7 +14,6 @@
label nMovingCells = 0; label nMovingCells = 0;
label valvePatchID = valves_[i-1].poppetPatchID().index(); label valvePatchID = valves_[i-1].poppetPatchID().index();
const polyPatch& valveTopPatch = boundaryMesh()[valvePatchID];
scalar minPopZ = min(boundary()[valvePatchID].patch().localPoints()).z(); scalar minPopZ = min(boundary()[valvePatchID].patch().localPoints()).z();
forAll(cellCentres(),cellI) forAll(cellCentres(),cellI)
@ -60,7 +59,6 @@
label nMovingCells = 0; label nMovingCells = 0;
label valvePatchID = valves_[i-1].bottomPatchID().index(); label valvePatchID = valves_[i-1].bottomPatchID().index();
const polyPatch& valveBottomPatch = boundaryMesh()[valvePatchID];
scalar maxPopZ = max(boundary()[valvePatchID].patch().localPoints()).z(); scalar maxPopZ = max(boundary()[valvePatchID].patch().localPoints()).z();

View file

@ -57,7 +57,6 @@ void ignitionSite::findIgnitionCells(const fvMesh& mesh)
cellVolumes_[0] = vols[ignCell]; cellVolumes_[0] = vols[ignCell];
scalar minDist = GREAT; scalar minDist = GREAT;
label nearestCell = 0;
label nIgnCells = 1; label nIgnCells = 1;
forAll(centres, celli) forAll(centres, celli)
@ -66,7 +65,6 @@ void ignitionSite::findIgnitionCells(const fvMesh& mesh)
if (dist < minDist) if (dist < minDist)
{ {
nearestCell = celli;
minDist = dist; minDist = dist;
} }

View file

@ -38,8 +38,8 @@ namespace Foam
{ {
// Temporary hack: useful for tracking balance of phi across interface // Temporary hack: useful for tracking balance of phi across interface
void void traceMixingPlaneFlux
traceMixingPlaneFlux( (
volVectorField& U, volVectorField& U,
surfaceScalarField& phi, surfaceScalarField& phi,
scalar& masterPatchScaleFactor, scalar& masterPatchScaleFactor,
@ -93,12 +93,9 @@ traceMixingPlaneFlux(
<< mag(phiFromU - shadowPhiFromU)/(phiFromU + SMALL)*100 << mag(phiFromU - shadowPhiFromU)/(phiFromU + SMALL)*100
<< " %" << " %"
<< endl; << endl;
}
} }
} }
} }
} }
}

View file

@ -467,7 +467,6 @@ void Foam::parcel::updateParcelProperties
scalar oldhv = fuels.hl(pg, T(), X()); scalar oldhv = fuels.hl(pg, T(), X());
scalar Np = N(oldDensity); scalar Np = N(oldDensity);
scalar newDensity = oldDensity;
scalar newMass = oldMass; scalar newMass = oldMass;
scalar newhg = oldhg; scalar newhg = oldhg;
scalar newhv = oldhv; scalar newhv = oldhv;
@ -496,7 +495,6 @@ void Foam::parcel::updateParcelProperties
// the first time // the first time
if (n > 1) if (n > 1)
{ {
newDensity = fuels.rho(pg, Tnew, X());
newMass = m(); newMass = m();
newhg = 0.0; newhg = 0.0;
scalarField Ynew(fuels.Y(X())); scalarField Ynew(fuels.Y(X()));

View file

@ -119,11 +119,6 @@ void LISA::atomizeParcel
scalar rhoFuel = fuels.rho(1.0e+5, p.T(), p.X()); scalar rhoFuel = fuels.rho(1.0e+5, p.T(), p.X());
scalar nuFuel = muFuel/rhoFuel; scalar nuFuel = muFuel/rhoFuel;
vector uDir = p.U()/mag(p.U());
scalar uGas = mag(vel & uDir);
vector Ug = uGas*uDir;
/* /*
TL TL
It might be the relative velocity between Liquid and Gas, but I use the It might be the relative velocity between Liquid and Gas, but I use the

View file

@ -124,9 +124,6 @@ void SHF::breakupParcel
scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid); scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid);
scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL); scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
vector acceleration = p.Urel(vel)/p.tMom();
vector trajectory = p.U()/mag(p.U());
vector vRel = p.Urel(vel); vector vRel = p.Urel(vel);
scalar weGasCorr = weGas/(1.0 + weCorrCoeff_ * ohnesorge); scalar weGasCorr = weGas/(1.0 + weCorrCoeff_ * ohnesorge);

View file

@ -256,9 +256,6 @@ void blobsSwirlInjector::calculateHX
) )
); );
scalar hOLD = -100.0;
scalar xOLD = -100.0;
label i; label i;
for(i=0; i<20; i++) for(i=0; i<20; i++)
@ -287,9 +284,6 @@ void blobsSwirlInjector::calculateHX
x_ = sqr(1.0 - 2.0 * h_/injectorDiameter); x_ = sqr(1.0 - 2.0 * h_/injectorDiameter);
hOLD = h_;
xOLD = x_;
} }
x_ = sqr(1.0 - 2.0 * h_/injectorDiameter); x_ = sqr(1.0 - 2.0 * h_/injectorDiameter);

View file

@ -2955,7 +2955,6 @@ char *timestring ( void )
# define TIME_SIZE 29 # define TIME_SIZE 29
const struct tm *tm; const struct tm *tm;
size_t len;
time_t now; time_t now;
char *s; char *s;
@ -2964,7 +2963,7 @@ char *timestring ( void )
s = new char[TIME_SIZE]; s = new char[TIME_SIZE];
len = strftime ( s, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm ); strftime ( s, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm );
return s; return s;
# undef TIME_SIZE # undef TIME_SIZE

View file

@ -179,10 +179,12 @@ void Foam::multiSolver::synchronizeParallel() const
} }
else else
{ {
// Recieve go signal // Receive go signal
{ {
IPstream fromMaster(Pstream::blocking, Pstream::masterNo()); IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
bool okayToGo(readBool(fromMaster)); // Quenching compiler warning
// HR, 18/Jul/2013
readBool(fromMaster);
} }
} }
} }

View file

@ -1,6 +1,8 @@
// Common elements in the constructor initialization list for multiSolver // Common elements in the constructor initialization list for multiSolver
multiDicts_(NULL), // Quenching compiler warning
// HR, 18/Jul/2013
multiDicts_(0),
multiSolverControl_(multiControlDict_.subDict("multiSolverControl")), multiSolverControl_(multiControlDict_.subDict("multiSolverControl")),
solverDomains_(multiControlDict_.subDict("solverDomains")), solverDomains_(multiControlDict_.subDict("solverDomains")),

View file

@ -94,9 +94,12 @@ Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::restrain
refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1); refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1);
vector oldDir = refQ_ & refDir; // Must update existing variables - not create new ones
// HR 18/Jul/2013
vector newDir = motion.orientation() & refDir; oldDir = refQ_ & refDir;
newDir = motion.orientation() & refDir;
} }
// Removing any axis component from oldDir and newDir and normalising // Removing any axis component from oldDir and newDir and normalising

View file

@ -96,9 +96,11 @@ Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::restrain
refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1); refDir = rotationTensor(vector(1, 0 ,0), axis_) & vector(0, 0, 1);
vector oldDir = refQ_ & refDir; // Must update existing variables - not create new ones
// HR 18/Jul/2013
oldDir = refQ_ & refDir;
vector newDir = motion.orientation() & refDir; newDir = motion.orientation() & refDir;
} }
// Removing any axis component from oldDir and newDir and normalising // Removing any axis component from oldDir and newDir and normalising

View file

@ -1 +0,0 @@
../linux64Gcc/mplibSYSTEMOPENMPI

View file

@ -0,0 +1 @@
PFLAGS = -DOMPI_SKIP_MPICXX