From 6619d0b46242dcf090dc007aa0166026de3a3a63 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 13 Jan 2014 11:59:08 +0000 Subject: [PATCH 01/66] Updated list of contributors --- ListOfContributors | 77 ++++++++++++++++++++++++++++++++++++ README | 50 +---------------------- ReleaseNotes-foam-extend-3.0 | 55 +------------------------- 3 files changed, 80 insertions(+), 102 deletions(-) create mode 100644 ListOfContributors diff --git a/ListOfContributors b/ListOfContributors new file mode 100644 index 000000000..e033eaa81 --- /dev/null +++ b/ListOfContributors @@ -0,0 +1,77 @@ +# -*- mode: org; -*- +# +#+TITLE: *Cumulative List of Contributors for foam-extend-3.0* +#+AUTHOR: Hrvoje Jasak. +#+DATE: 10 January 2014 +#+LINK: http://foam-extend.org +#+OPTIONS: author:nil + +################################################################################ + +Contents: +* List of Contributors + +################################################################################ + + +* List of Contributors + + (If your name is missing in the list, please contact the maintainers at + and it will be added asap.) + + Henry Weller + Hrvoje Jasak + Mattijs Janssens + Zeljko Tukovic + Bernhard Gschaider + Tommaso Lucchini + Martin Beaudoin + Sandeep Menon + Niklas Nordin + Eugene De Villiers + Henrik Rusche + Ivor Clifford + Philiposse Rajan + Gavin Tabor + Jovani Favero + Frank Bos + David Hill + Niklas Wikstrom + Dubravko Matijasevic + Darrin Stephens + Christian Beck + Oliver Borm + James Criner + Hua Shan + David Boner + Pierre-Olivier Dallaire + Norman Del Puppo + Dennis Kingsley + Frank Albina + Flavio Galeazzo + Hannes Kroger + Olivier Petit + David Schmidt + Andreas Feymark + Luca Mangani + Daniel Schmode + Christoph Goniva + Takuya Oshima + Juho Peltola + Eric Paterson + Fabian Peng Karrholm + Aleksandar Karac + Maria Garcia Camprubi + Chris Greenshields + Mark Olesen + Hilary Spencer + Andy Heather + Dominik Christ + Peter Janas + Niels Linnemann + Nikola Kornev + Philip Cardiff + Declan Carolan + Michael Leonard + David McAuliffe + Tian Tang diff --git a/README b/README index b196be006..ef2b82318 100644 --- a/README +++ b/README @@ -168,54 +168,8 @@ * Instructions on how to contribute http://www.extend-project.de/project-final/how-to-contribute -* List of Contributors - Henry Weller - Hrvoje Jasak - Mattijs Janssens - Zeljko Tukovic - Bernhard Gschaider - Tommaso Lucchini - Martin Beaudoin - Sandeep Menon - Niklas Nordin - Eugene De Villiers - Henrik Rusche - Ivor Clifford - Philiposse Rajan - Gavin Tabor - Jovani Favero - Frank Bos - David Hill - Niklas Wikstrom - Dubravko Matijasevic - Darrin Stephens - Christian Beck - Oliver Borm - James Criner - Hua Shan - David Boner - Pierre-Olivier Dallaire - Norman Del Puppo - Dennis Kingsley - Frank Albina - Flavio Galeazzo - Hannes Kroger - Olivier Petit - David Schmidt - Andreas Feymark - Luca Mangani - Daniel Schmode - Christoph Goniva - Takuya Oshima - Juho Peltola - Eric Paterson - Fabian Peng Karrholm - Aleksandar Karac - Maria Garcia Camprubi - Chris Greenshields - Mark Olesen - Hilary Spencer - Andy Heather +* List of Contributors: See file ListOfContributors + # -*- mode: org; -*- # #+TITLE: *OpenFOAM README for version 1.6-ext* diff --git a/ReleaseNotes-foam-extend-3.0 b/ReleaseNotes-foam-extend-3.0 index d0ee9c512..8cb09cc28 100644 --- a/ReleaseNotes-foam-extend-3.0 +++ b/ReleaseNotes-foam-extend-3.0 @@ -280,57 +280,4 @@ Contents: models; bug fixes; documentation. The many ways of contributing and the contribution process are described in detail in the file "HowToContribute". -* List of Contributors - (If your name is missing in the list, please contact the maintainers at - and it will be added asap.) - Henry Weller - Hrvoje Jasak - Mattijs Janssens - Zeljko Tukovic - Bernhard Gschaider - Tommaso Lucchini - Martin Beaudoin - Sandeep Menon - Niklas Nordin - Eugene De Villiers - Henrik Rusche - Ivor Clifford - Philiposse Rajan - Gavin Tabor - Jovani Favero - Frank Bos - David Hill - Niklas Wikstrom - Dubravko Matijasevic - Darrin Stephens - Christian Beck - Oliver Borm - James Criner - Hua Shan - David Boner - Pierre-Olivier Dallaire - Norman Del Puppo - Dennis Kingsley - Frank Albina - Flavio Galeazzo - Hannes Kroger - Olivier Petit - David Schmidt - Andreas Feymark - Luca Mangani - Daniel Schmode - Christoph Goniva - Takuya Oshima - Juho Peltola - Eric Paterson - Fabian Peng Karrholm - Aleksandar Karac - Maria Garcia Camprubi - Chris Greenshields - Mark Olesen - Hilary Spencer - Andy Heather - Dominik Christ - Peter Janas - Niels Linnemann - Nikola Kornev +* List of Contributors: See file ListOfContributors From 8b468e2cbadd0f62422f13f8b71d06533d827e33 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 13 Jan 2014 11:59:18 +0000 Subject: [PATCH 02/66] Double call to write --- applications/solvers/combustion/reactingFoam/reactingFoam.C | 2 -- 1 file changed, 2 deletions(-) diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index f64d49fb5..a5229bae9 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -88,8 +88,6 @@ int main(int argc, char *argv[]) chemistry.dQ()().write(); } - runTime.write(); - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; From a2a43bb41ef545ef51b75695a0dc47cf5b39337c Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 16 Jan 2014 15:33:28 +0000 Subject: [PATCH 03/66] Formatting --- .../interfaceCompression.H | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/transportModels/interfaceProperties/interfaceCompression/interfaceCompression.H b/src/transportModels/interfaceProperties/interfaceCompression/interfaceCompression.H index 2c464c4a9..fae7bdaf0 100644 --- a/src/transportModels/interfaceProperties/interfaceCompression/interfaceCompression.H +++ b/src/transportModels/interfaceProperties/interfaceCompression/interfaceCompression.H @@ -44,7 +44,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class interfaceCompressionWeight Declaration + Class interfaceCompressionLimiter Declaration \*---------------------------------------------------------------------------*/ class interfaceCompressionLimiter @@ -66,13 +66,23 @@ public: ) const { // Quadratic compression scheme - //return min(max(4*min(phiP*(1 - phiP), phiN*(1 - phiN)), 0), 1); + // return min(max(4*min(phiP*(1 - phiP), phiN*(1 - phiN)), 0), 1); // Quartic compression scheme return - min(max( - 1 - max(sqr(1 - 4*phiP*(1 - phiP)), sqr(1 - 4*phiN*(1 - phiN))), - 0), 1); + min + ( + max + ( + 1 - max + ( + sqr(1 - 4*phiP*(1 - phiP)), + sqr(1 - 4*phiN*(1 - phiN)) + ), + 0 + ), + 1 + ); } }; From 19f0ef5bf0444499699f9950f0e580f0d46db8e6 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 20 Jan 2014 11:47:35 +0000 Subject: [PATCH 04/66] Clean-up --- .../tractionBoundaryGradient.H | 2 +- ...dDisplacementZeroShearFvPatchVectorField.C | 58 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.H b/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.H index 11896df87..d638e8bd1 100644 --- a/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.H +++ b/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.H @@ -54,7 +54,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class tractionBoundaryGradient Declaration + Class tractionBoundaryGradient Declaration \*---------------------------------------------------------------------------*/ class tractionBoundaryGradient diff --git a/src/solidModels/fvPatchFields/timeVaryingFixedDisplacementZeroShear/timeVaryingFixedDisplacementZeroShearFvPatchVectorField.C b/src/solidModels/fvPatchFields/timeVaryingFixedDisplacementZeroShear/timeVaryingFixedDisplacementZeroShearFvPatchVectorField.C index f254d9418..a02015dfb 100644 --- a/src/solidModels/fvPatchFields/timeVaryingFixedDisplacementZeroShear/timeVaryingFixedDisplacementZeroShearFvPatchVectorField.C +++ b/src/solidModels/fvPatchFields/timeVaryingFixedDisplacementZeroShear/timeVaryingFixedDisplacementZeroShearFvPatchVectorField.C @@ -133,32 +133,32 @@ timeVaryingFixedDisplacementZeroShearFvPatchVectorField << "non-orthogonal correction to be right" << endl; } - this->refGrad() = vector::zero; + this->refGrad() = vector::zero; - vectorField n = patch().nf(); - this->valueFraction() = sqr(n); + vectorField n = patch().nf(); + this->valueFraction() = sqr(n); - if (dict.found("value")) + if (dict.found("value")) { - Field::operator=(vectorField("value", dict, p.size())); + Field::operator=(vectorField("value", dict, p.size())); } - else + else { FatalError << "value entry not found for patch " << patch().name() << endl; } - //this->refValue() = *this; - this->refValue() = timeSeries_(this->db().time().timeOutputValue()); - Field normalValue = transform(valueFraction(), refValue()); + this->refValue() = timeSeries_(this->db().time().timeOutputValue()); - Field gradValue = - this->patchInternalField() + refGrad()/this->patch().deltaCoeffs(); + Field normalValue = transform(valueFraction(), refValue()); - Field transformGradValue = - transform(I - valueFraction(), gradValue); + Field gradValue = + this->patchInternalField() + refGrad()/this->patch().deltaCoeffs(); - Field::operator=(normalValue + transformGradValue); + Field transformGradValue = + transform(I - valueFraction(), gradValue); + + Field::operator=(normalValue + transformGradValue); } @@ -209,16 +209,17 @@ void timeVaryingFixedDisplacementZeroShearFvPatchVectorField::updateCoeffs() // set refValue vectorField disp - ( - patch().size(), - timeSeries_(this->db().time().timeOutputValue()) - ); + ( + patch().size(), + timeSeries_(this->db().time().timeOutputValue()) + ); + if (fieldName_ == "DU") - { + { const fvPatchField& U = patch().lookupPatchField("U"); disp -= U; - } + } else if (fieldName_ != "U") { FatalError @@ -227,21 +228,20 @@ void timeVaryingFixedDisplacementZeroShearFvPatchVectorField::updateCoeffs() } this->refValue() = disp; - // set value fraction to fix reference patch normal // only done at initialisation above //vectorField n = patch().nf(); //this->valueFraction() = sqr(n); refGrad() = tractionBoundaryGradient() - ( - vectorField(patch().size(), vector::zero), - scalarField(patch().size(), 0.0), - word(fieldName_), - patch(), - orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + ( + vectorField(patch().size(), vector::zero), + scalarField(patch().size(), 0), + word(fieldName_), + patch(), + orthotropic_, + nonLinearGeometry::nonLinearNames_[nonLinear_] + ); directionMixedFvPatchVectorField::updateCoeffs(); } From 20c6d00c78b0d9f7881688940ef7eeffc2c6c651 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 20 Jan 2014 11:52:31 +0000 Subject: [PATCH 05/66] Tutorial update --- .../largeStrainCantileverBeam/Allclean | 1 + .../largeStrainCantileverBeam/Allrun | 1 + .../constant/polyMesh/boundary | 2 +- .../elasticNonLinTLSolidFoam/nonLinBlock/0/U | 47 +++++++++--------- .../nonLinBlock/Allclean | 1 + .../nonLinBlock/constant/polyMesh/boundary | 2 +- .../nonLinBlock/constant/timeVsDisp | 2 +- .../nonLinBlock/system/controlDict | 2 +- .../rotateSphereTL/Allclean | 3 +- .../rotateSphereTL/constant/polyMesh/boundary | 2 +- .../constant/polyMesh/zoneToPatchName.gz | Bin 337 -> 0 bytes 11 files changed, 34 insertions(+), 29 deletions(-) delete mode 100644 tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/constant/polyMesh/zoneToPatchName.gz diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/Allclean b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/Allclean index 5fb11ded5..a357dd88a 100755 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/Allclean +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/Allclean @@ -5,5 +5,6 @@ cleanTimeDirectories cleanCase +\rm -rf 0/polyMesh \rm -rf constant/polyMesh/sets constant/polyMesh/*Zones* \rm -rf VTK case.foam history \ No newline at end of file diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/Allrun b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/Allrun index 8051b956f..9f41551f4 100755 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/Allrun +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/Allrun @@ -7,3 +7,4 @@ application="elasticNonLinTLSolidFoam" runApplication blockMesh runApplication $application +runApplication deformedGeom 1 diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/constant/polyMesh/boundary b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/constant/polyMesh/boundary index 497a2fdaa..f25edb21b 100644 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/constant/polyMesh/boundary +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/largeStrainCantileverBeam/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.0 | +| \\ / O peration | Version: 3.0 | | \\ / A nd | Web: http://www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/0/U b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/0/U index 95718284b..213db9b44 100644 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/0/U +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/0/U @@ -22,37 +22,38 @@ internalField uniform (0 0 0); boundaryField { top - { - type timeVaryingFixedDisplacementZeroShear; - nonLinear totalLagrangian; - fileName "$FOAM_CASE/constant/timeVsDisp"; - outOfBounds clamp; - value uniform ( 0 0.1 0 ); - } + { + type timeVaryingFixedDisplacementZeroShear; + nonLinear totalLagrangian; + fileName "$FOAM_CASE/constant/timeVsDisp"; + outOfBounds clamp; + value uniform ( 0 0 0 ); + } bottom - { - type symmetryPlane; - } + { + type symmetryPlane; + } left - { - type symmetryPlane; - } + { + type symmetryPlane; + } right - { - type solidTraction; - nonLinear totalLagrangian; - traction uniform (0 0 0); - pressure uniform 0; - value uniform (0 0 0); - } + { + type solidTraction; + nonLinear totalLagrangian; + traction uniform (0 0 0); + pressure uniform 0; + value uniform (0 0 0); + } frontAndBack - { - type empty; - } + { + type empty; + } } + // ************************************************************************* // diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/Allclean b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/Allclean index 5fb11ded5..a357dd88a 100755 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/Allclean +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/Allclean @@ -5,5 +5,6 @@ cleanTimeDirectories cleanCase +\rm -rf 0/polyMesh \rm -rf constant/polyMesh/sets constant/polyMesh/*Zones* \rm -rf VTK case.foam history \ No newline at end of file diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/constant/polyMesh/boundary b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/constant/polyMesh/boundary index f96026d04..7c1acaf3c 100644 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/constant/polyMesh/boundary +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.0 | +| \\ / O peration | Version: 3.0 | | \\ / A nd | Web: http://www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/constant/timeVsDisp b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/constant/timeVsDisp index 58f75cf36..71063d730 100644 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/constant/timeVsDisp +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/constant/timeVsDisp @@ -1,4 +1,4 @@ ( - ( 0 (0 0 0) ) + ( 0 (0 0 0) ) ( 64 (0 0.4 0)) ) \ No newline at end of file diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/system/controlDict b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/system/controlDict index 8b423cde7..84449dfca 100644 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/system/controlDict +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/nonLinBlock/system/controlDict @@ -23,7 +23,7 @@ startTime 0; stopAt endTime; -endTime 50; +endTime 40; deltaT 1; diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/Allclean b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/Allclean index 5fb11ded5..effd9db7c 100755 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/Allclean +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/Allclean @@ -5,5 +5,6 @@ cleanTimeDirectories cleanCase -\rm -rf constant/polyMesh/sets constant/polyMesh/*Zones* +\rm -rf 0/polyMesh +\rm -rf constant/polyMesh/sets constant/polyMesh/*Zones* constant/polyMesh/zone* \rm -rf VTK case.foam history \ No newline at end of file diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/constant/polyMesh/boundary b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/constant/polyMesh/boundary index 627df0b92..7b4f792ac 100644 --- a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/constant/polyMesh/boundary +++ b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.0 | +| \\ / O peration | Version: 3.0 | | \\ / A nd | Web: http://www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/constant/polyMesh/zoneToPatchName.gz b/tutorials/solidMechanics/elasticNonLinTLSolidFoam/rotateSphereTL/constant/polyMesh/zoneToPatchName.gz deleted file mode 100644 index a5dc088ed3f3025c92c3fb2fae014c89384e200b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 337 zcmV-X0j~ZZiwFoVgQ!vf1A1?6WmIoaVRU0?PGN0j0IiWtPs1<_hVS_m)=to=%>)wG3BxgEhklD1B0#|z3|r)ZZ0Uqth!SN{1MX}qHw;pFmKtZ>Xe80QciY;n%m j89QR7e$rIwKkv3Q3n7smv)0$4)cE=YI%uNMt^)u70HC6D From fc219a24c2545b5faf7d16d8b7f2f53c6d3bb50a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 21 Jan 2014 11:12:29 +0000 Subject: [PATCH 06/66] Protection on rho and phi not found --- .../pressureInletVelocityFvPatchVectorField.C | 46 +++++++++++++------ .../pressureInletVelocityFvPatchVectorField.H | 3 ++ 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C index 1d7b6a2a3..55a3c9e54 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.C @@ -28,14 +28,10 @@ License #include "volFields.H" #include "surfaceFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -pressureInletVelocityFvPatchVectorField::pressureInletVelocityFvPatchVectorField +Foam::pressureInletVelocityFvPatchVectorField:: +pressureInletVelocityFvPatchVectorField ( const fvPatch& p, const DimensionedField& iF @@ -47,7 +43,8 @@ pressureInletVelocityFvPatchVectorField::pressureInletVelocityFvPatchVectorField {} -pressureInletVelocityFvPatchVectorField::pressureInletVelocityFvPatchVectorField +Foam::pressureInletVelocityFvPatchVectorField:: +pressureInletVelocityFvPatchVectorField ( const pressureInletVelocityFvPatchVectorField& ptf, const fvPatch& p, @@ -61,7 +58,8 @@ pressureInletVelocityFvPatchVectorField::pressureInletVelocityFvPatchVectorField {} -pressureInletVelocityFvPatchVectorField::pressureInletVelocityFvPatchVectorField +Foam::pressureInletVelocityFvPatchVectorField:: +pressureInletVelocityFvPatchVectorField ( const fvPatch& p, const DimensionedField& iF, @@ -76,7 +74,8 @@ pressureInletVelocityFvPatchVectorField::pressureInletVelocityFvPatchVectorField } -pressureInletVelocityFvPatchVectorField::pressureInletVelocityFvPatchVectorField +Foam::pressureInletVelocityFvPatchVectorField:: +pressureInletVelocityFvPatchVectorField ( const pressureInletVelocityFvPatchVectorField& pivpvf ) @@ -87,7 +86,7 @@ pressureInletVelocityFvPatchVectorField::pressureInletVelocityFvPatchVectorField {} -pressureInletVelocityFvPatchVectorField:: +Foam::pressureInletVelocityFvPatchVectorField:: pressureInletVelocityFvPatchVectorField ( const pressureInletVelocityFvPatchVectorField& pivpvf, @@ -102,13 +101,21 @@ pressureInletVelocityFvPatchVectorField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void pressureInletVelocityFvPatchVectorField::updateCoeffs() +void Foam::pressureInletVelocityFvPatchVectorField::updateCoeffs() { if (updated()) { return; } + if (!this->db().objectRegistry::found(phiName_)) + { + // Flux not available, do not update + fixedValueFvPatchVectorField::updateCoeffs(); + + return; + } + const surfaceScalarField& phi = db().lookupObject(phiName_); @@ -124,6 +131,14 @@ void pressureInletVelocityFvPatchVectorField::updateCoeffs() } else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) { + if (!this->db().objectRegistry::found(rhoName_)) + { + // Rho not available, do not update + fixedValueFvPatchVectorField::updateCoeffs(); + + return; + } + const fvPatchField& rhop = lookupPatchField(rhoName_); @@ -143,7 +158,7 @@ void pressureInletVelocityFvPatchVectorField::updateCoeffs() } -void pressureInletVelocityFvPatchVectorField::write(Ostream& os) const +void Foam::pressureInletVelocityFvPatchVectorField::write(Ostream& os) const { fvPatchVectorField::write(os); if (phiName_ != "phi") @@ -160,7 +175,7 @@ void pressureInletVelocityFvPatchVectorField::write(Ostream& os) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -void pressureInletVelocityFvPatchVectorField::operator= +void Foam::pressureInletVelocityFvPatchVectorField::operator= ( const fvPatchField& pvf ) @@ -171,14 +186,15 @@ void pressureInletVelocityFvPatchVectorField::operator= // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +namespace Foam +{ + makePatchTypeField ( fvPatchVectorField, pressureInletVelocityFvPatchVectorField ); -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - } // End namespace Foam // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H index 07a3a311c..4e2212c7f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H @@ -56,7 +56,10 @@ class pressureInletVelocityFvPatchVectorField { // Private data + //- Name of the flux field word phiName_; + + //- Name of the density field word rhoName_; From 9aad8cbbbe8774ef4e90dea21cdcb33602c63514 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 21 Jan 2014 12:07:58 +0000 Subject: [PATCH 07/66] Formatting --- .../meshes/primitiveMesh/primitiveMeshEdges.C | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/foam/meshes/primitiveMesh/primitiveMeshEdges.C b/src/foam/meshes/primitiveMesh/primitiveMeshEdges.C index cc5e484e9..1ce5d6fd9 100644 --- a/src/foam/meshes/primitiveMesh/primitiveMeshEdges.C +++ b/src/foam/meshes/primitiveMesh/primitiveMeshEdges.C @@ -66,6 +66,7 @@ Foam::label Foam::primitiveMesh::getEdge { es.append(edge(nextPointI, pointI)); } + return edgeI; } @@ -97,12 +98,12 @@ void Foam::primitiveMesh::calcEdges() const // HJ, 27/Aug/2010 // ALGORITHM: - // Go through the pointFace list. Go through the list of faces for that - // point and ask for edges. If the edge has got the point in question - // AND the second point in the edge is larger than the first, add the - // edge to the list. At the same time, add the edge label to the list - // of edges for the current face (faceEdges) and log the other face as - // the neighbour of this face. + // Go through the pointFace list. Go through the list of faces for + // that point and ask for edges. If the edge has got the point + // in question AND the second point in the edge is larger than + // the first, add the edge to the list. At the same time, + // add the edge label to the listof edges for the current face + // (faceEdges) and log the other face as the neighbour of this face. const faceList& f = faces(); @@ -217,7 +218,7 @@ void Foam::primitiveMesh::calcEdges() const } // All edges for the current point found. Before adding them to the - // list, it is necessary to sort them in the increasing order of the + // list, it is necessary to sort them in the increasing order of // neighbouring point. // Make real list out of SLList to simplify the manipulation. @@ -265,7 +266,10 @@ void Foam::primitiveMesh::calcEdges() const forAll (faceGivingNeighbour, i) { - fgn[reshuffleList[i]].transfer(faceGivingNeighbour[i].shrink()); + fgn[reshuffleList[i]].transfer + ( + faceGivingNeighbour[i].shrink() + ); } labelListList eofgn(edgeOfFaceGivingNeighbour.size()); @@ -300,7 +304,7 @@ void Foam::primitiveMesh::calcEdges() const } // Removed ordered edges: reverting to correct parallelisation -// of edge data. HJ, 17/Au/2010 +// of edge data. HJ, 17/Aug/2010 // void primitiveMesh::calcOrderedEdges() const From 09160d2f6acde8501d1eb966c73aafa8ee2d1b11 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 31 Jan 2014 21:32:21 +0000 Subject: [PATCH 08/66] Settings update --- .../icoDyMFoam/mixerGgi/constant/dynamicMeshDict | 3 ++- .../icoDyMFoam/mixerGgi/system/controlDict | 4 ++-- .../icoDyMFoam/mixerGgi/system/fvSolution | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tutorials/incompressible/icoDyMFoam/mixerGgi/constant/dynamicMeshDict b/tutorials/incompressible/icoDyMFoam/mixerGgi/constant/dynamicMeshDict index 8a3db17a0..bcd84d938 100644 --- a/tutorials/incompressible/icoDyMFoam/mixerGgi/constant/dynamicMeshDict +++ b/tutorials/incompressible/icoDyMFoam/mixerGgi/constant/dynamicMeshDict @@ -27,7 +27,8 @@ mixerGgiFvMeshCoeffs direction (1 0 0); } - rpm 60; + // Rotational speed in revolutions per minute + rpm 60; slider { diff --git a/tutorials/incompressible/icoDyMFoam/mixerGgi/system/controlDict b/tutorials/incompressible/icoDyMFoam/mixerGgi/system/controlDict index 0339bd7e6..527ebc5dc 100644 --- a/tutorials/incompressible/icoDyMFoam/mixerGgi/system/controlDict +++ b/tutorials/incompressible/icoDyMFoam/mixerGgi/system/controlDict @@ -22,7 +22,7 @@ startTime 0; stopAt endTime; -endTime 0.25; +endTime 1; deltaT 0.005; @@ -44,7 +44,7 @@ timePrecision 6; runTimeModifiable yes; -adjustTimeStep yes; +adjustTimeStep no; maxCo 0.5; diff --git a/tutorials/incompressible/icoDyMFoam/mixerGgi/system/fvSolution b/tutorials/incompressible/icoDyMFoam/mixerGgi/system/fvSolution index 77a6b4697..834920986 100644 --- a/tutorials/incompressible/icoDyMFoam/mixerGgi/system/fvSolution +++ b/tutorials/incompressible/icoDyMFoam/mixerGgi/system/fvSolution @@ -25,7 +25,7 @@ solvers maxIter 1000; tolerance 1e-02; relTol 0; - }; + } p { @@ -36,7 +36,7 @@ solvers maxIter 1000; tolerance 1e-07; relTol 0.0; - }; + } pFinal { @@ -47,7 +47,7 @@ solvers maxIter 1000; tolerance 1e-07; relTol 0; - }; + } U { @@ -58,13 +58,13 @@ solvers maxIter 1000; tolerance 1e-07; relTol 0; - }; + } } PISO { nCorrectors 4; - nNonOrthogonalCorrectors 1; + nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } From 5572d00013afe4bcd78995680807539f4d513dbb Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 14:22:01 +0100 Subject: [PATCH 09/66] Fixes to scripts: - hg updates to the parent revision (for cases that use bookmarks instead of branches - recommended when interacting with git) - ccache now points to the "external" cache --- vagrantSandbox/initGeneralScript.sh | 8 +++++--- vagrantSandbox/skel/.bashrc | 10 ++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 vagrantSandbox/skel/.bashrc diff --git a/vagrantSandbox/initGeneralScript.sh b/vagrantSandbox/initGeneralScript.sh index 646896d3e..93e2034ae 100755 --- a/vagrantSandbox/initGeneralScript.sh +++ b/vagrantSandbox/initGeneralScript.sh @@ -44,10 +44,12 @@ then echo echo "Parent is mercurial. Hello Bernhard" echo - branchName=`hg branch -R $OFParent` +# branchName=`hg branch -R $OFParent` + idName=`hg id -i -R $OFParent | sed -e "s/\+//"` + # sed removes + in case of a 'tainted' parent - echo "Parent is on branch $branchName" - su vagrant - -c "hg clone -u $branchName $OFParent $OFClone" + echo "Parent is on id $idName" + su vagrant - -c "hg clone -u $idName $OFParent $OFClone" echo else echo diff --git a/vagrantSandbox/skel/.bashrc b/vagrantSandbox/skel/.bashrc new file mode 100644 index 000000000..fd2c4a1bf --- /dev/null +++ b/vagrantSandbox/skel/.bashrc @@ -0,0 +1,10 @@ +# .bashrc + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +# User specific aliases and functions + +export CCACHE_DIR=/vagrant/ccache4vm From 338173c01e34df08bd4d12a7969a4e44113897f5 Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 14:34:45 +0100 Subject: [PATCH 10/66] Add a CentOS 6 Box. Installs but compilation is untested --HG-- rename : vagrantSandbox/initUbunutuScript.sh => vagrantSandbox/initCentOSRHELScript.sh --- vagrantSandbox/Vagrantfile | 9 ++++++++ vagrantSandbox/initCentOSRHELScript.sh | 32 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100755 vagrantSandbox/initCentOSRHELScript.sh diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index e3be2edb7..b1ea907f5 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -39,4 +39,13 @@ Vagrant.configure("2") do |config| end end + config.vm.define :centos65 do |centos65| + centos65.vm.box = "centos65" + centos65.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box" + centos65.vm.provision :shell do |s| + s.args = "centos65" + s.path = "initCentOSRHELScript.sh" + end + end + end diff --git a/vagrantSandbox/initCentOSRHELScript.sh b/vagrantSandbox/initCentOSRHELScript.sh new file mode 100755 index 000000000..08ccf9fc3 --- /dev/null +++ b/vagrantSandbox/initCentOSRHELScript.sh @@ -0,0 +1,32 @@ +#! /bin/bash + +boxName=$1 + +echo +echo "Init script for $boxName" +echo + +# some of these packages are already installed. But lets be sure + +neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build) +bonusPackages=(emacs csh tcsh zsh) + +for p in ${neededPackages[@]}; do + yum install -y $p +done + +for p in ${bonusPackages[@]}; do + yum install -y $p +done + +echo "Update mercurial to a more recent version" +rpm -Uhv http://pkgs.repoforge.org/mercurial/mercurial-2.2.2-1.el6.rfx.x86_64.rpm + +echo +echo "RHEL/CentOS-specific ended. Now doing general stuff" +echo + +/vagrant/initGeneralScript.sh + +echo +echo "Ended" From ad198e0854399014792ea1901f1ade5634c0518b Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 15:12:04 +0100 Subject: [PATCH 11/66] Fixes and a script to compile Foam in one go --HG-- extra : amend_source : 367e251b7df6b13cda03ddf956dbbfa9bec4b51d --- .gitignore | 3 +++ .hgignore | 3 +++ vagrantSandbox/README | 11 +++++++++-- vagrantSandbox/initCentOSRHELScript.sh | 2 +- vagrantSandbox/skel/.bashrc | 1 + vagrantSandbox/skel/bootstrapFoam.sh | 22 ++++++++++++++++++++++ 6 files changed, 39 insertions(+), 3 deletions(-) create mode 100755 vagrantSandbox/skel/bootstrapFoam.sh diff --git a/.gitignore b/.gitignore index 8f9f44c1c..2c91d7832 100644 --- a/.gitignore +++ b/.gitignore @@ -119,4 +119,7 @@ src/lduSolvers/amg/amgPolicy/samgPolicy.H src/lduSolvers/amg/amgPolicy/aamgPolicy.C src/lduSolvers/amg/amgPolicy/aamgPolicy.H +# vagrant stuff +vagrantSandbox/.vagrant/ + # end-of-file diff --git a/.hgignore b/.hgignore index 922d0258d..8a5db6955 100644 --- a/.hgignore +++ b/.hgignore @@ -108,4 +108,7 @@ src/lduSolvers/amg/amgPolicy/samgPolicy.H src/lduSolvers/amg/amgPolicy/aamgPolicy.C src/lduSolvers/amg/amgPolicy/aamgPolicy.H +# vagrant stuff +vagrantSandbox/.vagrant/ + # end-of-file diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 37057362a..9393d8ffa 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -16,11 +16,11 @@ One can then connect to the virtual machine with : vagrant ssh and will be in the =$HOME= directory of the user =vagrant= where in - the directory =~/OpenFOAM/OpenFOAM-1.6-ext= the sources are + the directory =~/foam/foam-extend-3.0= the sources are available. Modifications can be pushed "outside" the virtual machine with : hg push - There is also a symbolic link =~/OpenFOAM/OpenFOAM-1.6-ext-parent= + There is also a symbolic link =~/foam/foam-extend-3.0-parent= to the sources if you want to edit there directly. Use with care and don't compile in that directory unless you know what you're doing @@ -32,3 +32,10 @@ =postfix=-package) - maverick :: Tries to fix the problems with the =lucid=-machine. Not yet working + - centos65 :: A CentOS 6.5 machine with preinstalled development + tools +* Scripts + In the home directory these scripts are found + - bootstrapFoam.sh :: A script whose aim it is to compile Foam and + the ThirdParty-packages in one go (no paraview and QT). If this + works the box is considered operational diff --git a/vagrantSandbox/initCentOSRHELScript.sh b/vagrantSandbox/initCentOSRHELScript.sh index 08ccf9fc3..11cf62072 100755 --- a/vagrantSandbox/initCentOSRHELScript.sh +++ b/vagrantSandbox/initCentOSRHELScript.sh @@ -8,7 +8,7 @@ echo # some of these packages are already installed. But lets be sure -neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build) +neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build wget zlib-devel) bonusPackages=(emacs csh tcsh zsh) for p in ${neededPackages[@]}; do diff --git a/vagrantSandbox/skel/.bashrc b/vagrantSandbox/skel/.bashrc index fd2c4a1bf..6aa500ab5 100644 --- a/vagrantSandbox/skel/.bashrc +++ b/vagrantSandbox/skel/.bashrc @@ -7,4 +7,5 @@ fi # User specific aliases and functions +export WM_SCHEDULER=ccache export CCACHE_DIR=/vagrant/ccache4vm diff --git a/vagrantSandbox/skel/bootstrapFoam.sh b/vagrantSandbox/skel/bootstrapFoam.sh new file mode 100755 index 000000000..c589bb4cc --- /dev/null +++ b/vagrantSandbox/skel/bootstrapFoam.sh @@ -0,0 +1,22 @@ +#! /bin/bash + +# Just to be sure +export WM_SCHEDULER=ccache +export CCACHE_DIR=/vagrant/ccache4vm + +cd foam/foam-extend-3.0 +source etc/bashrc + +( cd wmake/src && make ) +cd $WM_THIRD_PARTY_DIR + +./AllMake.stage0 +./AllMake.stage1 +./AllMake.stage2 +./AllMake.stage3 + +cd $WM_PROJECT_DIR +# pick up installed packages +source etc/bashrc + +./Allwmake From b96880ab6e7281aa28cbade604b2788a7dea3061 Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 16:34:06 +0100 Subject: [PATCH 12/66] FreeBSD and OpenSUSE-machines. Currently not working --HG-- rename : vagrantSandbox/initCentOSRHELScript.sh => vagrantSandbox/initFreeBSDScript.sh rename : vagrantSandbox/initCentOSRHELScript.sh => vagrantSandbox/initOpenSUSEScript.sh --- vagrantSandbox/README | 4 ++++ vagrantSandbox/Vagrantfile | 29 ++++++++++++++++++++++++++++ vagrantSandbox/initFreeBSDScript.sh | 16 +++++++++++++++ vagrantSandbox/initOpenSUSEScript.sh | 16 +++++++++++++++ 4 files changed, 65 insertions(+) create mode 100755 vagrantSandbox/initFreeBSDScript.sh create mode 100755 vagrantSandbox/initOpenSUSEScript.sh diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 9393d8ffa..ca36ba2ab 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -34,6 +34,10 @@ =lucid=-machine. Not yet working - centos65 :: A CentOS 6.5 machine with preinstalled development tools + - freebsd92 :: FreeBSD 9.2 32-bit machine. Untested + - freebsd10 :: FreeBSD 10.0 32-big machine. Currently does not boot + properly + - opensuse12 :: OpenSUSE 12.3 machine. Boots but is not provisioned * Scripts In the home directory these scripts are found - bootstrapFoam.sh :: A script whose aim it is to compile Foam and diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index b1ea907f5..e07baee3b 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -48,4 +48,33 @@ Vagrant.configure("2") do |config| end end + config.vm.define :freebsd92 do |freebsd92| + freebsd92.vm.box = "freebsd92" +# freebsd92.vm.box_url = "https://wunki.org/files/freebsd-9.2-amd64-wunki.box" + freebsd92.vm.box_url = "http://iris.hosting.lv/freebsd-9.2-i386.box" + freebsd92.vm.provision :shell do |s| + s.args = "freebsd92" + s.path = "initFreeBSDScript.sh" + end + end + + config.vm.define :freebsd10 do |freebsd10| + freebsd10.vm.box = "freebsd10" +# freebsd10.vm.box_url = "https://wunki.org/files/freebsd-10.0-amd64-wunki.box" + freebsd10.vm.box_url = "http://iris.hosting.lv/freebsd-10.0-i386.box" + freebsd10.vm.provision :shell do |s| + s.args = "freebsd10" + s.path = "initFreeBSDScript.sh" + end + end + + config.vm.define :opensuse12 do |opensuse12| + opensuse12.vm.box = "opensuse12" + opensuse12.vm.box_url = "http://sourceforge.net/projects/opensusevagrant/files/12.3/opensuse-12.3-64.box/download" + opensuse12.vm.provision :shell do |s| + s.args = "opensuse12" + s.path = "initOpenSUSEScript.sh" + end + end + end diff --git a/vagrantSandbox/initFreeBSDScript.sh b/vagrantSandbox/initFreeBSDScript.sh new file mode 100755 index 000000000..0dd703394 --- /dev/null +++ b/vagrantSandbox/initFreeBSDScript.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +boxName=$1 + +echo +echo "Init script for $boxName" +echo + +echo +echo "FreeBSD-specific ended. Now doing general stuff" +echo + +/vagrant/initGeneralScript.sh + +echo +echo "Ended" diff --git a/vagrantSandbox/initOpenSUSEScript.sh b/vagrantSandbox/initOpenSUSEScript.sh new file mode 100755 index 000000000..0dd703394 --- /dev/null +++ b/vagrantSandbox/initOpenSUSEScript.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +boxName=$1 + +echo +echo "Init script for $boxName" +echo + +echo +echo "FreeBSD-specific ended. Now doing general stuff" +echo + +/vagrant/initGeneralScript.sh + +echo +echo "Ended" From 79e0294181b9decb08adc59a44786bbdbdbe436e Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 10 Feb 2014 16:50:53 +0000 Subject: [PATCH 13/66] Clean run script --- tutorials/incompressible/icoDyMFoam/movingConeTopo/Allrun | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/incompressible/icoDyMFoam/movingConeTopo/Allrun b/tutorials/incompressible/icoDyMFoam/movingConeTopo/Allrun index b4df69472..72ef7bcb1 100755 --- a/tutorials/incompressible/icoDyMFoam/movingConeTopo/Allrun +++ b/tutorials/incompressible/icoDyMFoam/movingConeTopo/Allrun @@ -10,8 +10,8 @@ runApplication blockMesh runApplication setSet -batch setBatch cd constant/polyMesh/sets/ -\rm leftCentre leftCentre_old leftWallSet leftWallSet_old leftZone_old rightCentre rightCentre_old rightWallSet rightWallSet_old rightZone_old wallSet -\rm leftCentre.gz leftCentre_old.gz leftWallSet.gz leftWallSet_old.gz leftZone_old.gz rightCentre.gz rightCentre_old.gz rightWallSet.gz rightWallSet_old.gz rightZone_old.gz wallSet.gz +\rm -f leftCentre leftCentre_old leftWallSet leftWallSet_old leftZone_old rightCentre rightCentre_old rightWallSet rightWallSet_old rightZone_old wallSet +\rm -f leftCentre.gz leftCentre_old.gz leftWallSet.gz leftWallSet_old.gz leftZone_old.gz rightCentre.gz rightCentre_old.gz rightWallSet.gz rightWallSet_old.gz rightZone_old.gz wallSet.gz cd ../../.. runApplication setsToZones From 74c5ebe030aaae49328dd9a8dab3c795d6eca8db Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 18:03:40 +0100 Subject: [PATCH 14/66] Now OpenSUSE is provisioned. FreeBSD not working because it doesn't support shared folders in the virtual box --- vagrantSandbox/README | 7 +++++++ vagrantSandbox/initFreeBSDScript.sh | 13 +++++++++++++ vagrantSandbox/initGeneralScript.sh | 3 +++ vagrantSandbox/initOpenSUSEScript.sh | 18 +++++++++++++++++- 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index ca36ba2ab..4517f92b2 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -4,6 +4,11 @@ These virtual machines require - VirtualBox :: for running from [[https://www.virtualbox.org]] - Vagrant :: to automatically set them up from [[http://www.vagrantup.com]] + To make sure that for the boxes the have the newest + VirtualBox-additions do +: vagrant plugin install vagrant-vbguest + This installs a plugin that tries to update the guest addition if + they are for an older version of VirtualBox * Starting A virtual machine is set up with : vagrant up @@ -38,6 +43,8 @@ - freebsd10 :: FreeBSD 10.0 32-big machine. Currently does not boot properly - opensuse12 :: OpenSUSE 12.3 machine. Boots but is not provisioned + Some machines (read: the BSD-boxes) need the =VirtualBox Extension + Pack= installed (because they have USB 2.0) * Scripts In the home directory these scripts are found - bootstrapFoam.sh :: A script whose aim it is to compile Foam and diff --git a/vagrantSandbox/initFreeBSDScript.sh b/vagrantSandbox/initFreeBSDScript.sh index 0dd703394..48f738557 100755 --- a/vagrantSandbox/initFreeBSDScript.sh +++ b/vagrantSandbox/initFreeBSDScript.sh @@ -6,6 +6,19 @@ echo echo "Init script for $boxName" echo +pkg install -fy virtualbox-ose-additions + +neededPackages=(mercurial git flex bison ccache rpm wget) +bonusPackages=(emacs24 zsh) + +for p in ${neededPackages[@]}; do + pkg install -y $p +done + +for p in ${bonusPackages[@]}; do + pkg install -y $p +done + echo echo "FreeBSD-specific ended. Now doing general stuff" echo diff --git a/vagrantSandbox/initGeneralScript.sh b/vagrantSandbox/initGeneralScript.sh index 93e2034ae..672f49af0 100755 --- a/vagrantSandbox/initGeneralScript.sh +++ b/vagrantSandbox/initGeneralScript.sh @@ -20,6 +20,9 @@ OFDIR=/home/vagrant/foam/ mkdir -vp $OFDIR chown -R vagrant:vagrant $OFDIR +# for distros that don't have group vagrant +chown -R vagrant $OFDIR + OFClone=$OFDIR/foam-extend-3.0 OFReference=$OFClone-parent diff --git a/vagrantSandbox/initOpenSUSEScript.sh b/vagrantSandbox/initOpenSUSEScript.sh index 0dd703394..d4be5b834 100755 --- a/vagrantSandbox/initOpenSUSEScript.sh +++ b/vagrantSandbox/initOpenSUSEScript.sh @@ -6,8 +6,24 @@ echo echo "Init script for $boxName" echo +# Otherwise python/mercurial won't install +zypper -n remove patterns-openSUSE-minimal_base-conflicts + +# patterns-openSUSE-devel_python + +neededPackages=(gcc-c++ mercurial git flex bison make ccache zlib-devel rpm-build) +bonusPackages=(emacs csh tcsh zsh) + +for p in ${neededPackages[@]}; do + zypper -n install $p +done + +for p in ${bonusPackages[@]}; do + zypper -n install $p +done + echo -echo "FreeBSD-specific ended. Now doing general stuff" +echo "OpenSUSE-specific ended. Now doing general stuff" echo /vagrant/initGeneralScript.sh From 2a76b2e557ac05c8117c942db985c1b799bec68a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 10 Feb 2014 17:06:03 +0000 Subject: [PATCH 15/66] Cell layering bug fix --- .../polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C | 5 ++--- src/foam/meshes/meshShapes/cell/oppositeCellFace.C | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C index 134049ffa..92e72ee04 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C @@ -129,8 +129,7 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const // Grab the opposite face for face collapse addressing ftc[faceI] = lidFace.oppositeIndex(); - // lidFace is only valid in simple cases - const face& lidFace2 = faces[lidFace.oppositeIndex()]; + // Taken out lidFace2: fails normal layering. HJ, 10/Feb/2014 // Using the local face insert the points into the lid list forAll (curLocalFace, pointI) @@ -157,7 +156,7 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const const labelListList& ppAddr = mesh.pointPoints(); - const labelList& p1List = ppAddr[lidFace2[pointI]]; + const labelList& p1List = ppAddr[lidFace[pointI]]; const labelList& p2List = ppAddr[ptc[clp]]; bool found = false; diff --git a/src/foam/meshes/meshShapes/cell/oppositeCellFace.C b/src/foam/meshes/meshShapes/cell/oppositeCellFace.C index 1d94b2b88..c932fa237 100644 --- a/src/foam/meshes/meshShapes/cell/oppositeCellFace.C +++ b/src/foam/meshes/meshShapes/cell/oppositeCellFace.C @@ -181,8 +181,7 @@ Foam::oppositeFace Foam::cell::opposingFace } } - // None of them matches, return a failure - return oppositeFace(face(0), masterFaceLabel, oppFaceLabel); + // Removed: fails normal layering. HJ, 10/Feb/2014 } } } From 56e392ae55cebc97c21abf6b9e3f74a12f6072d6 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 10 Feb 2014 17:29:57 +0000 Subject: [PATCH 16/66] Efficiency on static meshes --- .../movingWallVelocityFvPatchVectorField.C | 54 +++++++++++-------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.C index c5f6c128f..55d926c1c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.C @@ -99,34 +99,42 @@ void movingWallVelocityFvPatchVectorField::updateCoeffs() return; } - const fvPatch& p = patch(); - const polyPatch& pp = p.patch(); const fvMesh& mesh = dimensionedInternalField().mesh(); - const pointField& oldPoints = mesh.oldPoints(); - vectorField oldFc(pp.size()); - - forAll(oldFc, i) + if (mesh.changing()) { - oldFc[i] = pp[i].centre(oldPoints); + const fvPatch& p = patch(); + const polyPatch& pp = p.patch(); + const pointField& oldPoints = mesh.oldPoints(); + + vectorField oldFc(pp.size()); + + forAll(oldFc, i) + { + oldFc[i] = pp[i].centre(oldPoints); + } + + // Get wall-parallel mesh motion velocity from geometry + vectorField Up = + (pp.faceCentres() - oldFc)/mesh.time().deltaT().value(); + + const volVectorField& U = + mesh.lookupObject + ( + dimensionedInternalField().name() + ); + + scalarField phip = + p.patchField(fvc::meshPhi(U)); + + vectorField n = p.nf(); + const scalarField& magSf = p.magSf(); + scalarField Un = phip/(magSf + VSMALL); + + // Adjust for surface-normal mesh motion flux + vectorField::operator=(Up + n*(Un - (n & Up))); } - // Get wall-parallel mesh motion velocity from geometry - vectorField Up = (pp.faceCentres() - oldFc)/mesh.time().deltaT().value(); - - const volVectorField& U = - mesh.lookupObject(dimensionedInternalField().name()); - - scalarField phip = - p.patchField(fvc::meshPhi(U)); - - vectorField n = p.nf(); - const scalarField& magSf = p.magSf(); - scalarField Un = phip/(magSf + VSMALL); - - // Adjust for surface-normal mesh motion flux - vectorField::operator=(Up + n*(Un - (n & Up))); - fixedValueFvPatchVectorField::updateCoeffs(); } From d3c8528c07c2657f047f9f1b1413ca036d566c7b Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 10 Feb 2014 17:30:25 +0000 Subject: [PATCH 17/66] Disable layers around corners --- .../layerAdditionRemoval/setLayerPairing.C | 59 +++---------------- 1 file changed, 9 insertions(+), 50 deletions(-) diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C index 92e72ee04..09d9c896c 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C @@ -144,58 +144,17 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const else { // Point mapped from some other face. Check the label + // Layers wrapped around cells are not allowed. HJ, 10/Feb/2014 if (ptc[clp] != lidFace[pointI]) { - // We may be dealing with a layer that is wrapped around - // a cell. Check second point neighbours for common point. - // This is most probably not a general solution for - // arbitray polyhedra! - // HR, 1/May/2011 - - const label curPoint = faces[mf[faceI]][pointI]; - - const labelListList& ppAddr = mesh.pointPoints(); - - const labelList& p1List = ppAddr[lidFace[pointI]]; - const labelList& p2List = ppAddr[ptc[clp]]; - - bool found = false; - forAll (p1List, p1I) - { - const label p1 = p1List[p1I]; - - if (p1 != curPoint) - { - forAll (p2List, p2I) - { - label p2 = p2List[p2I]; - - if (p1 == p2) - { - ptc[clp] = p1; - found = true; - break; - } - } - } - - if (found) - { - break; - } - } - - if (!found) - { - nPointErrors++; -// Pout<< "Topological error in cell layer pairing. " -// << "This mesh is either topologically incorrect " -// << "or the master afce layer is not defined " -// << "consistently. Please check the " -// << "face zone flip map." << nl -// << "First index: " << ptc[clp] -// << " new index: " << lidFace[pointI] << endl; - } + nPointErrors++; +// Pout<< "Topological error in cell layer pairing. " +// << "This mesh is either topologically incorrect " +// << "or the master afce layer is not defined " +// << "consistently. Please check the " +// << "face zone flip map." << nl +// << "First index: " << ptc[clp] +// << " new index: " << lidFace[pointI] << endl; } } } From 8868132a9eb4f9517530dc75bc913afda3becadf Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 10 Feb 2014 18:51:15 +0100 Subject: [PATCH 18/66] Try to make FreeBSD work --- vagrantSandbox/README | 7 ++++--- vagrantSandbox/Vagrantfile | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 4517f92b2..de590c01e 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -39,9 +39,10 @@ =lucid=-machine. Not yet working - centos65 :: A CentOS 6.5 machine with preinstalled development tools - - freebsd92 :: FreeBSD 9.2 32-bit machine. Untested - - freebsd10 :: FreeBSD 10.0 32-big machine. Currently does not boot - properly + - freebsd92 :: FreeBSD 9.2 32-bit machine. Does not work because + FreeBSD does not support shared folders + - freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared + folders via NFS. Currently not working - opensuse12 :: OpenSUSE 12.3 machine. Boots but is not provisioned Some machines (read: the BSD-boxes) need the =VirtualBox Extension Pack= installed (because they have USB 2.0) diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index e07baee3b..081f8ab5b 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -66,6 +66,16 @@ Vagrant.configure("2") do |config| s.args = "freebsd10" s.path = "initFreeBSDScript.sh" end + freebsd10.vm.network :private_network, ip: "10.0.0.2" + + # configure the NICs + freebsd10.vm.provider :virtualbox do |vb| + vb.customize ["modifyvm", :id, "--nictype1", "virtio"] + vb.customize ["modifyvm", :id, "--nictype2", "virtio"] + end + + # use NFS for the synced folder + freebsd10.vm.synced_folder "..", "/FOAM-sources", :nfs => true end config.vm.define :opensuse12 do |opensuse12| From 93062c01be569093de35b7fa8ebf71e7d883cb59 Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Tue, 11 Feb 2014 11:29:18 +0100 Subject: [PATCH 19/66] Forgot one library (without liberty nothing links) --- vagrantSandbox/README | 3 ++- vagrantSandbox/initCentOSRHELScript.sh | 2 +- vagrantSandbox/initOpenSUSEScript.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index de590c01e..29045362f 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -43,7 +43,8 @@ FreeBSD does not support shared folders - freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared folders via NFS. Currently not working - - opensuse12 :: OpenSUSE 12.3 machine. Boots but is not provisioned + - opensuse12 :: OpenSUSE 12.3 machine. Currently not completely + compiling Foam Some machines (read: the BSD-boxes) need the =VirtualBox Extension Pack= installed (because they have USB 2.0) * Scripts diff --git a/vagrantSandbox/initCentOSRHELScript.sh b/vagrantSandbox/initCentOSRHELScript.sh index 11cf62072..b96b1f71e 100755 --- a/vagrantSandbox/initCentOSRHELScript.sh +++ b/vagrantSandbox/initCentOSRHELScript.sh @@ -8,7 +8,7 @@ echo # some of these packages are already installed. But lets be sure -neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build wget zlib-devel) +neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build wget zlib-devel binutils-devel) bonusPackages=(emacs csh tcsh zsh) for p in ${neededPackages[@]}; do diff --git a/vagrantSandbox/initOpenSUSEScript.sh b/vagrantSandbox/initOpenSUSEScript.sh index d4be5b834..89d5fb7b8 100755 --- a/vagrantSandbox/initOpenSUSEScript.sh +++ b/vagrantSandbox/initOpenSUSEScript.sh @@ -11,7 +11,7 @@ zypper -n remove patterns-openSUSE-minimal_base-conflicts # patterns-openSUSE-devel_python -neededPackages=(gcc-c++ mercurial git flex bison make ccache zlib-devel rpm-build) +neededPackages=(gcc-c++ mercurial git flex bison make ccache zlib-devel rpm-build binutils-devel) bonusPackages=(emacs csh tcsh zsh) for p in ${neededPackages[@]}; do From a7d9a55024a09b04518e31f4b2e917df728a51cd Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Tue, 11 Feb 2014 14:01:59 +0100 Subject: [PATCH 20/66] Refactor the Ubuntu-script --- vagrantSandbox/README | 8 ++++++- vagrantSandbox/initUbunutuScript.sh | 33 +++++++++++------------------ 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 29045362f..41d8b0f16 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -47,8 +47,14 @@ compiling Foam Some machines (read: the BSD-boxes) need the =VirtualBox Extension Pack= installed (because they have USB 2.0) -* Scripts +* Scripts in the machine In the home directory these scripts are found - bootstrapFoam.sh :: A script whose aim it is to compile Foam and the ThirdParty-packages in one go (no paraview and QT). If this works the box is considered operational +* Provisioning scripts + Every "family" of machines has a specific script that makes sure + that the software packages necessary to compile =Foam= are installed + into the machine. In the end these scripts should call + =initGeneralScript.sh= which gets the sources into the machine. It + needs =git=, =mercurial= and =ccache= for that. diff --git a/vagrantSandbox/initUbunutuScript.sh b/vagrantSandbox/initUbunutuScript.sh index ea3de7bf2..d883e1df5 100755 --- a/vagrantSandbox/initUbunutuScript.sh +++ b/vagrantSandbox/initUbunutuScript.sh @@ -24,22 +24,16 @@ echo echo "Installing additional packages" echo -apt-get -y install mercurial -apt-get -y install bison -apt-get -y install flex -apt-get -y install g++ -apt-get -y install make -#apt-get -y install python-dev -apt-get -y install ccache -apt-get -y install cmake +neededPackages=(g++ bison flex mercurial git make ccache cmake rpm) +bonusPackages=(emacs csh tcsh zsh) -# test scripts with different shells -apt-get -y install csh -apt-get -y install tcsh -apt-get -y install zsh +for p in ${neededPackages[@]}; do + apt-get -y install $p +done -# to make the ThirdParty-Stuff work -apt-get -y install rpm +for p in ${bonusPackages[@]}; do + apt-get -y install $p +done # this is needed for the packaging stuff echo @@ -59,13 +53,10 @@ echo echo "Tools for packaging" echo -# Needed for packaging -apt-get -y install default-mta -apt-get -y install dpkg-dev -apt-get -y install debhelper devscripts cdbs - -# Not needed. Just to keep Bernhard happy -apt-get -y install emacs +packagingPackages=(default-mta dpkg-dev debhelper devscripts cdbs binutils-dev) +for p in ${packagingPackages[@]}; do + apt-get -y install $p +done echo echo "Ubuntu-specific ended. Now doing general stuff" From 6d5faa9dacb60fa4dc2635b9032f785de0cadbf3 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 12 Feb 2014 16:43:07 +0000 Subject: [PATCH 21/66] More template depth in instantiation --- wmake/rules/linux64Gcc45/c++ | 2 +- wmake/rules/linux64Gcc46/c++ | 2 +- wmake/rules/linuxGcc45/c++ | 2 +- wmake/rules/linuxGcc46/c++ | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wmake/rules/linux64Gcc45/c++ b/wmake/rules/linux64Gcc45/c++ index 72ba3bf12..605fc9253 100644 --- a/wmake/rules/linux64Gcc45/c++ +++ b/wmake/rules/linux64Gcc45/c++ @@ -6,7 +6,7 @@ CC = g++ -m64 include $(RULES)/c++$(WM_COMPILE_OPTION) -ptFLAGS = -DNoRepository -ftemplate-depth-40 +ptFLAGS = -DNoRepository -ftemplate-depth-200 c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linux64Gcc46/c++ b/wmake/rules/linux64Gcc46/c++ index 72ba3bf12..605fc9253 100644 --- a/wmake/rules/linux64Gcc46/c++ +++ b/wmake/rules/linux64Gcc46/c++ @@ -6,7 +6,7 @@ CC = g++ -m64 include $(RULES)/c++$(WM_COMPILE_OPTION) -ptFLAGS = -DNoRepository -ftemplate-depth-40 +ptFLAGS = -DNoRepository -ftemplate-depth-200 c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxGcc45/c++ b/wmake/rules/linuxGcc45/c++ index 2f19f3a34..fe5929adb 100644 --- a/wmake/rules/linuxGcc45/c++ +++ b/wmake/rules/linuxGcc45/c++ @@ -6,7 +6,7 @@ CC = g++ -m32 include $(RULES)/c++$(WM_COMPILE_OPTION) -ptFLAGS = -DNoRepository -ftemplate-depth-40 +ptFLAGS = -DNoRepository -ftemplate-depth-200 c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxGcc46/c++ b/wmake/rules/linuxGcc46/c++ index 2f19f3a34..fe5929adb 100644 --- a/wmake/rules/linuxGcc46/c++ +++ b/wmake/rules/linuxGcc46/c++ @@ -6,7 +6,7 @@ CC = g++ -m32 include $(RULES)/c++$(WM_COMPILE_OPTION) -ptFLAGS = -DNoRepository -ftemplate-depth-40 +ptFLAGS = -DNoRepository -ftemplate-depth-200 c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC From 350751972865707b6314b5d742a99b793522b9ca Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 12 Feb 2014 16:45:24 +0000 Subject: [PATCH 22/66] Added named ddt and d2dt2 --- src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C | 68 +++++++++++----- src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H | 26 +++++- src/finiteVolume/finiteVolume/fvm/fvmDdt.C | 83 +++++++++++++++----- src/finiteVolume/finiteVolume/fvm/fvmDdt.H | 31 ++++++++ 4 files changed, 170 insertions(+), 38 deletions(-) diff --git a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C index a4f8b5d97..e3399f468 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C +++ b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C @@ -44,17 +44,63 @@ template tmp > d2dt2 ( - GeometricField& vf + GeometricField& vf, + const word& name ) { return fv::d2dt2Scheme::New ( vf.mesh(), - vf.mesh().schemesDict().d2dt2Scheme("d2dt2(" + vf.name() + ')') + vf.mesh().schemesDict().d2dt2Scheme(name) )().fvmD2dt2(vf); } +template +tmp > +d2dt2 +( + const dimensionedScalar& rho, + GeometricField& vf, + const word& name +) +{ + return fv::d2dt2Scheme::New + ( + vf.mesh(), + vf.mesh().schemesDict().d2dt2Scheme(name) + )().fvmD2dt2(rho, vf); +} + + +template +tmp > +d2dt2 +( + const volScalarField& rho, + GeometricField& vf, + const word& name +) +{ + return fv::d2dt2Scheme::New + ( + vf.mesh(), + vf.mesh().schemesDict().d2dt2Scheme(name) + )().fvmD2dt2(rho, vf); +} + + +template +tmp > +d2dt2 +( + GeometricField& vf +) +{ + return fvm::d2dt2(vf, "d2dt2(" + vf.name() + ')'); +} + + template tmp > d2dt2 @@ -63,14 +109,7 @@ d2dt2 GeometricField& vf ) { - return fv::d2dt2Scheme::New - ( - vf.mesh(), - vf.mesh().schemesDict().d2dt2Scheme - ( - "d2dt2(" + rho.name() + ',' + vf.name() + ')' - ) - )().fvmD2dt2(rho, vf); + return fvm::d2dt2(rho, vf, "d2dt2(" + rho.name() + ',' + vf.name() + ')'); } @@ -82,14 +121,7 @@ d2dt2 GeometricField& vf ) { - return fv::d2dt2Scheme::New - ( - vf.mesh(), - vf.mesh().schemesDict().d2dt2Scheme - ( - "d2dt2(" + rho.name() + ',' + vf.name() + ')' - ) - )().fvmD2dt2(rho, vf); + return fvm::d2dt2(rho, vf, "d2dt2(" + rho.name() + ',' + vf.name() + ')'); } diff --git a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H index 8424b741a..eb878c961 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H +++ b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H @@ -53,7 +53,31 @@ namespace fvm tmp > d2dt2 ( const dimensionedScalar&, - GeometricField& + GeometricField&, + const word& name + ); + + template + tmp > d2dt2 + ( + GeometricField&, + const word& name + ); + + template + tmp > d2dt2 + ( + const volScalarField&, + GeometricField&, + const word& name + ); + + template + tmp > d2dt2 + ( + const dimensionedScalar&, + GeometricField&, + const word& name ); template diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C index 851e4b255..cb31fe64e 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C +++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C @@ -44,17 +44,76 @@ template tmp > ddt ( - GeometricField& vf + GeometricField& vf, + const word& name ) { return fv::ddtScheme::New ( vf.mesh(), - vf.mesh().schemesDict().ddtScheme("ddt(" + vf.name() + ')') + vf.mesh().schemesDict().ddtScheme(name) )().fvmDdt(vf); } +template +tmp > +ddt +( + const geometricOneField&, + GeometricField& vf, + const word& name +) +{ + return fvm::ddt(vf, name); +} + + +template +tmp > +ddt +( + const dimensionedScalar& rho, + GeometricField& vf, + const word& name +) +{ + return fv::ddtScheme::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme(name) + )().fvmDdt(rho, vf); +} + + +template +tmp > +ddt +( + const volScalarField& rho, + GeometricField& vf, + const word& name +) +{ + return fv::ddtScheme::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme(name) + )().fvmDdt(rho, vf); +} + + +template +tmp > +ddt +( + GeometricField& vf +) +{ + return fvm::ddt(vf, "ddt(" + vf.name() + ')'); +} + + template tmp > ddt @@ -63,7 +122,7 @@ ddt GeometricField& vf ) { - return ddt(vf); + return fvm::ddt(vf); } @@ -75,14 +134,7 @@ ddt GeometricField& vf ) { - return fv::ddtScheme::New - ( - vf.mesh(), - vf.mesh().schemesDict().ddtScheme - ( - "ddt(" + rho.name() + ',' + vf.name() + ')' - ) - )().fvmDdt(rho, vf); + return fvm::ddt(rho, vf, "ddt(" + rho.name() + ',' + vf.name() + ')'); } @@ -94,14 +146,7 @@ ddt GeometricField& vf ) { - return fv::ddtScheme::New - ( - vf.mesh(), - vf.mesh().schemesDict().ddtScheme - ( - "ddt(" + rho.name() + ',' + vf.name() + ')' - ) - )().fvmDdt(rho, vf); + return fvm::ddt(rho, vf, "ddt(" + rho.name() + ',' + vf.name() + ')'); } diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H index b31c9f743..5024d8d68 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H +++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H @@ -50,6 +50,37 @@ namespace Foam namespace fvm { + template + tmp > ddt + ( + GeometricField&, + const word& name + ); + + template + tmp > ddt + ( + const geometricOneField&, + GeometricField&, + const word& name + ); + + template + tmp > ddt + ( + const dimensionedScalar&, + GeometricField&, + const word& name + ); + + template + tmp > ddt + ( + const volScalarField&, + GeometricField&, + const word& name + ); + template tmp > ddt ( From 56c2232abb4f1535df69392b63c98464ae7f1a6d Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 13 Feb 2014 11:36:25 +0000 Subject: [PATCH 23/66] Removed low-Re k-omega SST: not needed --- .../compressible/RAS/Make/files | 1 - .../checkkOmega_LowRePatchFieldTypes.H | 19 - .../RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C | 489 ------------------ .../RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H | 294 ----------- .../RAS/kOmegaSST_LowRe/kOmega_LowReI.H | 115 ---- .../RAS/kOmegaSST_LowRe/wallOmega_LowReI.H | 50 -- .../incompressible/RAS/Make/files | 1 - .../checkkOmega_LowRePatchFieldTypes.H | 19 - .../RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C | 431 --------------- .../RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H | 295 ----------- .../RAS/kOmegaSST_LowRe/kOmega_LowReI.H | 113 ---- .../RAS/kOmegaSST_LowRe/wallOmega_LowReI.H | 50 -- 12 files changed, 1877 deletions(-) delete mode 100644 src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/checkkOmega_LowRePatchFieldTypes.H delete mode 100644 src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C delete mode 100644 src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H delete mode 100644 src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmega_LowReI.H delete mode 100644 src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/wallOmega_LowReI.H delete mode 100644 src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/checkkOmega_LowRePatchFieldTypes.H delete mode 100644 src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C delete mode 100644 src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H delete mode 100644 src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmega_LowReI.H delete mode 100644 src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/wallOmega_LowReI.H diff --git a/src/turbulenceModels/compressible/RAS/Make/files b/src/turbulenceModels/compressible/RAS/Make/files index 499d38041..4e034aed4 100644 --- a/src/turbulenceModels/compressible/RAS/Make/files +++ b/src/turbulenceModels/compressible/RAS/Make/files @@ -9,7 +9,6 @@ LaunderGibsonRSTM/LaunderGibsonRSTM.C realizableKE/realizableKE.C SpalartAllmaras/SpalartAllmaras.C kOmegaSST/kOmegaSST.C -kOmegaSST_LowRe/kOmegaSST_LowRe.C /* Wall functions */ wallFunctions = derivedFvPatchFields/wallFunctions diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/checkkOmega_LowRePatchFieldTypes.H b/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/checkkOmega_LowRePatchFieldTypes.H deleted file mode 100644 index 74e5035f3..000000000 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/checkkOmega_LowRePatchFieldTypes.H +++ /dev/null @@ -1,19 +0,0 @@ -if (!isType(k_.boundaryField()[patchi])) -{ - FatalErrorIn("wall-function evaluation") - << k_.boundaryField()[patchi].type() - << " is the wrong k patchField type on patch " - << curPatch.name() << nl - << " should be zeroGradient" - << exit(FatalError); -} - -if (!isType(omega_.boundaryField()[patchi])) -{ - FatalErrorIn("wall-function evaluation") - << omega_.boundaryField()[patchi].type() - << " is the wrong omega patchField type on patch " - << curPatch.name() << nl - << " should be zeroGradient" - << exit(FatalError); -} diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C b/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C deleted file mode 100644 index 721be4d3b..000000000 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C +++ /dev/null @@ -1,489 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | - \\ / A nd | For copyright notice see file Copyright - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "kOmegaSST_LowRe.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(kOmegaSST_LowRe, 0); -addToRunTimeSelectionTable(RASModel, kOmegaSST_LowRe, dictionary); - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp kOmegaSST_LowRe::F1(const volScalarField& CDkOmega) const -{ - volScalarField CDkOmegaPlus = max - ( - CDkOmega, - dimensionedScalar("1.0e-10", dimless/sqr(dimTime), 1.0e-10) - ); - - volScalarField arg1 = min - ( - min - ( - max - ( - (scalar(1)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*(mu()/rho_)/(sqr(y_)*omega_) - ), - (4*alphaOmega2_)*k_/(CDkOmegaPlus*sqr(y_)) - ), - scalar(10) - ); - - return tanh(pow4(arg1)); -} - -tmp kOmegaSST_LowRe::F2() const -{ - volScalarField arg2 = min - ( - max - ( - (scalar(2)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*(mu()/rho_)/(sqr(y_)*omega_) - ), - scalar(100) - ); - - return tanh(sqr(arg2)); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -kOmegaSST_LowRe::kOmegaSST_LowRe -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermophysicalModel -) -: - RASModel(typeName, rho, U, phi, thermophysicalModel), - - alphaK1_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaK1", - coeffDict_, - 0.85034 - ) - ), - alphaK2_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaK2", - coeffDict_, - 1.0 - ) - ), - alphaOmega1_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaOmega1", - coeffDict_, - 0.5 - ) - ), - alphaOmega2_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaOmega2", - coeffDict_, - 0.85616 - ) - ), - Prt_ - ( - dimensioned::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - gamma1_ - ( - dimensioned::lookupOrAddToDict - ( - "gamma1", - coeffDict_, - 0.5532 - ) - ), - gamma2_ - ( - dimensioned::lookupOrAddToDict - ( - "gamma2", - coeffDict_, - 0.4403 - ) - ), - beta1_ - ( - dimensioned::lookupOrAddToDict - ( - "beta1", - coeffDict_, - 0.075 - ) - ), - beta2_ - ( - dimensioned::lookupOrAddToDict - ( - "beta2", - coeffDict_, - 0.0828 - ) - ), - betaStar_ - ( - dimensioned::lookupOrAddToDict - ( - "betaStar", - coeffDict_, - 0.09 - ) - ), - a1_ - ( - dimensioned::lookupOrAddToDict - ( - "a1", - coeffDict_, - 0.31 - ) - ), - c1_ - ( - dimensioned::lookupOrAddToDict - ( - "c1", - coeffDict_, - 10.0 - ) - ), - Cmu_ - ( - dimensioned::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - kappa_ - ( - dimensioned::lookupOrAddToDict - ( - "kappa", - coeffDict_, - 0.41 - ) - ), - - y_(mesh_), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - U_.db(), - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - omega_ - ( - IOobject - ( - "omega", - runTime_.timeName(), - U_.db(), - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - U_.db(), - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - a1_*rho_*k_/max(a1_*omega_, F2()*sqrt(magSqr(symm(fvc::grad(U_))))) - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - U_.db(), - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - bound(omega_, omega0_); - - mut_ = - ( - a1_*rho_*k_/ - max - ( - a1_*omega_, - F2()*sqrt(2*magSqr(symm(fvc::grad(U_)))) - ) - ); - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp kOmegaSST_LowRe::R() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - U_.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))), - k_.boundaryField().types() - ) - ); -} - - -tmp kOmegaSST_LowRe::devRhoReff() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - U_.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp kOmegaSST_LowRe::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) - ); -} - - -bool kOmegaSST_LowRe::read() -{ - if (RASModel::read()) - { - alphaK1_.readIfPresent(coeffDict()); - alphaK2_.readIfPresent(coeffDict()); - alphaOmega1_.readIfPresent(coeffDict()); - alphaOmega2_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - gamma1_.readIfPresent(coeffDict()); - gamma2_.readIfPresent(coeffDict()); - beta1_.readIfPresent(coeffDict()); - beta2_.readIfPresent(coeffDict()); - betaStar_.readIfPresent(coeffDict()); - a1_.readIfPresent(coeffDict()); - c1_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void kOmegaSST_LowRe::correct() -{ - // Bound in case of topological change - // HJ, 22/Aug/2007 - if (mesh_.changing()) - { - bound(k_, k0_); - bound(omega_, omega0_); - } - - if (!turbulence_) - { - // Re-calculate viscosity - mut_ = - a1_*rho_*k_ - /max(a1_*omega_, F2()*sqrt(2*magSqr(symm(fvc::grad(U_))))); - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - return; - } - - RASModel::correct(); - - volScalarField divU = fvc::div(phi_/fvc::interpolate(rho_)); - - if (mesh_.changing()) - { - y_.correct(); - } - - if (mesh_.moving()) - { - divU += fvc::div(mesh_.phi()); - } - - tmp tgradU = fvc::grad(U_); - volScalarField S2 = magSqr(symm(tgradU())); - volScalarField GbyMu = (tgradU() && dev(twoSymm(tgradU()))); - volScalarField G("RASModel::G", mut_*GbyMu); - tgradU.clear(); - -# include "kOmega_LowReI.H" - - volScalarField CDkOmega = - (2*alphaOmega2_)*(fvc::grad(k_) & fvc::grad(omega_))/omega_; - - volScalarField F1 = this->F1(CDkOmega); - volScalarField rhoGammaF1 = rho_*gamma(F1); - - // Turbulent frequency equation - tmp omegaEqn - ( - fvm::ddt(rho_, omega_) - + fvm::div(phi_, omega_) - - fvm::laplacian(DomegaEff(F1), omega_) - == - rhoGammaF1*GbyMu - - fvm::SuSp((2.0/3.0)*rhoGammaF1*divU, omega_) - - fvm::Sp(rho_*beta(F1)*omega_, omega_) - - fvm::SuSp - ( - rho_*(F1 - scalar(1))*CDkOmega/omega_, - omega_ - ) - ); - - omegaEqn().relax(); - -# include "wallOmega_LowReI.H" - - solve(omegaEqn); - bound(omega_, omega0_); - - // Turbulent kinetic energy equation - tmp kEqn - ( - fvm::ddt(rho_, k_) - + fvm::div(phi_, k_) - - fvm::laplacian(DkEff(F1), k_) - == - min(G, (c1_*betaStar_)*rho_*k_*omega_) - - fvm::SuSp(2.0/3.0*rho_*divU, k_) - - fvm::Sp(rho_*betaStar_*omega_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, k0_); - - - // Re-calculate viscosity - mut_ = a1_*rho_*k_/max(a1_*omega_, F2()*sqrt(2*S2)); - mut_.correctBoundaryConditions(); - - // Re-calculate thermal diffusivity - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H b/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H deleted file mode 100644 index c8d99ee20..000000000 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H +++ /dev/null @@ -1,294 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | - \\ / A nd | For copyright notice see file Copyright - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Class - Foam::compressible::RASModels::kOmegaSST_LowRe - -Description - Implementation of the k-omega-SST turbulence model for compressible flows - with low-Re near-wall treatment. - - Turbulence model described in: - @verbatim - AlAA 93-2906 - Zonal Two Equation k-cl, Turbulence Models for Aerodynamic Flows. - Florian R. Menter - @endverbatim - - Note that this implementation is written in terms of alpha diffusion - coefficients rather than the more traditional sigma (alpha = 1/sigma) so - that the blending can be applied to all coefficuients in a consistent - manner. The paper suggests that sigma is blended but this would not be - consistent with the blending of the k-epsilon and k-omega models. - - Also note that the error in the last term of equation (2) relating to - sigma has been corrected. - - Wall-functions are applied in this implementation by using equations (14) - to specify the near-wall omega as appropriate. - - The blending functions (15) and (16) are not currently used because of the - uncertainty in their origin, range of applicability and that is y+ becomes - sufficiently small blending u_tau in this manner clearly becomes nonsense. - - The default model coefficients correspond to the following: - @verbatim - kOmegaSST_LowRe - { - alphaK1 0.85034; - alphaK2 1.0; - alphaOmega1 0.5; - alphaOmega2 0.85616; - Prt 1.0; // only for compressible - beta1 0.075; - beta2 0.0828; - betaStar 0.09; - gamma1 0.5532; - gamma2 0.4403; - a1 0.31; - c1 10.0; - } - @endverbatim - -SourceFiles - kOmegaSST_LowRe.C - kOmegaWallFunctionsI.H - kOmegaWallViscosityI.H - wallOmegaI.H - -\*---------------------------------------------------------------------------*/ - -#ifndef compressiblekOmegaSST_LowRe_H -#define compressiblekOmegaSST_LowRe_H - -#include "RASModel.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class kOmegaSST_LowRe Declaration -\*---------------------------------------------------------------------------*/ - -class kOmegaSST_LowRe -: - public RASModel -{ - // Private data - - // Model coefficients - - dimensionedScalar alphaK1_; - dimensionedScalar alphaK2_; - - dimensionedScalar alphaOmega1_; - dimensionedScalar alphaOmega2_; - - dimensionedScalar Prt_; - - dimensionedScalar gamma1_; - dimensionedScalar gamma2_; - - dimensionedScalar beta1_; - dimensionedScalar beta2_; - - dimensionedScalar betaStar_; - - dimensionedScalar a1_; - dimensionedScalar c1_; - - dimensionedScalar Cmu_; - dimensionedScalar kappa_; - - - //- Wall distance - // Note: different to wall distance in parent RASModel - wallDist y_; - - // Fields - - volScalarField k_; - volScalarField omega_; - volScalarField mut_; - volScalarField alphat_; - - - // Private member functions - - tmp F1(const volScalarField& CDkOmega) const; - tmp F2() const; - - tmp blend - ( - const volScalarField& F1, - const dimensionedScalar& psi1, - const dimensionedScalar& psi2 - ) const - { - return F1*(psi1 - psi2) + psi2; - } - - tmp alphaK(const volScalarField& F1) const - { - return blend(F1, alphaK1_, alphaK2_); - } - - tmp alphaOmega(const volScalarField& F1) const - { - return blend(F1, alphaOmega1_, alphaOmega2_); - } - - tmp beta(const volScalarField& F1) const - { - return blend(F1, beta1_, beta2_); - } - - tmp gamma(const volScalarField& F1) const - { - return blend(F1, gamma1_, gamma2_); - } - - -public: - - //- Runtime type information - TypeName("kOmegaSST_LowRe"); - - - // Constructors - - //- Construct from components - kOmegaSST_LowRe - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermophysicalModel - ); - - - //- Destructor - - virtual ~kOmegaSST_LowRe() - {} - - - // Member Functions - - //- Return the effective diffusivity for k - tmp DkEff(const volScalarField& F1) const - { - return tmp - ( - new volScalarField("DkEff", alphaK(F1)*mut_ + mu()) - ); - } - - //- Return the effective diffusivity for omega - tmp DomegaEff(const volScalarField& F1) const - { - return tmp - ( - new volScalarField("DomegaEff", alphaOmega(F1)*mut_ + mu()) - ); - } - - virtual tmp mut() const - { - return mut_; - } - - //- Return the effective turbulent thermal diffusivity - virtual tmp alphaEff() const - { - return tmp - ( - new volScalarField("alphaEff", alphat_ + alpha()) - ); - } - - //- Return the turbulence kinetic energy - virtual tmp k() const - { - return k_; - } - - virtual tmp omega() const - { - return omega_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp epsilon() const - { - return tmp - ( - new volScalarField - ( - IOobject - ( - "epsilon", - mesh_.time().timeName(), - mesh_ - ), - betaStar_*k_*omega_, - omega_.boundaryField().types() - ) - ); - } - - //- Return the Reynolds stress tensor - virtual tmp R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp divDevRhoReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmega_LowReI.H b/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmega_LowReI.H deleted file mode 100644 index bd3687629..000000000 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmega_LowReI.H +++ /dev/null @@ -1,115 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | - \\ / A nd | For copyright notice see file Copyright - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Global - kOmegaWallFunctions - -Description - Calculate wall generation and frequency omega from wall-functions. - -\*---------------------------------------------------------------------------*/ - -{ - labelList cellBoundaryFaceCount(omega_.size(), 0); - - scalar Cmu25 = pow(Cmu_.value(), 0.25); - - const fvPatchList& patches = mesh_.boundary(); - - //- Initialise the near-wall omega and G fields to zero - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - omega_[faceCelli] = 0.0; - G[faceCelli] = 0.0; - } - } - } - - //- Accumulate the wall face contributions to omega and G - // Increment cellBoundaryFaceCount for each face for averaging - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType(curPatch)) - { -# include "checkkOmega_LowRePatchFieldTypes.H" - -// const scalarField& rhow = rho_.boundaryField()[patchi]; - - const scalarField& muw = mu().boundaryField()[patchi]; - const scalarField& mutw = mut_.boundaryField()[patchi]; - - scalarField magFaceGradU = - mag(U_.boundaryField()[patchi].snGrad()); - - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - // For corner cells (with two boundary or more faces), - // omega and G in the near-wall cell are calculated - // as an average - - cellBoundaryFaceCount[faceCelli]++; - - omega_[faceCelli] += scalar(6)*muw[facei]/ - (beta1_.value()*sqr(y_[faceCelli])); - - G[faceCelli] += - (mutw[facei] + muw[facei])*magFaceGradU[facei] - *Cmu25*sqrt(k_[faceCelli])/(kappa_.value()*y_[faceCelli]); - } - } - } - - - // Perform the averaging - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - omega_[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - G[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - } - } - } -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/wallOmega_LowReI.H b/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/wallOmega_LowReI.H deleted file mode 100644 index 265c0e480..000000000 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/wallOmega_LowReI.H +++ /dev/null @@ -1,50 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | - \\ / A nd | For copyright notice see file Copyright - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Global - wallOmega - -Description - Set wall dissipation in the omega matrix - -\*---------------------------------------------------------------------------*/ - -{ - const fvPatchList& patches = mesh_.boundary(); - - forAll(patches, patchi) - { - const fvPatch& p = patches[patchi]; - - if (p.isWall()) - { - omegaEqn().setValues - ( - p.faceCells(), - omega_.boundaryField()[patchi].patchInternalField() - ); - } - } -} - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/Make/files b/src/turbulenceModels/incompressible/RAS/Make/files index 230ca1f68..51a3bbfa1 100644 --- a/src/turbulenceModels/incompressible/RAS/Make/files +++ b/src/turbulenceModels/incompressible/RAS/Make/files @@ -17,7 +17,6 @@ LienCubicKELowRe/LienCubicKELowRe.C NonlinearKEShih/NonlinearKEShih.C LienLeschzinerLowRe/LienLeschzinerLowRe.C LamBremhorstKE/LamBremhorstKE.C -kOmegaSST_LowRe/kOmegaSST_LowRe.C /* Wall functions */ wallFunctions = derivedFvPatchFields/wallFunctions diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/checkkOmega_LowRePatchFieldTypes.H b/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/checkkOmega_LowRePatchFieldTypes.H deleted file mode 100644 index 025c06bb9..000000000 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/checkkOmega_LowRePatchFieldTypes.H +++ /dev/null @@ -1,19 +0,0 @@ -if (!isType(k_.boundaryField()[patchi])) -{ - FatalErrorIn("wall-function evaluation") - << k_.boundaryField()[patchi].type() - << " is the wrong k patchField type for wall-functions on patch " - << curPatch.name() << nl - << " should be zeroGradient" - << exit(FatalError); -} - -if (!isType(omega_.boundaryField()[patchi])) -{ - FatalErrorIn("wall-function evaluation") - << omega_.boundaryField()[patchi].type() - << " is the wrong omega patchField type for wall-functions on patch " - << curPatch.name() << nl - << " should be zeroGradient" - << exit(FatalError); -} diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C b/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C deleted file mode 100644 index b014b2479..000000000 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C +++ /dev/null @@ -1,431 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | - \\ / A nd | For copyright notice see file Copyright - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "kOmegaSST_LowRe.H" -#include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" - -#include "backwardsCompatibilityWallFunctions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(kOmegaSST_LowRe, 0); -addToRunTimeSelectionTable(RASModel, kOmegaSST_LowRe, dictionary); - - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp kOmegaSST_LowRe::F1(const volScalarField& CDkOmega) const -{ - volScalarField CDkOmegaPlus = max - ( - CDkOmega, - dimensionedScalar("1.0e-10", dimless/sqr(dimTime), 1.0e-10) - ); - - volScalarField arg1 = min - ( - min - ( - max - ( - (scalar(1)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*nu()/(sqr(y_)*omega_) - ), - (4*alphaOmega2_)*k_/(CDkOmegaPlus*sqr(y_)) - ), - scalar(10) - ); - - return tanh(pow4(arg1)); -} - - -tmp kOmegaSST_LowRe::F2() const -{ - volScalarField arg2 = min - ( - max - ( - (scalar(2)/betaStar_)*sqrt(k_)/(omega_*y_), - scalar(500)*nu()/(sqr(y_)*omega_) - ), - scalar(100) - ); - - return tanh(sqr(arg2)); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -kOmegaSST_LowRe::kOmegaSST_LowRe -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& lamTransportModel -) -: - RASModel(typeName, U, phi, lamTransportModel), - - alphaK1_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaK1", - coeffDict_, - 0.85034 - ) - ), - alphaK2_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaK2", - coeffDict_, - 1.0 - ) - ), - alphaOmega1_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaOmega1", - coeffDict_, - 0.5 - ) - ), - alphaOmega2_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaOmega2", - coeffDict_, - 0.85616 - ) - ), - gamma1_ - ( - dimensioned::lookupOrAddToDict - ( - "gamma1", - coeffDict_, - 0.5532 - ) - ), - gamma2_ - ( - dimensioned::lookupOrAddToDict - ( - "gamma2", - coeffDict_, - 0.4403 - ) - ), - beta1_ - ( - dimensioned::lookupOrAddToDict - ( - "beta1", - coeffDict_, - 0.075 - ) - ), - beta2_ - ( - dimensioned::lookupOrAddToDict - ( - "beta2", - coeffDict_, - 0.0828 - ) - ), - betaStar_ - ( - dimensioned::lookupOrAddToDict - ( - "betaStar", - coeffDict_, - 0.09 - ) - ), - a1_ - ( - dimensioned::lookupOrAddToDict - ( - "a1", - coeffDict_, - 0.31 - ) - ), - c1_ - ( - dimensioned::lookupOrAddToDict - ( - "c1", - coeffDict_, - 10.0 - ) - ), - Cmu_ - ( - dimensioned::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - kappa_ - ( - dimensioned::lookupOrAddToDict - ( - "kappa", - coeffDict_, - 0.41 - ) - ), - - y_(mesh_), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - U_.db(), - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - omega_ - ( - IOobject - ( - "omega", - runTime_.timeName(), - U_.db(), - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - nut_ - ( - IOobject - ( - "nut", - runTime_.timeName(), - U_.db(), - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - a1_*k_/max(a1_*(omega_ + omegaSmall_), F2()*mag(symm(fvc::grad(U_)))) - ) -{ - bound(omega_, omega0_); - - nut_ = a1_*k_/max(a1_*omega_, F2()*sqrt(2.0)*mag(symm(fvc::grad(U_)))); - nut_.correctBoundaryConditions(); - - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp kOmegaSST_LowRe::R() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - U_.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)), - k_.boundaryField().types() - ) - ); -} - - -tmp kOmegaSST_LowRe::devReff() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - U_.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -nuEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp kOmegaSST_LowRe::divDevReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - - fvc::div(nuEff()*dev(fvc::grad(U)().T())) - ); -} - - -bool kOmegaSST_LowRe::read() -{ - if (RASModel::read()) - { - alphaK1_.readIfPresent(coeffDict()); - alphaK2_.readIfPresent(coeffDict()); - alphaOmega1_.readIfPresent(coeffDict()); - alphaOmega2_.readIfPresent(coeffDict()); - gamma1_.readIfPresent(coeffDict()); - gamma2_.readIfPresent(coeffDict()); - beta1_.readIfPresent(coeffDict()); - beta2_.readIfPresent(coeffDict()); - betaStar_.readIfPresent(coeffDict()); - a1_.readIfPresent(coeffDict()); - c1_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -void kOmegaSST_LowRe::correct() -{ - // Bound in case of topological change - // HJ, 22/Aug/2007 - if (mesh_.changing()) - { - bound(k_, k0_); - bound(omega_, omega0_); - } - - RASModel::correct(); - - if (!turbulence_) - { - return; - } - - if (mesh_.changing()) - { - y_.correct(); - } - - volScalarField S2 = magSqr(symm(fvc::grad(U_))); - volScalarField G("RASModel::G", nut_*2*S2); - -# include "kOmega_LowReI.H" - - volScalarField CDkOmega = - (2*alphaOmega2_)*(fvc::grad(k_) & fvc::grad(omega_))/omega_; - - volScalarField F1 = this->F1(CDkOmega); - - // Turbulent frequency equation - tmp omegaEqn - ( - fvm::ddt(omega_) - + fvm::div(phi_, omega_) - + fvm::SuSp(-fvc::div(phi_), omega_) - - fvm::laplacian(DomegaEff(F1), omega_) - == - gamma(F1)*2*S2 - - fvm::Sp(beta(F1)*omega_, omega_) - - fvm::SuSp - ( - (F1 - scalar(1))*CDkOmega/omega_, - omega_ - ) - ); - - omegaEqn().relax(); - -# include "wallOmega_LowReI.H" - - solve(omegaEqn); - bound(omega_, omega0_); - - // Turbulent kinetic energy equation - tmp kEqn - ( - fvm::ddt(k_) - + fvm::div(phi_, k_) - + fvm::SuSp(-fvc::div(phi_), k_) - - fvm::laplacian(DkEff(F1), k_) - == - min(G, c1_*betaStar_*k_*omega_) - - fvm::Sp(betaStar_*omega_, k_) - ); - - kEqn().relax(); - solve(kEqn); - bound(k_, k0_); - - - // Re-calculate viscosity - nut_ = a1_*k_/max(a1_*omega_, F2()*sqrt(2*S2)); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H b/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H deleted file mode 100644 index 0f382e0ee..000000000 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.H +++ /dev/null @@ -1,295 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | - \\ / A nd | For copyright notice see file Copyright - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Class - Foam::incompressible::RASModels::kOmegaSST_LowRe - -Description - Implementation of the k-omega-SST turbulence model for incompressible - flows. - - Turbulence model described in: - @verbatim - Menter, F., Esch, T. - "Elements of Industrial Heat Transfer Prediction" - 16th Brazilian Congress of Mechanical Engineering (COBEM), - Nov. 2001 - @endverbatim - - Note that this implementation is written in terms of alpha diffusion - coefficients rather than the more traditional sigma (alpha = 1/sigma) so - that the blending can be applied to all coefficuients in a consistent - manner. The paper suggests that sigma is blended but this would not be - consistent with the blending of the k-epsilon and k-omega models. - - Also note that the error in the last term of equation (2) relating to - sigma has been corrected. - - Wall-functions are applied in this implementation by using equations (14) - to specify the near-wall omega as appropriate. - - The blending functions (15) and (16) are not currently used because of the - uncertainty in their origin, range of applicability and that is y+ becomes - sufficiently small blending u_tau in this manner clearly becomes nonsense. - - The default model coefficients correspond to the following: - @verbatim - kOmegaSST_LowRe - { - alphaK1 0.85034; - alphaK2 1.0; - alphaOmega1 0.5; - alphaOmega2 0.85616; - beta1 0.075; - beta2 0.0828; - betaStar 0.09; - gamma1 0.5532; - gamma2 0.4403; - a1 0.31; - c1 10.0; - } - @endverbatim - -SourceFiles - kOmegaSST_LowRe.C - kOmegaWallFunctionsI.H - kOmegaWallViscosityI.H - wallOmegaI.H - -\*---------------------------------------------------------------------------*/ - -#ifndef kOmegaSST_LowRe_H -#define kOmegaSST_LowRe_H - -#include "RASModel.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace RASModels -{ - -/*---------------------------------------------------------------------------*\ - Class kOmega Declaration -\*---------------------------------------------------------------------------*/ - -class kOmegaSST_LowRe -: - public RASModel -{ - // Private data - - // Model coefficients - - dimensionedScalar alphaK1_; - dimensionedScalar alphaK2_; - - dimensionedScalar alphaOmega1_; - dimensionedScalar alphaOmega2_; - - dimensionedScalar gamma1_; - dimensionedScalar gamma2_; - - dimensionedScalar beta1_; - dimensionedScalar beta2_; - - dimensionedScalar betaStar_; - - dimensionedScalar a1_; - dimensionedScalar c1_; - - dimensionedScalar Cmu_; - dimensionedScalar kappa_; - - - //- Wall distance field - // Note: different to wall distance in parent RASModel - wallDist y_; - - // Fields - - volScalarField k_; - volScalarField omega_; - volScalarField nut_; - - - // Private member functions - - tmp F1(const volScalarField& CDkOmega) const; - tmp F2() const; - - tmp blend - ( - const volScalarField& F1, - const dimensionedScalar& psi1, - const dimensionedScalar& psi2 - ) const - { - return F1*(psi1 - psi2) + psi2; - } - - tmp alphaK - ( - const volScalarField& F1 - ) const - { - return blend(F1, alphaK1_, alphaK2_); - } - - tmp alphaOmega - ( - const volScalarField& F1 - ) const - { - return blend(F1, alphaOmega1_, alphaOmega2_); - } - - tmp beta - ( - const volScalarField& F1 - ) const - { - return blend(F1, beta1_, beta2_); - } - - tmp gamma - ( - const volScalarField& F1 - ) const - { - return blend(F1, gamma1_, gamma2_); - } - - -public: - - //- Runtime type information - TypeName("kOmegaSST_LowRe"); - - - // Constructors - - //- Construct from components - kOmegaSST_LowRe - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - //- Destructor - - virtual ~kOmegaSST_LowRe() - {} - - - // Member Functions - - //- Return the turbulence viscosity - virtual tmp nut() const - { - return nut_; - } - - //- Return the effective diffusivity for k - tmp DkEff(const volScalarField& F1) const - { - return tmp - ( - new volScalarField("DkEff", alphaK(F1)*nut_ + nu()) - ); - } - - //- Return the effective diffusivity for omega - tmp DomegaEff(const volScalarField& F1) const - { - return tmp - ( - new volScalarField("DomegaEff", alphaOmega(F1)*nut_ + nu()) - ); - } - - //- Return the turbulence kinetic energy - virtual tmp k() const - { - return k_; - } - - //- Return the turbulence specific dissipation rate - virtual tmp omega() const - { - return omega_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp epsilon() const - { - return tmp - ( - new volScalarField - ( - IOobject - ( - "epsilon", - mesh_.time().timeName(), - mesh_ - ), - betaStar_*k_*omega_, - omega_.boundaryField().types() - ) - ); - } - - //- Return the Reynolds stress tensor - virtual tmp R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp devReff() const; - - //- Return the source term for the momentum equation - virtual tmp divDevReff(volVectorField& U) const; - - //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct(); - - //- Read RASProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace RASModels -} // namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmega_LowReI.H b/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmega_LowReI.H deleted file mode 100644 index 7c4d157fa..000000000 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmega_LowReI.H +++ /dev/null @@ -1,113 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | - \\ / A nd | For copyright notice see file Copyright - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Global - kOmegaWallFunctions - -Description - Calculate wall generation and frequency omega from wall-functions. - -\*---------------------------------------------------------------------------*/ - -{ - labelList cellBoundaryFaceCount(omega_.size(), 0); - - scalar Cmu25 = pow(Cmu_.value(), 0.25); - - const fvPatchList& patches = mesh_.boundary(); - - //- Initialise the near-wall omega and G fields to zero - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - omega_[faceCelli] = 0.0; - G[faceCelli] = 0.0; - } - } - } - - //- Accumulate the wall face contributions to omega and G - // Increment cellBoundaryFaceCount for each face for averaging - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType(curPatch)) - { -# include "checkkOmega_LowRePatchFieldTypes.H" - - const scalarField& nuw = nu().boundaryField()[patchi]; - const scalarField& nutw = nut_.boundaryField()[patchi]; - - scalarField magFaceGradU = - mag(U_.boundaryField()[patchi].snGrad()); - - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - // For corner cells (with two boundary or more faces), - // omega and G in the near-wall cell are calculated - // as an average - - cellBoundaryFaceCount[faceCelli]++; - - omega_[faceCelli] += scalar(6)*nuw[facei] - /(beta1_.value()*sqr(y_[faceCelli])); - - G[faceCelli] += - (nutw[facei] + nuw[facei])*magFaceGradU[facei] - *Cmu25*sqrt(k_[faceCelli])/(kappa_.value()*y_[faceCelli]); - } - } - } - - - // Perform the averaging - - forAll(patches, patchi) - { - const fvPatch& curPatch = patches[patchi]; - - if (isType(curPatch)) - { - forAll(curPatch, facei) - { - label faceCelli = curPatch.faceCells()[facei]; - - omega_[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - G[faceCelli] /= cellBoundaryFaceCount[faceCelli]; - } - } - } -} - - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/wallOmega_LowReI.H b/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/wallOmega_LowReI.H deleted file mode 100644 index 265c0e480..000000000 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/wallOmega_LowReI.H +++ /dev/null @@ -1,50 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | - \\ / A nd | For copyright notice see file Copyright - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . - -Global - wallOmega - -Description - Set wall dissipation in the omega matrix - -\*---------------------------------------------------------------------------*/ - -{ - const fvPatchList& patches = mesh_.boundary(); - - forAll(patches, patchi) - { - const fvPatch& p = patches[patchi]; - - if (p.isWall()) - { - omegaEqn().setValues - ( - p.faceCells(), - omega_.boundaryField()[patchi].patchInternalField() - ); - } - } -} - -// ************************************************************************* // From 453aa36bc318296352bd363a6aa38f741893ec19 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Sat, 15 Feb 2014 22:52:19 -0500 Subject: [PATCH 24/66] ThirdParty: bumping Qt to version 4.8.5 --- ThirdParty/AllMake.stage4 | 4 +- .../qt-everywhere-opensource-src-4.8.5.spec | 183 ++++++++++++++++++ etc/settings.csh | 6 +- etc/settings.sh | 4 +- 4 files changed, 189 insertions(+), 8 deletions(-) create mode 100644 ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.8.5.spec diff --git a/ThirdParty/AllMake.stage4 b/ThirdParty/AllMake.stage4 index 9a44b53fb..d222d5ff5 100755 --- a/ThirdParty/AllMake.stage4 +++ b/ThirdParty/AllMake.stage4 @@ -56,10 +56,10 @@ echo Starting ThirdParty AllMake: Stage4 echo ======================================== echo -# qt-everywhere-opensource-src-4.7.4 +# qt-everywhere-opensource-src-4.8.5 if [ ! -z "$QT_THIRD_PARTY" ] then - ( rpm_make -p qt-everywhere-opensource-src-4.7.4 -s qt-everywhere-opensource-src-4.7.4.spec -u http://download.qt-project.org/archive/qt/4.7/qt-everywhere-opensource-src-4.7.4.tar.gz ) + ( rpm_make -p qt-everywhere-opensource-src-4.8.5 -s qt-everywhere-opensource-src-4.8.5.spec -u http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz ) else echo "Using system installed QT" echo "" diff --git a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.8.5.spec b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.8.5.spec new file mode 100644 index 000000000..4aa33686f --- /dev/null +++ b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.8.5.spec @@ -0,0 +1,183 @@ +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | foam-extend: Open Source CFD +# \\ / O peration | +# \\ / A nd | For copyright notice see file Copyright +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of foam-extend. +# +# foam-extend is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# foam-extend is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with foam-extend. If not, see . +# +# Script +# RPM spec file for qt-everywhere-opensource-src-4.8.5 +# +# Description +# RPM spec file for creating a relocatable RPM +# +# Author: +# Martin Beaudoin, Hydro-Quebec, (2014) +# +#------------------------------------------------------------------------------ + +# We grab the value of WM_THIRD_PARTY and WM_OPTIONS from the environment variable +%{expand:%%define _WM_THIRD_PARTY_DIR %(echo $WM_THIRD_PARTY_DIR)} +%{expand:%%define _WM_OPTIONS %(echo $WM_OPTIONS)} + +# Disable the generation of debuginfo packages +%define debug_package %{nil} + +# The topdir needs to point to the $WM_THIRD_PARTY/rpmbuild directory +%define _topdir %{_WM_THIRD_PARTY_DIR}/rpmBuild +%define _tmppath %{_topdir}/tmp + +# Will install the package directly $WM_THIRD_PARTY_DIR +# Some comments about package relocation: +# By using this prefix for the Prefix: parameter in this file, you will make this +# package relocatable. +# +# This is fine, as long as your software is itself relocatable. +# +# Simply take note that libraries built with libtool are not relocatable because the +# prefix we specify will be hard-coded in the library .la files. +# Ref: http://sourceware.org/autobook/autobook/autobook_80.html +# +# In that case, if you ever change the value of the $WM_THIRD_PARTY_DIR, you will +# not be able to reutilize this RPM, even though it is relocatable. You will need to +# regenerate the RPM. +# +%define _prefix %{_WM_THIRD_PARTY_DIR} + +%define name qt-everywhere-opensource-src +%define release %{_WM_OPTIONS} +%define version 4.8.5 + +%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root + +%define _unpackaged_files_terminate_build 0 +%define _missing_doc_files_terminate_build 0 + +BuildRoot: %{buildroot} +Summary: qt-everywhere-opensource-src +License: Unkown +Name: %{name} +Version: %{version} +Release: %{release} +URL: http://download.qt-project.org/official_releases/qt/4.8/4.8.5 +Source: %url/%{name}-%{version}.tar.gz +Prefix: %{_prefix} +Group: Development/Tools + + +%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS} + +%description +%{summary} + +%prep +%setup -q + +%build + # export WM settings in a form that GNU configure recognizes + [ -n "$WM_CC" ] && export CC="$WM_CC" + [ -n "$WM_CXX" ] && export CXX="$WM_CXX" + [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" + [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" + [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" + +%ifos darwin + # Under Mac OS X, Qt 4.8 will only compile using the stock native g++ compiler supplied with Xcode. + # If your native Mac OS X g++ compiler is not located under /usr/bin, simply adjust the redefinition of the following variables accordingly. + # This is ugly, I know... + export CC=/usr/bin/gcc + export CXX=/usr/bin/g++ + export PATH=/usr/bin:$PATH +%endif + + ./configure \ + -opensource --confirm-license=yes \ + -release -shared \ + -nomake examples -nomake demos \ + --prefix=%{_installPrefix} + + # Explicitely specify LD_LIBRARY_PATH so it can find QT own libraries + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/lib + + [ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1 + make -j $WM_NCOMPPROCS + +%install + # Makefiles generated by qmake do not to support the DESTDIR= option + # We need to use the INSTALL_ROOT= option instead + + # Somehow, we need to clean up for the RPM to install properly + rm -rf %{_installPrefix} + + make install INSTALL_ROOT=$RPM_BUILD_ROOT + + # Creation of OpenFOAM specific .csh and .sh files" + + echo "" + echo "Generating OpenFOAM specific .csh and .sh files for the package %{name}-%{version}" + echo "" + # + # Generate package specific .sh file for OpenFOAM + # +mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/etc +cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export QT_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS +export QT_BIN_DIR=\$QT_DIR/bin +export QT_LIB_DIR=\$QT_DIR/lib + +# Enable access to the runtime package applications +[ -d \$QT_BIN_DIR ] && _foamAddPath \$QT_BIN_DIR +[ -d \$QT_LIB_DIR ] && _foamAddLib \$QT_LIB_DIR +DOT_SH_EOF + + # + # Generate package specific .csh file for OpenFOAM + # +cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.csh +# Load %{name}-%{version} libraries and binaries if available +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +setenv QT_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS +setenv QT_BIN_DIR \$QT_DIR/bin +setenv QT_LIB_DIR \$QT_DIR/lib + +if ( -e \$QT_BIN_DIR ) then + _foamAddPath \$QT_BIN_DIR +endif + +if ( -e \$QT_LIB_DIR ) then + _foamAddLib \$QT_LIB_DIR +endif +DOT_CSH_EOF + + #finally, generate a .tgz file for systems where using rpm for installing packages + # as a non-root user might be a problem. + (mkdir -p %{_topdir}/TGZS/%{_target_cpu}; cd $RPM_BUILD_ROOT/%{_prefix}; tar -zcvf %{_topdir}/TGZS/%{_target_cpu}/%{name}-%{version}.tgz packages/%{name}-%{version}) + + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_installPrefix} + + diff --git a/etc/settings.csh b/etc/settings.csh index 6d3435b38..011d7858c 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -476,10 +476,8 @@ endif # QT # ~~~~~ -if ( $?QT_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/qt-everywhere-opensource-src-4.7.4/platforms/$WM_OPTIONS )then - _foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.7.4/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.7.4.csh -#if ( $?QT_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/qt-everywhere-opensource-src-4.7.0/platforms/$WM_OPTIONS )then -# _foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.7.0/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.7.0.csh +if ( $?QT_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS )then + _foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.8.5.csh endif # PARAVIEW diff --git a/etc/settings.sh b/etc/settings.sh index e85bf95e8..698b678df 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -583,8 +583,8 @@ export MPI_BUFFER_SIZE # Load QT # ~~~~~~~ -[ ! -z "$QT_THIRD_PARTY" ] && [ -e $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.7.4/platforms/$WM_OPTIONS ] && { - _foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.7.4/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.7.4.sh +[ ! -z "$QT_THIRD_PARTY" ] && [ -e $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS ] && { + _foamSource $WM_THIRD_PARTY_DIR/packages/qt-everywhere-opensource-src-4.8.5/platforms/$WM_OPTIONS/etc/qt-everywhere-opensource-src-4.8.5.sh } [ "$FOAM_VERBOSE" -a "$PS1" ] && echo " QT_DIR is initialized to: $QT_DIR" From e0eb6b91a1da1764ed7ce6babc725824495ebcdd Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 12 Feb 2014 16:43:07 +0000 Subject: [PATCH 25/66] More template depth in instantiation --- wmake/rules/linux64Gcc45/c++ | 2 +- wmake/rules/linux64Gcc46/c++ | 2 +- wmake/rules/linuxGcc45/c++ | 2 +- wmake/rules/linuxGcc46/c++ | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wmake/rules/linux64Gcc45/c++ b/wmake/rules/linux64Gcc45/c++ index 72ba3bf12..605fc9253 100644 --- a/wmake/rules/linux64Gcc45/c++ +++ b/wmake/rules/linux64Gcc45/c++ @@ -6,7 +6,7 @@ CC = g++ -m64 include $(RULES)/c++$(WM_COMPILE_OPTION) -ptFLAGS = -DNoRepository -ftemplate-depth-40 +ptFLAGS = -DNoRepository -ftemplate-depth-200 c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linux64Gcc46/c++ b/wmake/rules/linux64Gcc46/c++ index 72ba3bf12..605fc9253 100644 --- a/wmake/rules/linux64Gcc46/c++ +++ b/wmake/rules/linux64Gcc46/c++ @@ -6,7 +6,7 @@ CC = g++ -m64 include $(RULES)/c++$(WM_COMPILE_OPTION) -ptFLAGS = -DNoRepository -ftemplate-depth-40 +ptFLAGS = -DNoRepository -ftemplate-depth-200 c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxGcc45/c++ b/wmake/rules/linuxGcc45/c++ index 2f19f3a34..fe5929adb 100644 --- a/wmake/rules/linuxGcc45/c++ +++ b/wmake/rules/linuxGcc45/c++ @@ -6,7 +6,7 @@ CC = g++ -m32 include $(RULES)/c++$(WM_COMPILE_OPTION) -ptFLAGS = -DNoRepository -ftemplate-depth-40 +ptFLAGS = -DNoRepository -ftemplate-depth-200 c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxGcc46/c++ b/wmake/rules/linuxGcc46/c++ index 2f19f3a34..fe5929adb 100644 --- a/wmake/rules/linuxGcc46/c++ +++ b/wmake/rules/linuxGcc46/c++ @@ -6,7 +6,7 @@ CC = g++ -m32 include $(RULES)/c++$(WM_COMPILE_OPTION) -ptFLAGS = -DNoRepository -ftemplate-depth-40 +ptFLAGS = -DNoRepository -ftemplate-depth-200 c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC From 9b94abdb66b13fa3eec4e4066bec03483523cd4b Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 12 Feb 2014 16:45:24 +0000 Subject: [PATCH 26/66] Added named ddt and d2dt2 --- src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C | 68 +++++++++++----- src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H | 26 +++++- src/finiteVolume/finiteVolume/fvm/fvmDdt.C | 83 +++++++++++++++----- src/finiteVolume/finiteVolume/fvm/fvmDdt.H | 31 ++++++++ 4 files changed, 170 insertions(+), 38 deletions(-) diff --git a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C index a4f8b5d97..e3399f468 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C +++ b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C @@ -44,17 +44,63 @@ template tmp > d2dt2 ( - GeometricField& vf + GeometricField& vf, + const word& name ) { return fv::d2dt2Scheme::New ( vf.mesh(), - vf.mesh().schemesDict().d2dt2Scheme("d2dt2(" + vf.name() + ')') + vf.mesh().schemesDict().d2dt2Scheme(name) )().fvmD2dt2(vf); } +template +tmp > +d2dt2 +( + const dimensionedScalar& rho, + GeometricField& vf, + const word& name +) +{ + return fv::d2dt2Scheme::New + ( + vf.mesh(), + vf.mesh().schemesDict().d2dt2Scheme(name) + )().fvmD2dt2(rho, vf); +} + + +template +tmp > +d2dt2 +( + const volScalarField& rho, + GeometricField& vf, + const word& name +) +{ + return fv::d2dt2Scheme::New + ( + vf.mesh(), + vf.mesh().schemesDict().d2dt2Scheme(name) + )().fvmD2dt2(rho, vf); +} + + +template +tmp > +d2dt2 +( + GeometricField& vf +) +{ + return fvm::d2dt2(vf, "d2dt2(" + vf.name() + ')'); +} + + template tmp > d2dt2 @@ -63,14 +109,7 @@ d2dt2 GeometricField& vf ) { - return fv::d2dt2Scheme::New - ( - vf.mesh(), - vf.mesh().schemesDict().d2dt2Scheme - ( - "d2dt2(" + rho.name() + ',' + vf.name() + ')' - ) - )().fvmD2dt2(rho, vf); + return fvm::d2dt2(rho, vf, "d2dt2(" + rho.name() + ',' + vf.name() + ')'); } @@ -82,14 +121,7 @@ d2dt2 GeometricField& vf ) { - return fv::d2dt2Scheme::New - ( - vf.mesh(), - vf.mesh().schemesDict().d2dt2Scheme - ( - "d2dt2(" + rho.name() + ',' + vf.name() + ')' - ) - )().fvmD2dt2(rho, vf); + return fvm::d2dt2(rho, vf, "d2dt2(" + rho.name() + ',' + vf.name() + ')'); } diff --git a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H index 8424b741a..eb878c961 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H +++ b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H @@ -53,7 +53,31 @@ namespace fvm tmp > d2dt2 ( const dimensionedScalar&, - GeometricField& + GeometricField&, + const word& name + ); + + template + tmp > d2dt2 + ( + GeometricField&, + const word& name + ); + + template + tmp > d2dt2 + ( + const volScalarField&, + GeometricField&, + const word& name + ); + + template + tmp > d2dt2 + ( + const dimensionedScalar&, + GeometricField&, + const word& name ); template diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C index 851e4b255..cb31fe64e 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C +++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C @@ -44,17 +44,76 @@ template tmp > ddt ( - GeometricField& vf + GeometricField& vf, + const word& name ) { return fv::ddtScheme::New ( vf.mesh(), - vf.mesh().schemesDict().ddtScheme("ddt(" + vf.name() + ')') + vf.mesh().schemesDict().ddtScheme(name) )().fvmDdt(vf); } +template +tmp > +ddt +( + const geometricOneField&, + GeometricField& vf, + const word& name +) +{ + return fvm::ddt(vf, name); +} + + +template +tmp > +ddt +( + const dimensionedScalar& rho, + GeometricField& vf, + const word& name +) +{ + return fv::ddtScheme::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme(name) + )().fvmDdt(rho, vf); +} + + +template +tmp > +ddt +( + const volScalarField& rho, + GeometricField& vf, + const word& name +) +{ + return fv::ddtScheme::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme(name) + )().fvmDdt(rho, vf); +} + + +template +tmp > +ddt +( + GeometricField& vf +) +{ + return fvm::ddt(vf, "ddt(" + vf.name() + ')'); +} + + template tmp > ddt @@ -63,7 +122,7 @@ ddt GeometricField& vf ) { - return ddt(vf); + return fvm::ddt(vf); } @@ -75,14 +134,7 @@ ddt GeometricField& vf ) { - return fv::ddtScheme::New - ( - vf.mesh(), - vf.mesh().schemesDict().ddtScheme - ( - "ddt(" + rho.name() + ',' + vf.name() + ')' - ) - )().fvmDdt(rho, vf); + return fvm::ddt(rho, vf, "ddt(" + rho.name() + ',' + vf.name() + ')'); } @@ -94,14 +146,7 @@ ddt GeometricField& vf ) { - return fv::ddtScheme::New - ( - vf.mesh(), - vf.mesh().schemesDict().ddtScheme - ( - "ddt(" + rho.name() + ',' + vf.name() + ')' - ) - )().fvmDdt(rho, vf); + return fvm::ddt(rho, vf, "ddt(" + rho.name() + ',' + vf.name() + ')'); } diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H index b31c9f743..5024d8d68 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H +++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H @@ -50,6 +50,37 @@ namespace Foam namespace fvm { + template + tmp > ddt + ( + GeometricField&, + const word& name + ); + + template + tmp > ddt + ( + const geometricOneField&, + GeometricField&, + const word& name + ); + + template + tmp > ddt + ( + const dimensionedScalar&, + GeometricField&, + const word& name + ); + + template + tmp > ddt + ( + const volScalarField&, + GeometricField&, + const word& name + ); + template tmp > ddt ( From e50d7c4dcc19f279f962286574975fc293cc2e34 Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Mon, 17 Feb 2014 15:05:12 +0000 Subject: [PATCH 27/66] Added #!/bin/bash ; serial compile for swak4Foam --- Allwmake.firstInstall | 1 + etc/bashrc | 1 + etc/settings.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/Allwmake.firstInstall b/Allwmake.firstInstall index 94acee1e4..de8eaea35 100755 --- a/Allwmake.firstInstall +++ b/Allwmake.firstInstall @@ -80,6 +80,7 @@ then fi # build ThirdParty sources that depend on main installation +export WM_NCOMPPROCS=1 ( cd $WM_THIRD_PARTY_DIR && ./AllMake.post ) # ----------------------------------------------------------------- end-of-file diff --git a/etc/bashrc b/etc/bashrc index 6aad1f6ce..4d8c7ef55 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -1,3 +1,4 @@ +#!/bin/bash #----------------------------------*-sh-*-------------------------------------- # ========= | # \\ / F ield | foam-extend: Open Source CFD diff --git a/etc/settings.sh b/etc/settings.sh index e85bf95e8..023e77f6c 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -1,3 +1,4 @@ +#!/bin/bash #----------------------------------*-sh-*-------------------------------------- # ========= | # \\ / F ield | foam-extend: Open Source CFD From fbbfe1f59dccee8b066e917bbe8480670ac06cd9 Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Mon, 17 Feb 2014 11:12:51 +0000 Subject: [PATCH 28/66] Fixed closing comments on cuda file headers; reversed Allwmake logic --- src/cudaSolvers/Allwmake | 6 +++--- src/cudaSolvers/cudaBiCGStab/bicgAinv.cu | 20 ++++++++------------ src/cudaSolvers/cudaBiCGStab/bicgDiag.cu | 20 ++++++++------------ src/cudaSolvers/cudaCG/cgAinv.cu | 20 ++++++++------------ src/cudaSolvers/cudaCG/cgAmg.cu | 19 ++++++++----------- src/cudaSolvers/cudaCG/cgDiag.cu | 19 ++++++++----------- src/cudaSolvers/include/buildNormFactor.H | 21 +++++++++------------ src/cudaSolvers/include/fillCOOMatrix.H | 23 ++++++++++------------- 8 files changed, 62 insertions(+), 86 deletions(-) diff --git a/src/cudaSolvers/Allwmake b/src/cudaSolvers/Allwmake index 77d376d04..095b3108d 100755 --- a/src/cudaSolvers/Allwmake +++ b/src/cudaSolvers/Allwmake @@ -1,14 +1,14 @@ -#!/bin/sh +#!/bin/bash cd ${0%/*} || exit 1 # run from this directory if [ -f $CUDA_BIN_DIR/nvcc ] then if [ -z $CUDA_IGNORE ] then - echo "Found nvcc but \$CUDA_IGNORE set -- not enabling CUDA support." - else echo "Found nvcc -- enabling CUDA support." wmake libso + else + echo "Found nvcc but \$CUDA_IGNORE set -- not enabling CUDA support." fi else echo "No nvcc - CUDA not available." diff --git a/src/cudaSolvers/cudaBiCGStab/bicgAinv.cu b/src/cudaSolvers/cudaBiCGStab/bicgAinv.cu index bd747d4ce..028966234 100644 --- a/src/cudaSolvers/cudaBiCGStab/bicgAinv.cu +++ b/src/cudaSolvers/cudaBiCGStab/bicgAinv.cu @@ -32,21 +32,17 @@ This file is part of cufflink. GNU General Public License for more details. You should have received a copy of the GNU General Public License - This file is part of foam-extend. + along with cufflink. If not, see . - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. + Author + Daniel P. Combest. All rights reserved. + Modifications by Dominik Christ, Wikki Ltd. - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . + Description + diagonal preconditioned conjugate gradient + solver for symmetric Matrices using a CUSP CUDA™ based solver. +\**********************************************************************/ #include "cudaTypes.H" diff --git a/src/cudaSolvers/cudaBiCGStab/bicgDiag.cu b/src/cudaSolvers/cudaBiCGStab/bicgDiag.cu index 546d002a7..bfea700e5 100644 --- a/src/cudaSolvers/cudaBiCGStab/bicgDiag.cu +++ b/src/cudaSolvers/cudaBiCGStab/bicgDiag.cu @@ -32,21 +32,17 @@ This file is part of cufflink. GNU General Public License for more details. You should have received a copy of the GNU General Public License - This file is part of foam-extend. + along with cufflink. If not, see . - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. + Author + Daniel P. Combest. All rights reserved. + Modifications by Dominik Christ, Wikki Ltd. - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . + Description + diagonal preconditioned conjugate gradient + solver for symmetric Matrices using a CUSP CUDA™ based solver. +\**********************************************************************/ #include "cudaTypes.H" diff --git a/src/cudaSolvers/cudaCG/cgAinv.cu b/src/cudaSolvers/cudaCG/cgAinv.cu index 70340ae1d..5e391fad8 100644 --- a/src/cudaSolvers/cudaCG/cgAinv.cu +++ b/src/cudaSolvers/cudaCG/cgAinv.cu @@ -32,21 +32,17 @@ This file is part of cufflink. GNU General Public License for more details. You should have received a copy of the GNU General Public License - This file is part of foam-extend. + along with cufflink. If not, see . - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. + Author + Daniel P. Combest. All rights reserved. + Modifications by Dominik Christ, Wikki Ltd. - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . + Description + diagonal preconditioned conjugate gradient + solver for symmetric Matrices using a CUSP CUDA™ based solver. +\**********************************************************************/ #include "cudaTypes.H" diff --git a/src/cudaSolvers/cudaCG/cgAmg.cu b/src/cudaSolvers/cudaCG/cgAmg.cu index e2e5f88bf..d6ab2807c 100644 --- a/src/cudaSolvers/cudaCG/cgAmg.cu +++ b/src/cudaSolvers/cudaCG/cgAmg.cu @@ -32,20 +32,17 @@ This file is part of cufflink. GNU General Public License for more details. You should have received a copy of the GNU General Public License - This file is part of foam-extend. + along with cufflink. If not, see . - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. + Author + Daniel P. Combest. All rights reserved. + Modifications by Dominik Christ, Wikki Ltd. - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Description + diagonal preconditioned conjugate gradient + solver for symmetric Matrices using a CUSP CUDA™ based solver. - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . +\**********************************************************************/ #include "cudaTypes.H" diff --git a/src/cudaSolvers/cudaCG/cgDiag.cu b/src/cudaSolvers/cudaCG/cgDiag.cu index df3eccbbe..db4ca0e62 100644 --- a/src/cudaSolvers/cudaCG/cgDiag.cu +++ b/src/cudaSolvers/cudaCG/cgDiag.cu @@ -32,20 +32,17 @@ This file is part of cufflink. GNU General Public License for more details. You should have received a copy of the GNU General Public License - This file is part of foam-extend. + along with cufflink. If not, see . - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. + Author + Daniel P. Combest. All rights reserved. + Modifications by Dominik Christ, Wikki Ltd. - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Description + diagonal preconditioned conjugate gradient + solver for symmetric Matrices using a CUSP CUDA™ based solver. - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . +\**********************************************************************/ #include "cudaTypes.H" diff --git a/src/cudaSolvers/include/buildNormFactor.H b/src/cudaSolvers/include/buildNormFactor.H index e391f1d71..70f4e8f6d 100644 --- a/src/cudaSolvers/include/buildNormFactor.H +++ b/src/cudaSolvers/include/buildNormFactor.H @@ -12,7 +12,7 @@ cufflink is a library for linking numerical methods based on Nvidia's Compute Unified Device Architecture (CUDA™) C/C++ programming language and OpenFOAM®. -Please note that cufflink is not approved or endorsed by OpenCFD® +Please note that cufflink is not approved or endorsed by ESI-OpenCFD® Limited, the owner of the OpenFOAM® and OpenCFD® trademarks and producer of OpenFOAM® software. @@ -32,20 +32,17 @@ This file is part of cufflink. GNU General Public License for more details. You should have received a copy of the GNU General Public License - This file is part of foam-extend. + along with cufflink. If not, see . - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. + Author + Daniel P. Combest. All rights reserved. + Modifications by Dominik Christ, Wikki Ltd. - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Description + diagonal preconditioned conjugate gradient + solver for symmetric Matrices using a CUSP CUDA™ based solver. - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . +\**********************************************************************/ // Build the normfactor as foam-extend does in file diff --git a/src/cudaSolvers/include/fillCOOMatrix.H b/src/cudaSolvers/include/fillCOOMatrix.H index 26efcfe96..93f694fdc 100644 --- a/src/cudaSolvers/include/fillCOOMatrix.H +++ b/src/cudaSolvers/include/fillCOOMatrix.H @@ -9,10 +9,10 @@ Cuda For FOAM Link cufflink is a library for linking numerical methods based on Nvidia's -Compute Unified Device Architecture (CUDA™) C/C + + programming language +Compute Unified Device Architecture (CUDA™) C/C++ programming language and OpenFOAM®. -Please note that cufflink is not approved or endorsed by OpenCFD® +Please note that cufflink is not approved or endorsed by ESI-OpenCFD® Limited, the owner of the OpenFOAM® and OpenCFD® trademarks and producer of OpenFOAM® software. @@ -32,20 +32,17 @@ This file is part of cufflink. GNU General Public License for more details. You should have received a copy of the GNU General Public License - This file is part of foam-extend. + along with cufflink. If not, see . - foam-extend is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. + Author + Daniel P. Combest. All rights reserved. + Modifications by Dominik Christ, Wikki Ltd. - foam-extend is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Description + diagonal preconditioned conjugate gradient + solver for symmetric Matrices using a CUSP CUDA™ based solver. - You should have received a copy of the GNU General Public License - along with foam-extend. If not, see . +\**********************************************************************/ // Fill in the rest of the diag (rows and col), // upper and upper.rows and upper.cols From 3810b29f37b7b21339232263d45eaf5597bc9187 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Sun, 23 Feb 2014 10:53:50 +0000 Subject: [PATCH 29/66] Solid models update - boundary traction --- .../solidCohesiveFvPatchVectorField.C | 986 +++++++++--------- .../constitutiveModel/constitutiveModel.H | 25 +- .../tractionBoundaryGradient.C | 885 +++++++++------- .../tractionBoundaryGradient.H | 45 +- .../dirichletNeumannFriction.C | 30 +- .../dirichletNeumann/dirichletNeumann.C | 336 +++--- ...acementOrSolidTractionFvPatchVectorField.C | 27 +- ...dDisplacementZeroShearFvPatchVectorField.C | 53 +- ...roShearOrSolidTractionFvPatchVectorField.C | 63 +- .../solidContactFvPatchVectorField.C | 205 ++-- .../solidTractionFvPatchVectorField.C | 26 +- .../solidTractionFvPatchVectorField.H | 2 +- .../solidTractionFreeFvPatchVectorField.C | 20 +- .../solidTractionFreeFvPatchVectorField.H | 2 +- ...dDisplacementZeroShearFvPatchVectorField.C | 10 +- .../nonLinearGeometry/nonLinearGeometry.H | 2 +- .../elasticIncrSolidFoam/incrPlateHole/0/DU | 8 +- .../incrPlateHole/constant/polyMesh/boundary | 2 +- .../elasticSolidFoam/plateHole/0/U | 11 +- .../plateHole/constant/polyMesh/boundary | 2 +- 20 files changed, 1491 insertions(+), 1249 deletions(-) diff --git a/src/solidModels/arbitraryCrack/solidCohesive/solidCohesiveFvPatchVectorField.C b/src/solidModels/arbitraryCrack/solidCohesive/solidCohesiveFvPatchVectorField.C index 7a0accb32..a7a78cb44 100644 --- a/src/solidModels/arbitraryCrack/solidCohesive/solidCohesiveFvPatchVectorField.C +++ b/src/solidModels/arbitraryCrack/solidCohesive/solidCohesiveFvPatchVectorField.C @@ -116,10 +116,10 @@ solidCohesiveFvPatchVectorField::solidCohesiveFvPatchVectorField nonLinear_(nonLinearGeometry::OFF), orthotropic_(false) { - Info << "Creating solidCohesive patch" << nl - << "\tOnly Dugdale law currently available!" << endl; + Info<< "Creating solidCohesive patch" << nl + << "\tOnly Dugdale law currently available!" << endl; - //- check if traction boundary is for non linear solver + // Check if traction boundary is for non linear solver if (dict.found("nonLinear")) { nonLinear_ = nonLinearGeometry::nonLinearNames_.read @@ -127,23 +127,23 @@ solidCohesiveFvPatchVectorField::solidCohesiveFvPatchVectorField dict.lookup("nonLinear") ); - if (nonLinear_ == nonLinearGeometry::UPDATED_LAGRANGIAN) - { - Info << "\tnonLinear set to updated Lagrangian" - << endl; - } - else if (nonLinear_ == nonLinearGeometry::TOTAL_LAGRANGIAN) - { - Info << "\tnonLinear set to total Lagrangian" - << endl; - } - } + if (nonLinear_ == nonLinearGeometry::UPDATED_LAGRANGIAN) + { + Info << "\tnonLinear set to updated Lagrangian" + << endl; + } + else if (nonLinear_ == nonLinearGeometry::TOTAL_LAGRANGIAN) + { + Info << "\tnonLinear set to total Lagrangian" + << endl; + } + } if (dict.found("orthotropic")) - { - orthotropic_ = Switch(dict.lookup("orthotropic")); - Info << "\t\torthotropic set to " << orthotropic_ << endl; - } + { + orthotropic_ = Switch(dict.lookup("orthotropic")); + Info << "\t\torthotropic set to " << orthotropic_ << endl; + } // if (minUnloadingSeparationDistance_ < 0.001) // { @@ -216,73 +216,73 @@ solidCohesiveFvPatchVectorField::solidCohesiveFvPatchVectorField // } if (dict.found("cracked")) - { + { // cracked_ = Field("cracked", dict, p.size()); - cracked_ = Field("cracked", dict, p.size()); - } + cracked_ = Field("cracked", dict, p.size()); + } if (dict.found("curTractionN")) - { - curTractionN_ = scalarField("curTractionN", dict, p.size()); - } + { + curTractionN_ = scalarField("curTractionN", dict, p.size()); + } if (dict.found("curTractionS")) - { - curTractionS_ = scalarField("curTractionS", dict, p.size()); - } + { + curTractionS_ = scalarField("curTractionS", dict, p.size()); + } if (dict.found("oldTractionN")) - { - oldTractionN_ = scalarField("oldTractionN", dict, p.size()); - } + { + oldTractionN_ = scalarField("oldTractionN", dict, p.size()); + } if (dict.found("oldTractionS")) - { - oldTractionS_ = scalarField("oldTractionS", dict, p.size()); - } + { + oldTractionS_ = scalarField("oldTractionS", dict, p.size()); + } if (dict.found("deltaN")) - { - deltaN_ = scalarField("deltaN", dict, p.size()); - } + { + deltaN_ = scalarField("deltaN", dict, p.size()); + } if (dict.found("deltaS")) - { - deltaS_ = scalarField("deltaS", dict, p.size()); - } + { + deltaS_ = scalarField("deltaS", dict, p.size()); + } if (dict.found("oldDeltaN")) - { - oldDeltaN_ = scalarField("oldDeltaN", dict, p.size()); - } + { + oldDeltaN_ = scalarField("oldDeltaN", dict, p.size()); + } if (dict.found("oldDeltaS")) - { - oldDeltaS_ = scalarField("oldDeltaS", dict, p.size()); - } + { + oldDeltaS_ = scalarField("oldDeltaS", dict, p.size()); + } if (dict.found("curDeltaN")) - { - curDeltaN_ = scalarField("curDeltaN", dict, p.size()); - } + { + curDeltaN_ = scalarField("curDeltaN", dict, p.size()); + } if (dict.found("curDeltaS")) - { - curDeltaS_ = scalarField("curDeltaS", dict, p.size()); - } + { + curDeltaS_ = scalarField("curDeltaS", dict, p.size()); + } if (dict.found("unloadingDeltaEff")) - { - unloadingDeltaEff_ = scalarField("unloadingDeltaEff", dict, p.size()); - } + { + unloadingDeltaEff_ = scalarField("unloadingDeltaEff", dict, p.size()); + } if (dict.found("currentGI")) - { - currentGI_ = scalarField("currentGI", dict, p.size()); - } + { + currentGI_ = scalarField("currentGI", dict, p.size()); + } if (dict.found("currentGII")) - { - currentGII_ = scalarField("currentGII", dict, p.size()); - } + { + currentGII_ = scalarField("currentGII", dict, p.size()); + } if (dict.found("oldGI")) - { - oldGI_ = scalarField("oldGI", dict, p.size()); - } + { + oldGI_ = scalarField("oldGI", dict, p.size()); + } if (dict.found("oldGII")) - { - oldGII_ = scalarField("oldGII", dict, p.size()); - } + { + oldGII_ = scalarField("oldGII", dict, p.size()); + } } @@ -415,14 +415,15 @@ tmp solidCohesiveFvPatchVectorField::crackingAndDamage() const ( new scalarField(size(), 1.0) ); + scalarField& cad = tcrackingAndDamage(); - forAll(tcrackingAndDamage(), facei) - { - if (cracked_[facei]) - { - tcrackingAndDamage()[facei] = 2.0; - } - } + forAll(cad, facei) + { + if (cracked_[facei]) + { + cad[facei] = 2.0; + } + } return tcrackingAndDamage; } @@ -434,11 +435,12 @@ tmp solidCohesiveFvPatchVectorField::GI() const ( new scalarField(size(), 0.0) ); + scalarField& GI = tGI(); - forAll(tGI(), facei) - { - tGI()[facei] = currentGI_[facei]; - } + forAll(GI, facei) + { + GI[facei] = currentGI_[facei]; + } return tGI; } @@ -450,41 +452,44 @@ tmp solidCohesiveFvPatchVectorField::GII() const ( new scalarField(size(), 0.0) ); + scalarField& GII = tGII(); - forAll(tGII(), facei) - { - tGII()[facei] = currentGII_[facei]; - } + forAll(GII, facei) + { + GII[facei] = currentGII_[facei]; + } return tGII; } + bool solidCohesiveFvPatchVectorField::cracking() { - const fvMesh& mesh = patch().boundaryMesh().mesh(); - const crackerFvMesh& crackerMesh = refCast(mesh); + const fvMesh& mesh = patch().boundaryMesh().mesh(); + const crackerFvMesh& crackerMesh = refCast(mesh); - // global fields - Field globalCracked = - crackerMesh.globalCrackField(cracked_); + // global fields + Field globalCracked = + crackerMesh.globalCrackField(cracked_); - label sumDamaged = 0; - label sumCracked = 0; - forAll(globalCracked, facei) - { - if (globalCracked[facei] > 0.0) - { - sumCracked++; - } - else - { - sumDamaged++; - } - } - Info << "\t\tThere are " << sumDamaged << " damaged faces" << endl; - Info << "\t\tThere are " << sumCracked << " cracked faces" << endl; + label sumDamaged = 0; + label sumCracked = 0; - return false; + forAll(globalCracked, facei) + { + if (globalCracked[facei] > 0.0) + { + sumCracked++; + } + else + { + sumDamaged++; + } + } + Info<< "\t\tThere are " << sumDamaged << " damaged faces" << nl + << "\t\tThere are " << sumCracked << " cracked faces" << endl; + + return false; } @@ -534,84 +539,13 @@ void solidCohesiveFvPatchVectorField::autoMap // the traction_ field after mapping and call updateCoeffs. // For here, we will just set traction to zero. - if ( (patch().size()==1) && (nNewFaces == 1) ) + if ( (patch().size() == 1) && (nNewFaces == 1) ) { label i=0; this->valueFraction()[i] = symmTensor::zero; - traction_[i] = vector::zero; - cracked_[i] = false; - curTractionN_[i] = 0.0; - oldTractionN_[i] = 0.0; - curTractionS_[i] = 0.0; - oldTractionS_[i] = 0.0; - deltaN_[i] = 0.0; - oldDeltaN_[i] = 0.0; - deltaS_[i] = 0.0; - oldDeltaS_[i] = 0.0; - curDeltaN_[i] = 0.0; - curDeltaS_[i] = 0.0; - unloadingDeltaEff_[i] = 0.0; - currentGI_[i] = 0.0; - oldGI_[i] = 0.0; - currentGII_[i] = 0.0; - oldGII_[i] = 0.0; - } - else if ( (patch().size()==2) && (nNewFaces == 1) ) - { - label i=1; - this->valueFraction()[i] = symmTensor::zero; + traction_[i] = vector::zero; cracked_[i] = false; - curTractionN_[i] = 0.0; - oldTractionN_[i] = 0.0; - curTractionS_[i] = 0.0; - oldTractionS_[i] = 0.0; - deltaN_[i] = 0.0; - oldDeltaN_[i] = 0.0; - deltaS_[i] = 0.0; - oldDeltaS_[i] = 0.0; - curDeltaN_[i] = 0.0; - curDeltaS_[i] = 0.0; - unloadingDeltaEff_[i] = 0.0; - currentGI_[i] = 0.0; - oldGI_[i] = 0.0; - currentGII_[i] = 0.0; - oldGII_[i] = 0.0; - } - else if ( (patch().size()==2) && (nNewFaces == 2) ) - { - label i=0; - this->valueFraction()[i] = symmTensor::zero; - traction_[i] = vector::zero; - i=1; - this->valueFraction()[i] = symmTensor::zero; - traction_[i] = vector::zero; - cracked_[i] = false; - curTractionN_[i] = 0.0; - oldTractionN_[i] = 0.0; - curTractionS_[i] = 0.0; - oldTractionS_[i] = 0.0; - deltaN_[i] = 0.0; - oldDeltaN_[i] = 0.0; - deltaS_[i] = 0.0; - oldDeltaS_[i] = 0.0; - curDeltaN_[i] = 0.0; - curDeltaS_[i] = 0.0; - unloadingDeltaEff_[i] = 0.0; - currentGI_[i] = 0.0; - oldGI_[i] = 0.0; - currentGII_[i] = 0.0; - oldGII_[i] = 0.0; - } - else - { - for (label i = 1; i < patch().size(); i++) - { - if (addressing[i] == 0) - { - this->valueFraction()[i] = symmTensor::zero; - traction_[i] = vector::zero; - cracked_[i] = false; curTractionN_[i] = 0.0; oldTractionN_[i] = 0.0; curTractionS_[i] = 0.0; @@ -627,6 +561,81 @@ void solidCohesiveFvPatchVectorField::autoMap oldGI_[i] = 0.0; currentGII_[i] = 0.0; oldGII_[i] = 0.0; + } + else if ( (patch().size() == 2) && (nNewFaces == 1) ) + { + label i=1; + this->valueFraction()[i] = symmTensor::zero; + traction_[i] = vector::zero; + cracked_[i] = false; + + curTractionN_[i] = 0.0; + oldTractionN_[i] = 0.0; + curTractionS_[i] = 0.0; + oldTractionS_[i] = 0.0; + deltaN_[i] = 0.0; + oldDeltaN_[i] = 0.0; + deltaS_[i] = 0.0; + oldDeltaS_[i] = 0.0; + curDeltaN_[i] = 0.0; + curDeltaS_[i] = 0.0; + unloadingDeltaEff_[i] = 0.0; + currentGI_[i] = 0.0; + oldGI_[i] = 0.0; + currentGII_[i] = 0.0; + oldGII_[i] = 0.0; + } + else if ( (patch().size()==2) && (nNewFaces == 2) ) + { + label i=0; + this->valueFraction()[i] = symmTensor::zero; + traction_[i] = vector::zero; + i=1; + this->valueFraction()[i] = symmTensor::zero; + traction_[i] = vector::zero; + + cracked_[i] = false; + curTractionN_[i] = 0.0; + oldTractionN_[i] = 0.0; + curTractionS_[i] = 0.0; + oldTractionS_[i] = 0.0; + deltaN_[i] = 0.0; + oldDeltaN_[i] = 0.0; + deltaS_[i] = 0.0; + oldDeltaS_[i] = 0.0; + curDeltaN_[i] = 0.0; + curDeltaS_[i] = 0.0; + unloadingDeltaEff_[i] = 0.0; + currentGI_[i] = 0.0; + oldGI_[i] = 0.0; + currentGII_[i] = 0.0; + oldGII_[i] = 0.0; + } + else + { + for (label i = 1; i < patch().size(); i++) + { + if (addressing[i] == 0) + { + this->valueFraction()[i] = symmTensor::zero; + traction_[i] = vector::zero; + + cracked_[i] = false; + curTractionN_[i] = 0.0; + oldTractionN_[i] = 0.0; + curTractionS_[i] = 0.0; + oldTractionS_[i] = 0.0; + deltaN_[i] = 0.0; + oldDeltaN_[i] = 0.0; + deltaS_[i] = 0.0; + oldDeltaS_[i] = 0.0; + curDeltaN_[i] = 0.0; + curDeltaS_[i] = 0.0; + unloadingDeltaEff_[i] = 0.0; + currentGI_[i] = 0.0; + oldGI_[i] = 0.0; + currentGII_[i] = 0.0; + oldGII_[i] = 0.0; } } } @@ -640,10 +649,10 @@ void solidCohesiveFvPatchVectorField::rmap const labelList& addr ) { - directionMixedFvPatchVectorField::rmap(ptf, addr); + directionMixedFvPatchVectorField::rmap(ptf, addr); - const solidCohesiveFvPatchVectorField& dmptf = - refCast(ptf); + const solidCohesiveFvPatchVectorField& dmptf = + refCast(ptf); relaxationFactor_ = dmptf.relaxationFactor_; traction_.rmap(dmptf.traction_, addr); @@ -681,7 +690,8 @@ void solidCohesiveFvPatchVectorField::updateCoeffs() this->db().objectRegistry::lookupObject ( "rheologyProperties" - ); + ); + label patchID = patch().index(); const scalarField sigmaMax = rheology.cohLaw().sigmaMax()().boundaryField()[patchID]; @@ -695,32 +705,35 @@ void solidCohesiveFvPatchVectorField::updateCoeffs() // update old values if (curTimeIndex_ != this->db().time().timeIndex()) { - // we force the penalty factor to be calculated here for the first time - // as all processors must call this at the same time - if (contact_ && patch().size() > 0) - { - // force calculation of penalty factor here - penaltyFactor(); - } + // we force the penalty factor to be calculated here for the first time + // as all processors must call this at the same time + if (contact_ && patch().size() > 0) + { + // force calculation of penalty factor here + penaltyFactor(); + } - oldDeltaN_ = deltaN_; - oldDeltaS_ = deltaS_; - // curDelta is always latest delta - // whereas delta is only latest when explicitDist is false - //oldDeltaN_ = curDeltaN_; - //oldDeltaS_ = curDeltaS_; - oldTractionN_ = curTractionN_; - oldTractionS_ = curTractionS_; - oldGI_ = currentGI_; - oldGII_ = currentGII_; - unloadingDeltaEff_ = - max - ( - unloadingDeltaEff_, - Foam::sqrt(max(deltaN_, 0.0)*max(deltaN_, 0.0) + deltaS_*deltaS_) - ); + oldDeltaN_ = deltaN_; + oldDeltaS_ = deltaS_; + // curDelta is always latest delta + // whereas delta is only latest when explicitDist is false + //oldDeltaN_ = curDeltaN_; + //oldDeltaS_ = curDeltaS_; + oldTractionN_ = curTractionN_; + oldTractionS_ = curTractionS_; + oldGI_ = currentGI_; + oldGII_ = currentGII_; + unloadingDeltaEff_ = + max + ( + unloadingDeltaEff_, + Foam::sqrt + ( + max(deltaN_, 0.0)*max(deltaN_, 0.0) + deltaS_*deltaS_ + ) + ); - curTimeIndex_ = this->db().time().timeIndex(); + curTimeIndex_ = this->db().time().timeIndex(); } @@ -741,40 +754,40 @@ void solidCohesiveFvPatchVectorField::updateCoeffs() // global patch material field is needed for multimaterial cohesive laws if (updateGlobalPatchMaterials_) - { - updateGlobalPatchMaterials_ = false; + { + updateGlobalPatchMaterials_ = false; - if (mesh.objectRegistry::foundObject("materials")) - { - scalarField localPatchMaterials = - patch().lookupPatchField - ("materials").patchInternalField(); - scalarField newGlobalPatchMaterials = - crackerMesh.globalCrackField(localPatchMaterials); + if (mesh.objectRegistry::foundObject("materials")) + { + scalarField localPatchMaterials = + patch().lookupPatchField + ("materials").patchInternalField(); + scalarField newGlobalPatchMaterials = + crackerMesh.globalCrackField(localPatchMaterials); - globalPatchMaterials_.setSize(newGlobalPatchMaterials.size()); - globalPatchMaterials_ = newGlobalPatchMaterials; - } - } + globalPatchMaterials_.setSize(newGlobalPatchMaterials.size()); + globalPatchMaterials_ = newGlobalPatchMaterials; + } + } const regionSplit& regions = crackerMesh.regions(); labelField faceCellRegion(size(), -1); + forAll(faceCellRegion, faceI) { faceCellRegion[faceI] = regions[faceCells[faceI]]; } + labelField globalFaceCellRegion = crackerMesh.globalCrackField(faceCellRegion); - // Patch displacement vectorField UPatch = *this; if (fieldName_ == "DU") - { - UPatch += - patch().lookupPatchField("U"); - } + { + UPatch += patch().lookupPatchField("U"); + } // Global displacement vectorField globalUPatch = crackerMesh.globalCrackField(UPatch); @@ -796,285 +809,304 @@ void solidCohesiveFvPatchVectorField::updateCoeffs() //globalIndex = crackerMesh.localCrackStart(); for (label i = 0; i < patch().size(); i++) - { - // update deltas - curDeltaN_[i] = n[i] & delta[i]; - curDeltaS_[i] = mag( (I - sqr(n[i])) & delta[i]); // shearing - if (explicitSeparationDistance_) - { - deltaN_[i] = oldDeltaN_[i]; - deltaS_[i] = oldDeltaS_[i]; - - if (mag(deltaN_[i]) < SMALL) - { - deltaN_[i] = 2*SMALL; - } - FatalError - << "explicitSeparationDistance_ is true!" << abort(FatalError); - } - else - { - // relax - deltaN_[i] = - relaxationFactor_*curDeltaN_[i] - + (1.0 - relaxationFactor_)*deltaN_[i]; - deltaS_[i] = - relaxationFactor_*curDeltaS_[i] - + (1.0 - relaxationFactor_)*deltaS_[i]; - } - - // update tractions - curTractionN_[i] = n[i] & traction_[i]; - curTractionS_[i] = mag( (I-sqr(n[i])) & traction_[i] ); - - // effective delta - only positive deltaN is considered - const scalar deltaEff = - ::sqrt(max(deltaN_[i], 0.0)*max(deltaN_[i], 0.0) - + deltaS_[i]*deltaS_[i]); - - // update energies - // stop calculating after cracking for convergence - // because crack might jump in and out of damaged/failed - // only update energies if there is loading - if ( !cracked_[i] && (deltaEff > (unloadingDeltaEff_[i]-SMALL)) ) { - // if the average normal stress is tensile - if ((curTractionN_[i]+oldTractionN_[i]) > 0.0) + // update deltas + curDeltaN_[i] = n[i] & delta[i]; + curDeltaS_[i] = mag( (I - sqr(n[i])) & delta[i]); // shearing + if (explicitSeparationDistance_) { - // trapezoidal rule - currentGI_[i] = - oldGI_[i] - + ((0.5*(curTractionN_[i]+oldTractionN_[i])) - *(deltaN_[i]-oldDeltaN_[i])); + deltaN_[i] = oldDeltaN_[i]; + deltaS_[i] = oldDeltaS_[i]; + + if (mag(deltaN_[i]) < SMALL) + { + deltaN_[i] = 2*SMALL; + } + FatalError + << "explicitSeparationDistance_ is true!" << abort(FatalError); } else { - // no modeI energy lost if in compression - currentGI_[i] = oldGI_[i]; + // relax + deltaN_[i] = + relaxationFactor_*curDeltaN_[i] + + (1.0 - relaxationFactor_)*deltaN_[i]; + + deltaS_[i] = + relaxationFactor_*curDeltaS_[i] + + (1.0 - relaxationFactor_)*deltaS_[i]; } - // mode II - trapezoidal rule - currentGII_[i] = - oldGII_[i] - + ((0.5*(curTractionS_[i]+oldTractionS_[i])) - *(deltaS_[i]-oldDeltaS_[i])); - } - //scalar currentG = currentGI_[i] + currentGII_[i]; - // if - // ( - // ( globalFaceCellRegion[globalIndex] - // == globalFaceCellRegion[gcfa[globalIndex]] ) - // || - // !cracked_[i] - // ) + // update tractions + curTractionN_[i] = n[i] & traction_[i]; + curTractionS_[i] = mag( (I-sqr(n[i])) & traction_[i] ); - // new tractions to be calculated - scalar curNormalTraction = 0; - vector curTangentialTraction = vector::zero; + // effective delta - only positive deltaN is considered + const scalar deltaEff = + Foam::sqrt(max(deltaN_[i], 0.0)*max(deltaN_[i], 0.0) + + deltaS_[i]*deltaS_[i]); - // loading - // if the effective delta is greater than unloadingDeltaEff then - // there is loading - // unloadingDeltaEff is the maximum previsouly reached deltaEff - if (deltaEff > (unloadingDeltaEff_[i]-SMALL) ) - { - // at the moment loading and unloading are the same - // if total energy is dissipated, then fully crack face - //if ( currentG > GIc[i] || cracked_[i] ) //Gc ) - // propagation - if ( ((currentGI_[i]/GIc[i]) + (currentGII_[i]/GIIc[i])) >= 1 ) - { - //Pout << "GIc[i] is " << GIc[i] << ", curG is " << currentG << endl; - if (!cracked_[i]) Pout << "Face " << i << " is fully cracked" << endl; + // update energies + // stop calculating after cracking for convergence + // because crack might jump in and out of damaged/failed + // only update energies if there is loading + if ( !cracked_[i] && (deltaEff > (unloadingDeltaEff_[i]-SMALL)) ) + { + // if the average normal stress is tensile + if ((curTractionN_[i]+oldTractionN_[i]) > 0.0) + { + // trapezoidal rule + currentGI_[i] = + oldGI_[i] + + ((0.5*(curTractionN_[i]+oldTractionN_[i]))* + (deltaN_[i]-oldDeltaN_[i])); + } + else + { + // no modeI energy lost if in compression + currentGI_[i] = oldGI_[i]; + } - cracked_[i] = true; + // mode II - trapezoidal rule + currentGII_[i] = oldGII_[i] + + ((0.5*(curTractionS_[i]+oldTractionS_[i]))* + (deltaS_[i]-oldDeltaS_[i])); + } + //scalar currentG = currentGI_[i] + currentGII_[i]; + + // if + // ( + // ( globalFaceCellRegion[globalIndex] + // == globalFaceCellRegion[gcfa[globalIndex]] ) + // || + // !cracked_[i] + // ) + + // new tractions to be calculated + scalar curNormalTraction = 0; + vector curTangentialTraction = vector::zero; + + // loading + // if the effective delta is greater than unloadingDeltaEff then + // there is loading + // unloadingDeltaEff is the maximum previsouly reached deltaEff + if (deltaEff > (unloadingDeltaEff_[i]-SMALL) ) + { + // at the moment loading and unloading are the same + // if total energy is dissipated, then fully crack face + //if ( currentG > GIc[i] || cracked_[i] ) //Gc ) + // propagation + if ( ((currentGI_[i]/GIc[i]) + (currentGII_[i]/GIIc[i])) >= 1 ) + { + //Pout << "GIc[i] is " << GIc[i] << ", curG is " << currentG << endl; + if (!cracked_[i]) + { + Pout << "Face " << i << " is fully cracked" << endl; + } + + cracked_[i] = true; - // failed faces might come in to contact so we need to deal with them - // here we could use the face delta values but that assumes that the - // opposing crack faces are aligned direclty opposite one another, which - // in general they are not. So we actually need to calculate the actual - // face penetration distances and then a standard penalty approach - // contact is probably fine. We will use simple assumption for now which - // is fine is the relative displacement - // of the opposing faces is not too large - // To-do: we must calculate actual distances - curNormalTraction = 0.0; - curTangentialTraction = vector::zero; - if ( contact_ && deltaN_[i] <= 0.0 ) - { - curNormalTraction = deltaN_[i]*penaltyFactor(); - //Info << "penaltyFactor() is " << penaltyFactor() << endl; + // failed faces might come in to contact so we need to deal with them + // here we could use the face delta values but that assumes that the + // opposing crack faces are aligned direclty opposite one another, which + // in general they are not. So we actually need to calculate the actual + // face penetration distances and then a standard penalty approach + // contact is probably fine. We will use simple assumption for now which + // is fine is the relative displacement + // of the opposing faces is not too large + // To-do: we must calculate actual distances + curNormalTraction = 0.0; + curTangentialTraction = vector::zero; + if ( contact_ && deltaN_[i] <= 0.0 ) + { + curNormalTraction = deltaN_[i]*penaltyFactor(); + //Info << "penaltyFactor() is " << penaltyFactor() << endl; - // friction - vector sDir = (I - sqr(n[i]))&delta[i]; - sDir /= mag(sDir+vector(SMALL,SMALL,SMALL)); - scalar slip = mag(deltaS_[gcfa[i]] - deltaS_[i]); - scalar fricMag = - min + // friction + vector sDir = (I - sqr(n[i]))&delta[i]; + sDir /= mag(sDir+vector(SMALL,SMALL,SMALL)); + scalar slip = mag(deltaS_[gcfa[i]] - deltaS_[i]); + scalar fricMag = + min + ( + slip*penaltyFactor(), + frictionCoeff_*curNormalTraction // stick/slip + ); + curTangentialTraction = fricMag*sDir; + } + + // relax tractions + curNormalTraction = + relaxationFactor_*curNormalTraction + + (1-relaxationFactor_)*(n[i] & traction_[i]); + + curTangentialTraction = + relaxationFactor_*curTangentialTraction + + (1-relaxationFactor_)*( (I -sqr(n[i])) & traction_[i]); + + traction_[i] = curNormalTraction*n[i] + curTangentialTraction; + } + // damging face with positive normal delta + else if ( deltaN_[i] > 0.0 ) + { + if (cracked_[i]) + { + Pout << "Face " << i << " is un-cracked" << endl; + } + + cracked_[i] = false; + + // set traction in a fixed point iteration manner to force + // (tN/sigmaMax)^2 + (tS/tauMax)^2 = 1 + // while also allowing varying mode mix by assuming colinear traction + // and delta + // Dugdale version + // scalar tN = + // sigmaMax[i] * deltaN_[i] / + // (SMALL + ::sqrt( (deltaN_[i]*deltaN_[i]) + // + (deltaS_[i]*deltaS_[i])*(sigmaMax[i]*sigmaMax[i] + // /(tauMax[i]*tauMax[i])) )); + // scalar tS = + // tauMax[i] * deltaS_[i] / + // (SMALL + ::sqrt( (deltaS_[i]*deltaS_[i]) + // + (deltaN_[i]*deltaN_[i])*(tauMax[i]*tauMax[i] + // /(sigmaMax[i]*sigmaMax[i])) )); + + // Given current deltaN and deltaS, the cohesive law + // (Dugdale, linear, etc)gives back current traction: + scalar tN = n[i] & traction_[i]; + scalar tS = mag( (I - sqr(n[i])) & traction_[i] ); + // Update tN and tS + rheology.cohLaw().damageTractions ( - slip*penaltyFactor(), - frictionCoeff_*curNormalTraction // stick/slip - ); - curTangentialTraction = fricMag*sDir; - } - - // relax tractions - curNormalTraction = - relaxationFactor_*curNormalTraction - + (1-relaxationFactor_)*(n[i] & traction_[i]); - curTangentialTraction = - relaxationFactor_*curTangentialTraction - + (1-relaxationFactor_)*( (I -sqr(n[i])) & traction_[i]); - traction_[i] = curNormalTraction*n[i] + curTangentialTraction; - } - - // damging face with positive normal delta - else if ( deltaN_[i] > 0.0 ) - { - if (cracked_[i]) Pout << "Face " << i << " is un-cracked" << endl; - - cracked_[i] = false; - - // set traction in a fixed point iteration manner to force - // (tN/sigmaMax)^2 + (tS/tauMax)^2 = 1 - // while also allowing varying mode mix by assuming colinear traction - // and delta - // Dugdale version - // scalar tN = - // sigmaMax[i] * deltaN_[i] / - // (SMALL + ::sqrt( (deltaN_[i]*deltaN_[i]) - // + (deltaS_[i]*deltaS_[i])*(sigmaMax[i]*sigmaMax[i] - // /(tauMax[i]*tauMax[i])) )); - // scalar tS = - // tauMax[i] * deltaS_[i] / - // (SMALL + ::sqrt( (deltaS_[i]*deltaS_[i]) - // + (deltaN_[i]*deltaN_[i])*(tauMax[i]*tauMax[i] - // /(sigmaMax[i]*sigmaMax[i])) )); - - // Given current deltaN and deltaS, the cohesive law - // (Dugdale, linear, etc)gives back current traction: - scalar tN = n[i] & traction_[i]; - scalar tS = mag( (I - sqr(n[i])) & traction_[i] ); - // Update tN and tS - rheology.cohLaw().damageTractions - ( - tN, - tS, - deltaN_[i], - deltaS_[i], - currentGI_[i], - currentGII_[i], - i, - globalPatchMaterials_ + tN, + tS, + deltaN_[i], + deltaS_[i], + currentGI_[i], + currentGII_[i], + i, + globalPatchMaterials_ ); - // shear delta direction - vector sDir = (I - sqr(n[i]))&delta[i]; - sDir /= mag(sDir+vector(SMALL,SMALL,SMALL)); + // shear delta direction + vector sDir = (I - sqr(n[i]))&delta[i]; + sDir /= mag(sDir+vector(SMALL,SMALL,SMALL)); - // relax tractions - curNormalTraction = - relaxationFactor_*tN - + (1-relaxationFactor_)*(n[i] & traction_[i]); - curTangentialTraction = - relaxationFactor_*(tS*sDir) - + (1-relaxationFactor_)*( (I -sqr(n[i])) & traction_[i]); - traction_[i] = curNormalTraction*n[i] + curTangentialTraction; - } + // relax tractions + curNormalTraction = + relaxationFactor_*tN + + (1-relaxationFactor_)*(n[i] & traction_[i]); - // damaging faces with negative normal delta + curTangentialTraction = + relaxationFactor_*(tS*sDir) + + (1-relaxationFactor_)*( (I -sqr(n[i])) & traction_[i]); + + traction_[i] = curNormalTraction*n[i] + curTangentialTraction; + } + // damaging faces with negative normal delta + else + { + if (cracked_[i]) + { + Pout << "Face " << i << " is un-cracked" << endl; + } + + cracked_[i] = false; + //Pout << "Contact and shearing face " << i << endl; + + //Pout << "Face " << i << " is damaging but in contact" << endl; + // set shear traction from cohesive law + // set normal traction to contact condition + scalar tS = tauMax[i]; + + vector sDir = (I - sqr(n[i])) & delta[i]; + sDir /= mag(sDir+vector(SMALL,SMALL,SMALL)); + + // Simple penalty condition + scalar penaltyFac = 0.0; + if (contact_) + { + penaltyFac = penaltyFactor(); + } + scalar contactTN = deltaN_[i]*penaltyFac; + + // relax tractions + curNormalTraction = + relaxationFactor_*contactTN + + (1-relaxationFactor_)*(n[i] & traction_[i]); + + curTangentialTraction = + relaxationFactor_*(tS*sDir) + + (1-relaxationFactor_)*( (I -sqr(n[i])) & traction_[i]); + + traction_[i] = curNormalTraction*n[i] + curTangentialTraction; + } + } else - { - if (cracked_[i]) Pout << "Face " << i << " is un-cracked" << endl; + { + // unloading + // as the current effective delta is less than the old time + // effective delta - cracked_[i] = false; - //Pout << "Contact and shearing face " << i << endl; + // We have two choice for unloading: + // (a) ductile approach + // unload with initial stiffness (which is infinite) + // similar to ductilve metal stress-strain curve + // as we use infinite intial stiffness, this means to elastic + // energy is recovered + // and we immediately start loading in opposite direction + // (b) brittle approach + // unload straight back to the origin + // this means we recover elastic energy + // + // approach (b) is numerically "nicer"; however, for Dugdale cohesive + // zone this implys that only half the energy is dissipated just before + // failure and then the other half is dissipated at failure. This may + // not be an issue in practive but it does not really make sense. + // Obviously it is fine for a linear cohesive zone as the energy + // is smoothly dissipated up to failure. For now, we will implement + // approach (b), but this requires more thinking... - //Pout << "Face " << i << " is damaging but in contact" << endl; - // set shear traction from cohesive law - // set normal traction to contact condition - scalar tS = tauMax[i]; + // reduce traction linearly with the reduction in delta + scalar scaleFactor = deltaEff/(unloadingDeltaEff_[i]); + traction_[i] = + relaxationFactor_*scaleFactor*traction_[i] + + (1 - relaxationFactor_)*traction_[i]; + } + } - vector sDir = (I - sqr(n[i])) & delta[i]; - sDir /= mag(sDir+vector(SMALL,SMALL,SMALL)); + bool incremental(fieldName_ == "DU"); - // Simple penalty condition - scalar penaltyFac = 0.0; - if (contact_) - { - penaltyFac = penaltyFactor(); - } - scalar contactTN = deltaN_[i]*penaltyFac; - - // relax tractions - curNormalTraction = - relaxationFactor_*contactTN - + (1-relaxationFactor_)*(n[i] & traction_[i]); - curTangentialTraction = - relaxationFactor_*(tS*sDir) - + (1-relaxationFactor_)*( (I -sqr(n[i])) & traction_[i]); - traction_[i] = curNormalTraction*n[i] + curTangentialTraction; - } - } - - else - { - // unloading - // as the current effective delta is less than the old time - // effective delta - - // We have two choice for unloading: - // (a) ductile approach - // unload with initial stiffness (which is infinite) - // similar to ductilve metal stress-strain curve - // as we use infinite intial stiffness, this means to elastic - // energy is recovered - // and we immediately start loading in opposite direction - // (b) brittle approach - // unload straight back to the origin - // this means we recover elastic energy - // - // approach (b) is numerically "nicer"; however, for Dugdale cohesive - // zone this implys that only half the energy is dissipated just before - // failure and then the other half is dissipated at failure. This may - // not be an issue in practive but it does not really make sense. - // Obviously it is fine for a linear cohesive zone as the energy - // is smoothly dissipated up to failure. For now, we will implement - // approach (b), but this requires more thinking... - - // reduce traction linearly with the reduction in delta - scalar scaleFactor = deltaEff/(unloadingDeltaEff_[i]); - traction_[i] = - relaxationFactor_*scaleFactor*traction_[i] - + (1-relaxationFactor_)*traction_[i]; - } - } - - - this->refGrad() = - tractionBoundaryGradient() - ( - traction_, - scalarField(traction_.size(), 0.0), - word(fieldName_), - patch(), - orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + this->refGrad() = tractionBoundaryGradient::snGrad + ( + traction_, + scalarField(traction_.size(), 0.0), + fieldName_, + "U", + patch(), + orthotropic_, + nonLinear_, + incremental + ); directionMixedFvPatchVectorField::updateCoeffs(); } - void solidCohesiveFvPatchVectorField::calcPenaltyFactor() - { + +void solidCohesiveFvPatchVectorField::calcPenaltyFactor() +{ // calculate penalty factor similar to standardPenalty contact model // approx penaltyFactor from mechanical properties // this can then be scaled using the penaltyScale // to-do: write equivalent for orthotropic if (orthotropic_) { - FatalError << "solidCohesiveFvPatchVectorField::calcPenaltyFactor()" + FatalErrorIn + ( + "void solidCohesiveFvPatchVectorField::calcPenaltyFactor()" + ) << "solidCohesiveFvPatchVectorField::calcPenaltyFactor()" << " has yet to be written for orthotropic" << exit(FatalError); } @@ -1083,10 +1115,11 @@ void solidCohesiveFvPatchVectorField::updateCoeffs() const fvMesh& mesh = patch().boundaryMesh().mesh(); const scalarField& mu = - mesh.objectRegistry::lookupObject + mesh.objectRegistry::lookupObject ("mu").boundaryField()[patchID]; + const scalarField& lambda = - mesh.objectRegistry::lookupObject + mesh.objectRegistry::lookupObject ("lambda").boundaryField()[patchID]; // avarage contact patch bulk modulus @@ -1097,13 +1130,16 @@ void solidCohesiveFvPatchVectorField::updateCoeffs() // average contact patch cell volume scalar cellVolume = 0.0; + const volScalarField::DimensionedInternalField & V = mesh.V(); { - const unallocLabelList& faceCells = mesh.boundary()[patchID].faceCells(); - forAll(mesh.boundary()[patchID], facei) - { - cellVolume += V[faceCells[facei]]; - } + const unallocLabelList& faceCells = + mesh.boundary()[patchID].faceCells(); + + forAll(mesh.boundary()[patchID], facei) + { + cellVolume += V[faceCells[facei]]; + } } cellVolume /= patch().size(); @@ -1111,7 +1147,7 @@ void solidCohesiveFvPatchVectorField::updateCoeffs() // we approximate penalty factor for traction instead of force penaltyFactorPtr_ = new scalar(penaltyScale_*bulkModulus*faceArea/cellVolume); - } +} // Write diff --git a/src/solidModels/constitutiveModel/constitutiveModel.H b/src/solidModels/constitutiveModel/constitutiveModel.H index f04969abb..731297324 100644 --- a/src/solidModels/constitutiveModel/constitutiveModel.H +++ b/src/solidModels/constitutiveModel/constitutiveModel.H @@ -81,8 +81,8 @@ class constitutiveModel //- Plane stress Switch planeStress_; - //- Run-time selectable solidInterface method for correct discretisation - // on bi-material interfaces + //- Run-time selectable solidInterface method for correct + // discretisation on bi-material interfaces autoPtr solidInterfacePtr_; // we use IOReferencer to allow lookup of solidInterface object in @@ -137,17 +137,18 @@ public: //- If plasticity is active bool plasticityActive() const { - if (plasticityStressReturnPtr_.valid()) - { - return plasticityStressReturnPtr_->plasticityActive(); - } - return false; + if (plasticityStressReturnPtr_.valid()) + { + return plasticityStressReturnPtr_->plasticityActive(); + } + + return false; } //- If visco effects are active bool viscoActive() const { - return rheologyLawPtr_->viscoActive(); + return rheologyLawPtr_->viscoActive(); } //- Return reference to stress field @@ -241,14 +242,14 @@ public: //- Return reference to solidInterface virtual solidInterface& solInterface() { - return solidInterfacePtr_(); - } + return solidInterfacePtr_(); + } //- Return true if solidInterface is active virtual bool solidInterfaceActive() { - return solidInterfaceActive_; - } + return solidInterfaceActive_; + } //- Update yield stress void updateYieldStress(); diff --git a/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.C b/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.C index d76fdaac8..59a4bf6d7 100644 --- a/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.C +++ b/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.C @@ -36,438 +36,587 @@ Author #include "constitutiveModel.H" #include "thermalModel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ +// * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * * // -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(tractionBoundaryGradient, 0); - - -// * * * * * * * * * * * * * * Member functions * * * * * * * * * * * * * * // - -tmp tractionBoundaryGradient::traction +Foam::tmp Foam::tractionBoundaryGradient::traction ( const tensorField& gradField, - const word fieldName, + const word& workingFieldName, + const word& integralFieldName, const fvPatch& patch, - Switch orthotropic, - word nonLinear -) const + const bool orthotropic, + const nonLinearGeometry::nonLinearType& nonLinear, + const bool incremental +) { - // create tmp + // Create result tmp ttraction ( new vectorField(gradField.size(), vector::zero) ); vectorField& traction = ttraction(); + // Orthotropic material if (orthotropic) { - // for now, turn off orthotropic - FatalError - << "tractionBoundaryGradient::traction is not written for" - << " orthotropic yet" << nl + // For now, turn off orthotropic + FatalErrorIn + ( + "tmp tractionBoundaryGradient::traction\n" + "(\n" + " const tensorField& gradField,\n" + " const word& workingFieldName,\n" + " const word& integralFieldName,\n" + " const fvPatch& patch,\n" + " const bool orthotropic,\n" + " const nonLinearGeometry::nonLinearType& nonLinear\n" + ") const" + ) << "tractionBoundaryGradient::traction is not written for" + << " orthotropic materials yet" << nl << "you are probably trying to use solidContact boundaries " - << "with orthotropic solver" << nl - << "it should be straight-forward but I have not done it yet!" + << "with the orthotropic solver" << nl << exit(FatalError); } else - { - // lookup material properties from the solver - const fvPatchField& mu = - patch.lookupPatchField("mu"); - const fvPatchField& lambda = - patch.lookupPatchField("lambda"); + { + // Lookup material properties from the solver + const fvPatchScalarField& mu = + patch.lookupPatchField("mu"); - // only for nonlinear elastic properties - // if (rheology.type() == plasticityModel::typeName) - // { - // const plasticityModel& plasticity = - // refCast(rheology); + const fvPatchScalarField& lambda = + patch.lookupPatchField("lambda"); - // mu = plasticity.newMu().boundaryField()[patch.index()]; - // lambda = plasticity.newLambda().boundaryField()[patch.index()]; - // } + // only for nonlinear elastic properties + // if (rheology.type() == plasticityModel::typeName) + // { + // const plasticityModel& plasticity = + // refCast(rheology); - // required fields - vectorField n = patch.nf(); + // mu = plasticity.newMu().boundaryField()[patch.index()]; + // lambda = plasticity.newLambda().boundaryField()[patch.index()]; + // } + + // Get patch normal + vectorField n = patch.nf(); + + // Calculate traction + traction = 2*mu*(n & symm(gradField)) + lambda*tr(gradField)*n; + + // Plasticity effects + const constitutiveModel& rheology = + patch.boundaryMesh().mesh().objectRegistry:: + lookupObject("rheologyProperties"); + + if (rheology.plasticityActive()) + { + traction -= + 2*mu*(n & rheology.DEpsilonP().boundaryField()[patch.index()]); + } + + // Thermal effects + if + ( + patch.boundaryMesh().mesh().objectRegistry:: + foundObject("thermalProperties") + ) + { + const thermalModel& thermo = + patch.boundaryMesh().mesh().objectRegistry:: + lookupObject("thermalProperties"); + + const fvPatchScalarField& threeKalpha = + patch.lookupPatchField + ("((threeK*rho)*alpha)"); + + // Incremental thermal contribution + if (incremental) + { + const fvPatchScalarField& DT = + patch.lookupPatchField("DT"); + + traction -= (n*threeKalpha*DT); + } + else + { + const fvPatchScalarField& T = + patch.lookupPatchField("T"); + + const scalarField T0 = + thermo.T0()().boundaryField()[patch.index()]; + + traction -= (n*threeKalpha*(T - T0)); + } + } + + // Non-linear terms + if + ( + nonLinear == nonLinearGeometry::UPDATED_LAGRANGIAN + || nonLinear == nonLinearGeometry::TOTAL_LAGRANGIAN + ) + { + traction += + (n & (mu*(gradField & gradField.T()))) + + 0.5*n*lambda*(gradField && gradField); + + if + ( + incremental + && nonLinear == nonLinearGeometry::TOTAL_LAGRANGIAN + ) + { + // Incremental total Lagrangian + + const fvPatchTensorField& gradU = + patch.lookupPatchField + ( + "grad(" + integralFieldName + ")" + ); + + traction += + ( + n + & ( + mu* + ( + (gradU & gradField.T()) + + (gradField & gradU.T()) + ) + ) + ) + + 0.5*n*lambda*tr + ( + (gradU & gradField.T()) + + (gradField & gradU.T()) + ); + } + } - // calculate traction - traction = 2*mu*(n&symm(gradField)) + lambda*tr(gradField)*n; + // Add old stress for incremental approaches + if (incremental) + { + // add on old traction + const fvPatchSymmTensorField& sigma = + patch.lookupPatchField + ( + "sigma" + ); + traction += (n & sigma); + } - //- if there is plasticity - const constitutiveModel& rheology = - patch.boundaryMesh().mesh().objectRegistry:: - lookupObject("rheologyProperties"); - if (rheology.plasticityActive()) - { - traction -= - 2*mu*(n & rheology.DEpsilonP().boundaryField()[patch.index()]); - } + // Visco-elastic effects + if (rheology.viscoActive()) + { + const fvPatchSymmTensorField& DSigmaCorr = + patch.lookupPatchField + ( + "DSigmaCorr" + ); - //- if there are thermal effects - if (patch.boundaryMesh().mesh().objectRegistry:: - foundObject("thermalProperties")) - { - const thermalModel& thermo = - patch.boundaryMesh().mesh().objectRegistry:: - lookupObject("thermalProperties"); + traction += (n & DSigmaCorr); + } - const fvPatchField& threeKalpha = - patch.lookupPatchField - ("((threeK*rho)*alpha)"); + // Updated Lagrangian or total Lagrangian large strain + if + ( + nonLinear == nonLinearGeometry::UPDATED_LAGRANGIAN + || nonLinear == nonLinearGeometry::TOTAL_LAGRANGIAN + ) + { + tensorField F = I + gradField; - if (fieldName == "DU") - { - const fvPatchField& DT = - patch.lookupPatchField("DT"); + if + ( + incremental + && nonLinear == nonLinearGeometry::TOTAL_LAGRANGIAN + ) + { + // Incremental total Lagrangian - traction -= (n*threeKalpha*DT); - } - else - { - const fvPatchField& T = - patch.lookupPatchField("T"); + const fvPatchTensorField& gradU = + patch.lookupPatchField + ( + "grad(" + integralFieldName + ")" + ); - const scalarField T0 = thermo.T0()().boundaryField()[patch.index()]; + F += gradU; + } - traction -= (n*threeKalpha*(T - T0)); - } - } + tensorField Finv = inv(F); + scalarField J = det(F); - // non linear terms - if (nonLinear == "updatedLagrangian" || nonLinear == "totalLagrangian") - { - traction += - (n & (mu*(gradField & gradField.T()))) - + 0.5*n*lambda*(gradField && gradField); - - if (fieldName == "DU" && nonLinear == "totalLagrangian") - { - // incremental total Lagrangian - const fvPatchField& gradU = - patch.lookupPatchField("grad(U)"); - - traction += - (n & (mu*( (gradU & gradField.T()) + (gradField & gradU.T())))) - + 0.5*n*lambda*tr((gradU & gradField.T()) + (gradField & gradU.T())); - } - } - - - //- add old stress for incremental approaches - if (fieldName == "DU") - { - // add on old traction - const fvPatchField& sigma = - patch.lookupPatchField("sigma"); - traction += (n & sigma); - } - - //- visco-elastic - if (rheology.viscoActive()) - { - const fvPatchField& DSigmaCorr = - patch.lookupPatchField("DSigmaCorr"); - - traction += (n & DSigmaCorr); - } - - //- updated Lagrangian or total Lagrangian large strain - if (nonLinear == "updatedLagrangian" || nonLinear == "totalLagrangian") - { - tensorField F = I + gradField; - if (fieldName == "DU" && nonLinear == "totalLagrangian") - { - const fvPatchField& gradU = - patch.lookupPatchField("grad(U)"); - F += gradU; - } - tensorField Finv = inv(F); - scalarField J = det(F); - - //- rotate second Piola Kirchhoff traction to be Cauchy traction - traction = (traction & F)/(mag(J * Finv & n)); - } - } + // Rotate second Piola Kirchhoff traction to be Cauchy traction + traction = (traction & F)/(mag(J * Finv & n)); + } + } return ttraction; - } +} // * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * // - tmp tractionBoundaryGradient::operator() - ( - const vectorField& traction, - const scalarField& pressure, - const word fieldName, - const fvPatch& patch, - Switch orthotropic, - word nonLinear - ) const - { - // create tmp + +Foam::tmp Foam::tractionBoundaryGradient::snGrad +( + const vectorField& traction, + const scalarField& pressure, + const word& workingFieldName, + const word& integralFieldName, + const fvPatch& patch, + const bool orthotropic, + const nonLinearGeometry::nonLinearType& nonLinear, + const bool incremental +) +{ + // Create result tmp tgradient(new vectorField(traction.size(), vector::zero)); vectorField& gradient = tgradient(); - // lookup switches - - // orthotropic solvers + // Orthotropic material if (orthotropic) - { - // mechanical properties - const constitutiveModel& rheology = - patch.boundaryMesh().mesh().objectRegistry:: - lookupObject("rheologyProperties"); - const diagTensorField K = rheology.K()().boundaryField()[patch.index()]; - const symmTensor4thOrderField C = - rheology.C()().boundaryField()[patch.index()]; + { + // Get mechanical properties + const constitutiveModel& rheology = + patch.boundaryMesh().mesh().objectRegistry:: + lookupObject("rheologyProperties"); - // required fields - vectorField n = patch.nf(); - const diagTensorField Kinv = inv(K); - const fvPatchField& gradField = - patch.lookupPatchField("grad(" + fieldName + ")"); + const diagTensorField K = + rheology.K()().boundaryField()[patch.index()]; + const symmTensor4thOrderField C = + rheology.C()().boundaryField()[patch.index()]; - // calculate the traction to apply - vectorField Traction(n.size(), vector::zero); - tensorField sigmaExp(n.size(), tensor::zero); + // Required fields + vectorField n = patch.nf(); + const diagTensorField Kinv = inv(K); + const fvPatchTensorField& gradField = + patch.lookupPatchField + ( + "grad(" + workingFieldName + ")" + ); - //- total Lagrangian small strain - if (fieldName == "U" && nonLinear == "off") - { - //- total traction - Traction = (traction - n*pressure); + // Calculate the traction to apply + vectorField Traction(n.size(), vector::zero); + tensorField sigmaExp(n.size(), tensor::zero); - sigmaExp = (n*(n&(C && symm(gradField)))) - (K & gradField); - } - //- incremental total Lagrangian small strain - else if (fieldName == "DU" && nonLinear == "off") - { - const fvPatchField& sigma = - patch.lookupPatchField("sigma"); + // Total Lagrangian, small strain + if + ( + !incremental + && nonLinear == nonLinearGeometry::OFF + ) + { + // Use total traction + Traction = (traction - n*pressure); - //- increment of traction - Traction = (traction - n*pressure) - (n & sigma); + sigmaExp = (n*(n&(C && symm(gradField)))) - (K & gradField); + } + // Incremental total Lagrangian small strain + else if + ( + incremental + && nonLinear == nonLinearGeometry::OFF + ) + { + const fvPatchSymmTensorField& sigma = + patch.lookupPatchField + ( + "sigma" + ); - sigmaExp = (n*(n&(C && symm(gradField)))) - (K & gradField); - } - //- updated Lagrangian large strain - else if (nonLinear == "updatedLagrangian") - { - const fvPatchField& sigma = - patch.lookupPatchField("sigma"); + // Increment of traction + Traction = (traction - n*pressure) - (n & sigma); - tensorField F = I + gradField; - tensorField Finv = inv(F); - scalarField J = det(F); - vectorField nCurrent = Finv & n; - nCurrent /= mag(nCurrent); - vectorField tractionCauchy = traction - nCurrent*pressure; + sigmaExp = (n*(n&(C && symm(gradField)))) - (K & gradField); + } + // Updated Lagrangian large strain + else if + ( + nonLinear == nonLinearGeometry::UPDATED_LAGRANGIAN + ) + { + const fvPatchSymmTensorField& sigma = + patch.lookupPatchField + ( + "sigma" + ); - //- increment of 2nd Piola-Kirchhoff traction - Traction = (mag(J * Finv & n) * tractionCauchy & Finv) - (n & sigma); + tensorField F = I + gradField; + tensorField Finv = inv(F); + scalarField J = det(F); + vectorField nCurrent = Finv & n; + nCurrent /= mag(nCurrent) + SMALL; + vectorField tractionCauchy = traction - nCurrent*pressure; - sigmaExp = (n*(n&(C && symm(gradField)))) - (K & gradField); - } - else - { - FatalError - << "solidTractionOrtho boundary condition not suitable for " - << " field " << fieldName << " and " << nonLinear - << abort(FatalError); - } + // Increment of 2nd Piola-Kirchhoff traction + Traction = mag(J*(Finv & n))*(tractionCauchy & Finv) - (n & sigma); - gradient = - n & - ( - Kinv & ( n*(Traction) - sigmaExp ) - ); - } - - // standard isotropic solvers - else - { - // lookup material properties from the solver - const fvPatchField& mu = - patch.lookupPatchField("mu"); - const fvPatchField& lambda = - patch.lookupPatchField("lambda"); - - // only for nonlinear elastic properties - // if (rheology.type() == plasticityModel::typeName) - // { - // const plasticityModel& plasticity = - // refCast(rheology); - - // mu = plasticity.newMu().boundaryField()[patch.index()]; - // lambda = plasticity.newLambda().boundaryField()[patch.index()]; - // } - - - // required fields - vectorField n = patch.nf(); - - // gradient of the field - const fvPatchField& gradField = - patch.lookupPatchField("grad(" + fieldName + ")"); - - - //---------------------------// - //- calculate the actual traction to apply - //---------------------------// - vectorField Traction(n.size(),vector::zero); - - //- total Lagrangian small strain - if (fieldName == "U" && nonLinear == "off") - { - //- total traction - Traction = (traction - n*pressure); - } - //- incremental total Lagrangian small strain - else if (fieldName == "DU" && nonLinear == "off") - { - const fvPatchField& sigma = - patch.lookupPatchField("sigma"); - - //- increment of traction - Traction = (traction - n*pressure) - (n & sigma); - } - //- updated Lagrangian or total Lagrangian large strain - else if (nonLinear == "updatedLagrangian" || nonLinear == "totalLagrangian") - { - const fvPatchField& sigma = - patch.lookupPatchField("sigma"); - - tensorField F = I + gradField; - if (fieldName == "DU" && nonLinear == "totalLagrangian") // for incr TL - { - const fvPatchField& gradU = - patch.lookupPatchField("grad(U)"); - F += gradU; - } - tensorField Finv = hinv(F); - scalarField J = det(F); - vectorField nCurrent = Finv & n; - nCurrent /= mag(nCurrent); - vectorField tractionCauchy = traction - nCurrent*pressure; - - Traction = (mag(J * Finv & n) * tractionCauchy & Finv); - - if (fieldName == "DU") - { - //- increment of 2nd Piola-Kirchhoff traction - Traction -= (n & sigma); - } - } - else - { - FatalError - << "Field " << fieldName << " and " << nonLinear - << " nonLinear are not compatible!" - << exit(FatalError); - } - - //- visco-elastic - const constitutiveModel& rheology = - patch.boundaryMesh().mesh().objectRegistry:: - lookupObject("rheologyProperties"); - if (rheology.viscoActive()) - { - //Info << "visco active" << endl; - const fvPatchField& DSigmaCorr = - patch.lookupPatchField("DSigmaCorr"); - - Traction -= (n & DSigmaCorr); - } - - //---------------------------// - //- calculate the normal gradient based on the traction - //---------------------------// - gradient = - Traction - - (n & (mu*gradField.T() - (mu + lambda)*gradField)) - - n*lambda*tr(gradField); - - //- if there is plasticity - if (rheology.plasticityActive()) - { - //Info << "plasticity is active" << endl; - gradient += - 2*mu*(n & rheology.DEpsilonP().boundaryField()[patch.index()]); - } - - //- if there are thermal effects - if (patch.boundaryMesh().mesh().objectRegistry:: - foundObject("thermalProperties")) - { - const thermalModel& thermo = - patch.boundaryMesh().mesh().objectRegistry:: - lookupObject("thermalProperties"); - - const fvPatchField& threeKalpha = - patch.lookupPatchField - ("((threeK*rho)*alpha)"); - - if (fieldName == "DU") - { - const fvPatchField& DT = - patch.lookupPatchField("DT"); - - gradient += (n*threeKalpha*DT); - } + sigmaExp = n*(n &(C && symm(gradField))) - (K & gradField); + } else - { - const fvPatchField& T = - patch.lookupPatchField("T"); + { + FatalErrorIn + ( + "tmp tractionBoundaryGradient::snGrad\n" + "(\n" + " const vectorField& traction,\n" + " const scalarField& pressure,\n" + " const word& workingFieldName,\n" + " const word& integralFieldName,\n" + " const fvPatch& patch,\n" + " const bool orthotropic,\n" + " const nonLinearGeometry::nonLinearType& nonLinear,\n" + " const bool incremental\n" + ") const" + ) << "solidTractionOrtho boundary condition not suitable for " + << " field " << workingFieldName << " and " + << nonLinearGeometry::nonLinearNames_[nonLinear] + << abort(FatalError); + } - const scalarField T0 = thermo.T0()().boundaryField()[patch.index()]; + gradient = n & (Kinv & ( n*(Traction) - sigmaExp )); + } + else + { + // Standard isotropic solvers - gradient += (n*threeKalpha*(T - T0)); - } + // Lookup material properties from the solver + const fvPatchScalarField& mu = + patch.lookupPatchField("mu"); + + const fvPatchScalarField& lambda = + patch.lookupPatchField("lambda"); + + // only for nonlinear elastic properties + // if (rheology.type() == plasticityModel::typeName) + // { + // const plasticityModel& plasticity = + // refCast(rheology); + + // mu = plasticity.newMu().boundaryField()[patch.index()]; + // lambda = plasticity.newLambda().boundaryField()[patch.index()]; + // } + + vectorField n = patch.nf(); + + // gradient of the field + const fvPatchTensorField& gradField = + patch.lookupPatchField + ( + "grad(" + workingFieldName + ")" + ); + + + vectorField Traction(n.size(), vector::zero); + + // Total Lagrangian, small strain + if + ( + !incremental + && nonLinear == nonLinearGeometry::OFF + ) + { + // Use total traction + Traction = (traction - n*pressure); + } + // Incremental total Lagrangian small strain + else if + ( + incremental + && nonLinear == nonLinearGeometry::OFF + ) + { + const fvPatchSymmTensorField& sigma = + patch.lookupPatchField + ( + "sigma" + ); + + // Increment of traction + Traction = (traction - n*pressure) - (n & sigma); + } + else if + ( + nonLinear == nonLinearGeometry::UPDATED_LAGRANGIAN + || nonLinear == nonLinearGeometry::TOTAL_LAGRANGIAN + ) + { + const fvPatchSymmTensorField& sigma = + patch.lookupPatchField + ( + "sigma" + ); + + tensorField F = I + gradField; + + if + ( + incremental + && nonLinear == nonLinearGeometry::TOTAL_LAGRANGIAN + ) + { + // Incremental total Lagrangian + + const fvPatchTensorField& gradU = + patch.lookupPatchField + ( + "grad(" + integralFieldName + ")" + ); + + F += gradU; + } + + tensorField Finv = hinv(F); + scalarField J = det(F); + vectorField nCurrent = Finv & n; + nCurrent /= mag(nCurrent) + SMALL; + vectorField tractionCauchy = traction - nCurrent*pressure; + + Traction = mag(J*(Finv & n))*(tractionCauchy & Finv); + + if (incremental) + { + // Increment of 2nd Piola-Kirchhoff traction + Traction -= (n & sigma); + } + } + else + { + FatalErrorIn + ( + "tmp tractionBoundaryGradient::snGrad\n" + "(\n" + " const vectorField& traction,\n" + " const scalarField& pressure,\n" + " const word& workingFieldName,\n" + " const word& integralFieldName,\n" + " const fvPatch& patch,\n" + " const bool orthotropic,\n" + " const nonLinearGeometry::nonLinearType& nonLinear,\n" + " const bool incremental\n" + ") const" + ) << " field " << workingFieldName << " and " + << nonLinearGeometry::nonLinearNames_[nonLinear] + << " nonLinear are not compatible!" + << abort(FatalError); } - //- higher order non-linear terms - if (nonLinear == "updatedLagrangian" || nonLinear == "totalLagrangian") - { - // no extra relaxation - gradient -= - (n & (mu*(gradField & gradField.T()))) - // + 0.5*n*lambda*(gradField && gradField); + //- visco-elastic + const constitutiveModel& rheology = + patch.boundaryMesh().mesh().objectRegistry:: + lookupObject("rheologyProperties"); + + if (rheology.viscoActive()) + { + const fvPatchSymmTensorField& DSigmaCorr = + patch.lookupPatchField + ( + "DSigmaCorr" + ); + + Traction -= (n & DSigmaCorr); + } + + // Calculate the normal gradient based on the traction + + gradient = + Traction + - (n & (mu*gradField.T() - (mu + lambda)*gradField)) + - n*lambda*tr(gradField); + + //- Plasticity contribution + if (rheology.plasticityActive()) + { + gradient += + 2*mu*(n & rheology.DEpsilonP().boundaryField()[patch.index()]); + } + + // Thermal effects + if + ( + patch.boundaryMesh().mesh().objectRegistry:: + foundObject("thermalProperties") + ) + { + const thermalModel& thermo = + patch.boundaryMesh().mesh().objectRegistry:: + lookupObject("thermalProperties"); + + const fvPatchScalarField& threeKalpha = + patch.lookupPatchField + ( + "((threeK*rho)*alpha)" + ); + + if (!incremental) + { + const fvPatchScalarField& DT = + patch.lookupPatchField("DT"); + + gradient += n*threeKalpha*DT; + } + else + { + const fvPatchScalarField& T = + patch.lookupPatchField("T"); + + const scalarField T0 = + thermo.T0()().boundaryField()[patch.index()]; + + gradient += n*threeKalpha*(T - T0); + } + } + + // Higher order non-linear terms + if + ( + nonLinear == nonLinearGeometry::UPDATED_LAGRANGIAN + || nonLinear == nonLinearGeometry::TOTAL_LAGRANGIAN + ) + { + // no extra relaxation + gradient -= + (n & (mu*(gradField & gradField.T()))) + // + 0.5*n*lambda*(gradField && gradField); + 0.5*n*lambda*tr(gradField & gradField.T()); - //- tensorial identity - //- tr(gradField & gradField.T())*I == (gradField && gradField)*I - if (fieldName == "DU" && nonLinear == "totalLagrangian") - { - // gradU is const in a time step - const fvPatchField& gradU = - patch.lookupPatchField("grad(U)"); + if + ( + incremental + && nonLinear == nonLinearGeometry::TOTAL_LAGRANGIAN + ) + { + // gradU is const in a time step + const fvPatchTensorField& gradU = + patch.lookupPatchField("grad(U)"); - gradient -= - (n & - (mu*( (gradField & gradU.T()) - + (gradU & gradField.T()) )) - ) - + 0.5*n*lambda*tr( (gradField & gradU.T()) - + (gradU & gradField.T()) ); - } - } + gradient -= + ( + n & + ( + mu* + ( + (gradField & gradU.T()) + + (gradU & gradField.T()) + ) + ) + ) + + 0.5*n*lambda*tr + ( + (gradField & gradU.T()) + + (gradU & gradField.T()) + ); + } + } - gradient /= (2.0*mu + lambda); - } + gradient /= (2.0*mu + lambda); + } return tgradient; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam // ************************************************************************* // diff --git a/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.H b/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.H index d638e8bd1..a004ebb73 100644 --- a/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.H +++ b/src/solidModels/constitutiveModel/tractionBoundaryGradient/tractionBoundaryGradient.H @@ -35,6 +35,7 @@ SourceFiles Author Philip Cardiff UCD + Clean-up and re-factoring Hrvoje Jasak \*---------------------------------------------------------------------------*/ @@ -47,6 +48,7 @@ Author #include "volFields.H" #include "tmp.H" #include "rheologyLaw.H" +#include "nonLinearGeometry.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,49 +61,38 @@ namespace Foam class tractionBoundaryGradient { - public: - //- Runtime type information - TypeName("tractionBoundaryGradient"); - - // Constructors - - tractionBoundaryGradient() - {} - - - // Destructor - - virtual ~tractionBoundaryGradient() - {} - - - // Member functions + // Static member functions //- Return the boundary Cauchy traction corresponding to // the given gradient - tmp traction + static tmp traction ( const tensorField& gradField, - const word fieldName, + const word& workingFieldName, // Working variable + const word& integralFieldName, // Integrated displacement const fvPatch& patch, - Switch orthotropic, - word nonLinear - ) const; + const bool orthotropic, + const nonLinearGeometry::nonLinearType& nonLinear, + const bool incremental + ); // Operators - tmp operator() + //- Return surface-normal gradient given traction and pressure + static tmp snGrad ( const vectorField& traction, const scalarField& pressure, - const word fieldName, + const word& workingFieldName, // Working variable + const word& integralFieldName, // Integrated displacement const fvPatch& patch, - Switch orthotropic, - word nonLinear - ) const; + const bool orthotropic, + const nonLinearGeometry::nonLinearType& nonLinear, + const bool incremental + ); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/solidModels/contactModels/frictionContactModels/dirichletNeumannFriction/dirichletNeumannFriction.C b/src/solidModels/contactModels/frictionContactModels/dirichletNeumannFriction/dirichletNeumannFriction.C index 38d5c4a55..c750c72e3 100644 --- a/src/solidModels/contactModels/frictionContactModels/dirichletNeumannFriction/dirichletNeumannFriction.C +++ b/src/solidModels/contactModels/frictionContactModels/dirichletNeumannFriction/dirichletNeumannFriction.C @@ -269,18 +269,24 @@ Foam::dirichletNeumannFriction::dirichletNeumannFriction const fvPatch& slavePatch = mesh.boundary()[slavePatchIndex]; const fvPatchField& gradField = slavePatch.lookupPatchField - ("grad("+fieldName+")"); - vectorField slaveShearTraction = - (I - sqr(slaveFaceNormals)) - & - tractionBoundaryGradient().traction - ( - gradField, - fieldName, - slavePatch, - orthotropic, - nonLinear - ); + ("grad(" + fieldName + ")"); + + bool incremental(fieldName == "DU"); + + vectorField slaveShearTraction + ( + (I - sqr(slaveFaceNormals)) + & tractionBoundaryGradient::traction + ( + gradField, + fieldName, + "U", + slavePatch, + orthotropic, + nonLinearGeometry::nonLinearNames_[nonLinear], + incremental + ) + ); // algorithm diff --git a/src/solidModels/contactModels/normalContactModels/dirichletNeumann/dirichletNeumann.C b/src/solidModels/contactModels/normalContactModels/dirichletNeumann/dirichletNeumann.C index dd60e5fb8..8ebe07e62 100644 --- a/src/solidModels/contactModels/normalContactModels/dirichletNeumann/dirichletNeumann.C +++ b/src/solidModels/contactModels/normalContactModels/dirichletNeumann/dirichletNeumann.C @@ -117,57 +117,59 @@ dirichletNeumann::dirichletNeumann contactFilePtr_(NULL) { // master proc open contact info file - if (Pstream::master()) + if (Pstream::master()) { - word masterName = mesh_.boundary()[masterPatchID].name(); - word slaveName = mesh_.boundary()[slavePatchID].name(); - contactFilePtr_ = - new OFstream - (fileName("normalContact_"+masterName+"_"+slaveName+".txt")); - OFstream& contactFile = *contactFilePtr_; - int width = 20; - contactFile << "time"; - contactFile.width(width); - contactFile << "iter"; - contactFile.width(width); - contactFile << "contactFaces"; - contactFile.width(width); - contactFile << "settledFaces"; - contactFile.width(width); - contactFile << "minPen"; - contactFile.width(width); - contactFile << "maxPress"; - contactFile.width(width); - contactFile << "corrPoints" << endl; - } + word masterName = mesh_.boundary()[masterPatchID].name(); + word slaveName = mesh_.boundary()[slavePatchID].name(); + contactFilePtr_ = + new OFstream + (fileName("normalContact_"+masterName+"_"+slaveName+".txt")); + OFstream& contactFile = *contactFilePtr_; + int width = 20; + contactFile << "time"; + contactFile.width(width); + contactFile << "iter"; + contactFile.width(width); + contactFile << "contactFaces"; + contactFile.width(width); + contactFile << "settledFaces"; + contactFile.width(width); + contactFile << "minPen"; + contactFile.width(width); + contactFile << "maxPress"; + contactFile.width(width); + contactFile << "corrPoints" << endl; + } - // calc point points for missed vertices - if (correctMissedVertices_) + // calc point points for missed vertices + if (correctMissedVertices_) { - calcSlavePointPoints(slavePatchID); + calcSlavePointPoints(slavePatchID); } } -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - void dirichletNeumann::correct - ( - const PrimitivePatch& masterFaceZonePatch, - const PrimitivePatch& slaveFaceZonePatch, - const intersection::algorithm alg, - const intersection::direction dir, - word fieldName, - const Switch orthotropic, - const word nonLinear, - vectorField& slaveFaceNormals, - GGIInterpolation< PrimitivePatch< face, List, pointField >, - PrimitivePatch< face, List, pointField > - >* ggiInterpolatorPtr - ) - { +void dirichletNeumann::correct +( + const PrimitivePatch& masterFaceZonePatch, + const PrimitivePatch& slaveFaceZonePatch, + const intersection::algorithm alg, + const intersection::direction dir, + word fieldName, + const Switch orthotropic, + const word nonLinear, + vectorField& slaveFaceNormals, + GGIInterpolation + < + PrimitivePatch< face, List, pointField >, + PrimitivePatch< face, List, pointField > + >* ggiInterpolatorPtr +) +{ if (!settleContact_ || (iCorr_ < settleIterationNumber_)) - { + { //Info << "Correcting contact..." << flush; const fvMesh& mesh = mesh_; @@ -186,11 +188,11 @@ dirichletNeumann::dirichletNeumann >, PrimitivePatch > masterToSlavePatchToPatchInterpolator ( - masterFaceZonePatch, // from zone - slaveFaceZonePatch, // to zone - alg, - dir - ); + masterFaceZonePatch, // from zone + slaveFaceZonePatch, // to zone + alg, + dir + ); //- calculate intersection distances //- this is the slowest part of the contact correction @@ -205,43 +207,40 @@ dirichletNeumann::dirichletNeumann (mesh.boundaryMesh()[slavePatchID()].nPoints(), 0.0); label numCorrectedPoints = 0; if (distanceMethod_ == "point") - { + { // pointDistanceToIntersection() sometimes gives a seg fault when the // momentum equation diverges - globalSlavePointPenetration - = masterToSlavePatchToPatchInterpolator.pointDistanceToIntersection(); + globalSlavePointPenetration = + masterToSlavePatchToPatchInterpolator.pointDistanceToIntersection(); // get local point values from global values forAll(slavePointPenetration, pointI) - { - // the local point values seem to be kept at the start - // of the global field - slavePointPenetration[pointI] = - globalSlavePointPenetration - [ - pointI - ]; + { + // the local point values seem to be kept at the start + // of the global field + slavePointPenetration[pointI] = + globalSlavePointPenetration[pointI]; - //- when the master surface surrounds the slave (like the pelvis and - // femur head) then - //- the slave penetration can sometimes calculate the distance through - // the femur head - //- to the pelvis which is wrong so I limit slavePenetration here - if (limitPenetration_) - { - if (slavePointPenetration[pointI] < penetrationLimit_) - { - slavePointPenetration[pointI] = 0.0; - } - } - } + //- when the master surface surrounds the slave (like the pelvis and + // femur head) then + //- the slave penetration can sometimes calculate the distance through + // the femur head + //- to the pelvis which is wrong so I limit slavePenetration here + if (limitPenetration_) + { + if (slavePointPenetration[pointI] < penetrationLimit_) + { + slavePointPenetration[pointI] = 0.0; + } + } + } if (correctMissedVertices_) - { - scalarField& slavePointPenetration_ = slavePointPenetration; + { + scalarField& slavePointPenetration_ = slavePointPenetration; # include "iterativePenaltyCorrectMissedVertices.H" - } + } minSlavePointPenetration = gMin(globalSlavePointPenetration); @@ -485,7 +484,7 @@ dirichletNeumann::dirichletNeumann // remove tengential component slaveDisp_ = slaveFaceNormals*(slaveFaceNormals & slaveDisp_); - //--------Try to remove any oscillations----------// + //--------Try to remove any oscillations----------// if (oscillationCorr_) { if (smoothingSteps_ < 1) @@ -502,15 +501,16 @@ dirichletNeumann::dirichletNeumann (mesh.boundaryMesh()[slavePatchIndex].nPoints(), vector::zero); for (int i=0; i(slaveDisp_); - slaveDisp_ = - localSlaveInterpolator.pointToFaceInterpolate(slaveDispPoints); + { + slaveDispPoints = + localSlaveInterpolator.faceToPointInterpolate(slaveDisp_); - // make sure no tangential component - slaveDisp_ = slaveFaceNormals*(slaveFaceNormals & slaveDisp_); - } + slaveDisp_ = localSlaveInterpolator.pointToFaceInterpolate + (slaveDispPoints); + + // make sure no tangential component + slaveDisp_ = slaveFaceNormals*(slaveFaceNormals & slaveDisp_); + } } @@ -530,66 +530,80 @@ dirichletNeumann::dirichletNeumann // calculate current slave traction { - const fvPatch& slavePatch = mesh.boundary()[slavePatchIndex]; - const fvPatchField& gradField = - slavePatch.lookupPatchField - ("grad("+fieldName+")"); - slavePressure_ = tractionBoundaryGradient().traction + const fvPatch& slavePatch = mesh.boundary()[slavePatchIndex]; + const fvPatchField& gradField = + slavePatch.lookupPatchField + ( + "grad(" + fieldName + ")" + ); + + bool incremental(fieldName == "DU"); + + slavePressure_ = tractionBoundaryGradient::traction ( - gradField, - fieldName, - slavePatch, - orthotropic, - nonLinear - ); + gradField, + fieldName, + "U", + slavePatch, + orthotropic, + nonLinearGeometry::nonLinearNames_[nonLinear], + incremental + ); - // set traction to zero on faces not in contact - // and set tensile stresses to zero - //const scalar maxMagSlavePressure = gMax(mag(slavePressure_)); - scalar maxMagSlavePressure = 0.0; - if (slavePressure_.size() > 0) - { - maxMagSlavePressure = max(mag(slavePressure_)); - } - reduce(maxMagSlavePressure, maxOp()); - - forAll(touchFraction_, facei) + // set traction to zero on faces not in contact + // and set tensile stresses to zero + //const scalar maxMagSlavePressure = gMax(mag(slavePressure_)); + scalar maxMagSlavePressure = 0.0; + if (slavePressure_.size() > 0) { - if (touchFraction_[facei] < SMALL - || - ( (slaveFaceNormals[facei] & slavePressure_[facei]) - > 1e-3*maxMagSlavePressure) - ) - { - slavePressure_[facei] = vector::zero; - slaveValueFrac_[facei] = symmTensor::zero; - slaveDisp_[facei] = - slaveFaceNormals[facei] - *(slaveFaceNormals[facei]&oldSlaveDisp[facei]); - } + maxMagSlavePressure = max(mag(slavePressure_)); } + reduce(maxMagSlavePressure, maxOp()); - // relax traction - slavePressure_ = - relaxFactor_*slavePressure_ + (1-relaxFactor_)*oldSlavePressure_; - - // remove any shears - slavePressure_ = slaveFaceNormals*(slaveFaceNormals & slavePressure_); - - // limit pressure to help convergence - if (limitPressure_) + forAll(touchFraction_, facei) { - forAll(slavePressure_, facei) - { - if ( (slaveFaceNormals[facei]&slavePressure_[facei]) < -pressureLimit_) + if + ( + touchFraction_[facei] < SMALL + || ( + (slaveFaceNormals[facei] & slavePressure_[facei]) + > 1e-3*maxMagSlavePressure + ) + ) { - slavePressure_[facei] = -pressureLimit_*slaveFaceNormals[facei]; + slavePressure_[facei] = vector::zero; + slaveValueFrac_[facei] = symmTensor::zero; + slaveDisp_[facei] = slaveFaceNormals[facei] + *(slaveFaceNormals[facei]&oldSlaveDisp[facei]); } } + + // relax traction + slavePressure_ = + relaxFactor_*slavePressure_ + (1-relaxFactor_)*oldSlavePressure_; + + // remove any shears + slavePressure_ = slaveFaceNormals*(slaveFaceNormals & slavePressure_); + + // limit pressure to help convergence + if (limitPressure_) + { + forAll(slavePressure_, facei) + { + if + ( + (slaveFaceNormals[facei] & slavePressure_[facei]) + < -pressureLimit_ + ) + { + slavePressure_[facei] = + -pressureLimit_*slaveFaceNormals[facei]; + } + } } - // update old slave traction - oldSlavePressure_ = slavePressure_; + // update old slave traction + oldSlavePressure_ = slavePressure_; } // in parallel, the log is poluted with warnings that @@ -604,36 +618,36 @@ dirichletNeumann::dirichletNeumann } reduce(maxMagMasterTraction, maxOp()); - // under-relax value fraction - slaveValueFrac_ = - relaxFactor_*slaveValueFrac_ + (1-relaxFactor_)*oldSlaveValueFrac_; - oldSlaveValueFrac_ = slaveValueFrac_; + // under-relax value fraction + slaveValueFrac_ = + relaxFactor_*slaveValueFrac_ + (1-relaxFactor_)*oldSlaveValueFrac_; + oldSlaveValueFrac_ = slaveValueFrac_; - //--------MASTER PROCS WRITES CONTACT INFO FILE----------// - if (Pstream::master() && (contactIterNum_ % infoFreq_ == 0)) - { - OFstream& contactFile = *contactFilePtr_; - int width = 20; - contactFile << mesh.time().value(); - contactFile.width(width); - contactFile << contactIterNum_; - contactFile.width(width); - contactFile << numSlaveContactFaces; - contactFile.width(width); - contactFile << numSlaveSettledFaces; - contactFile.width(width); - contactFile << minSlavePointPenetration; - contactFile.width(width); - contactFile << maxMagMasterTraction; - contactFile.width(width); - contactFile << numCorrectedPoints; - if (aitkenRelaxation_) - { - contactFile.width(width); - contactFile << aitkenTheta_; - } - contactFile << endl; - } + //--------MASTER PROCS WRITES CONTACT INFO FILE----------// + if (Pstream::master() && (contactIterNum_ % infoFreq_ == 0)) + { + OFstream& contactFile = *contactFilePtr_; + int width = 20; + contactFile << mesh.time().value(); + contactFile.width(width); + contactFile << contactIterNum_; + contactFile.width(width); + contactFile << numSlaveContactFaces; + contactFile.width(width); + contactFile << numSlaveSettledFaces; + contactFile.width(width); + contactFile << minSlavePointPenetration; + contactFile.width(width); + contactFile << maxMagMasterTraction; + contactFile.width(width); + contactFile << numCorrectedPoints; + if (aitkenRelaxation_) + { + contactFile.width(width); + contactFile << aitkenTheta_; + } + contactFile << endl; + } //Info << "\tdone" << endl; } diff --git a/src/solidModels/fvPatchFields/fixedDisplacementOrSolidTraction/fixedDisplacementOrSolidTractionFvPatchVectorField.C b/src/solidModels/fvPatchFields/fixedDisplacementOrSolidTraction/fixedDisplacementOrSolidTractionFvPatchVectorField.C index cbafb9380..43854a1b2 100644 --- a/src/solidModels/fvPatchFields/fixedDisplacementOrSolidTraction/fixedDisplacementOrSolidTractionFvPatchVectorField.C +++ b/src/solidModels/fvPatchFields/fixedDisplacementOrSolidTraction/fixedDisplacementOrSolidTractionFvPatchVectorField.C @@ -200,21 +200,22 @@ void fixedDisplacementOrSolidTractionFvPatchVectorField::updateCoeffs() if ( mag(timeSeries_(this->db().time().timeOutputValue())) < SMALL) { - // traction boundary + // traction boundary - // set valueFraction to zero - this->valueFraction() = symmTensor::zero; + // set valueFraction to zero + this->valueFraction() = symmTensor::zero; - // set gradient to enfore specified traction - refGrad() = tractionBoundaryGradient() - ( - traction_, - pressure_, - word(fieldName_), - patch(), - orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + // set gradient to enfore specified traction + refGrad() = tractionBoundaryGradient::snGrad + ( + traction_, + pressure_, + fieldName_, + "U", + patch(), + orthotropic_, + nonLinearGeometry::nonLinearNames_[nonLinear_] + ); } else { diff --git a/src/solidModels/fvPatchFields/fixedDisplacementZeroShear/fixedDisplacementZeroShearFvPatchVectorField.C b/src/solidModels/fvPatchFields/fixedDisplacementZeroShear/fixedDisplacementZeroShearFvPatchVectorField.C index 323443ee1..d48138e28 100644 --- a/src/solidModels/fvPatchFields/fixedDisplacementZeroShear/fixedDisplacementZeroShearFvPatchVectorField.C +++ b/src/solidModels/fvPatchFields/fixedDisplacementZeroShear/fixedDisplacementZeroShearFvPatchVectorField.C @@ -130,31 +130,32 @@ fixedDisplacementZeroShearFvPatchVectorField << "non-orthogonal correction to be right" << endl; } - this->refGrad() = vector::zero; + this->refGrad() = vector::zero; - vectorField n = patch().nf(); - this->valueFraction() = sqr(n); + vectorField n = patch().nf(); + this->valueFraction() = sqr(n); - if (dict.found("value")) + if (dict.found("value")) { - Field::operator=(vectorField("value", dict, p.size())); + Field::operator=(vectorField("value", dict, p.size())); } - else + else { - FatalError << "value entry not found for patch " << patch().name() - << exit(FatalError); + FatalError << "value entry not found for patch " << patch().name() + << exit(FatalError); } - this->refValue() = *this; - Field normalValue = transform(valueFraction(), refValue()); + this->refValue() = *this; - Field gradValue = - this->patchInternalField() + refGrad()/this->patch().deltaCoeffs(); + Field normalValue = transform(valueFraction(), refValue()); - Field transformGradValue = - transform(I - valueFraction(), gradValue); + Field gradValue = + this->patchInternalField() + refGrad()/this->patch().deltaCoeffs(); - Field::operator=(normalValue + transformGradValue); + Field transformGradValue = + transform(I - valueFraction(), gradValue); + + Field::operator=(normalValue + transformGradValue); } @@ -223,15 +224,19 @@ void fixedDisplacementZeroShearFvPatchVectorField::updateCoeffs() // this->valueFraction() = sqr(nCurrent); // } - refGrad() = tractionBoundaryGradient() - ( - vectorField(patch().size(), vector::zero), - scalarField(patch().size(), 0.0), - word(fieldName_), - patch(), - orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + bool incremental(fieldName_ == "DU"); + + refGrad() = tractionBoundaryGradient::snGrad + ( + vectorField(patch().size(), vector::zero), + scalarField(patch().size(), 0.0), + fieldName_, + "U", + patch(), + orthotropic_, + nonLinear_, + incremental + ); directionMixedFvPatchVectorField::updateCoeffs(); } diff --git a/src/solidModels/fvPatchFields/fixedDisplacementZeroShearOrSolidTraction/fixedDisplacementZeroShearOrSolidTractionFvPatchVectorField.C b/src/solidModels/fvPatchFields/fixedDisplacementZeroShearOrSolidTraction/fixedDisplacementZeroShearOrSolidTractionFvPatchVectorField.C index e13489cc9..1d9e096f0 100644 --- a/src/solidModels/fvPatchFields/fixedDisplacementZeroShearOrSolidTraction/fixedDisplacementZeroShearOrSolidTractionFvPatchVectorField.C +++ b/src/solidModels/fvPatchFields/fixedDisplacementZeroShearOrSolidTraction/fixedDisplacementZeroShearOrSolidTractionFvPatchVectorField.C @@ -201,48 +201,51 @@ void fixedDisplacementZeroShearOrSolidTractionFvPatchVectorField::rmap } -void fixedDisplacementZeroShearOrSolidTractionFvPatchVectorField::updateCoeffs() +void +fixedDisplacementZeroShearOrSolidTractionFvPatchVectorField::updateCoeffs() { if (this->updated()) { return; } - if ( mag(timeSeries_(this->db().time().timeOutputValue())) < SMALL) + if (mag(timeSeries_(this->db().time().timeOutputValue())) < SMALL) { - // traction boundary + // traction boundary - // set valueFraction to zero - this->valueFraction() = symmTensor::zero; + // set valueFraction to zero + this->valueFraction() = symmTensor::zero; - // set gradient to enfore specified traction - refGrad() = tractionBoundaryGradient() - ( - traction_, - pressure_, - word(fieldName_), - patch(), - orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + // set gradient to enfore specified traction + refGrad() = tractionBoundaryGradient::snGrad + ( + traction_, + pressure_, + fieldName_, + "U", + patch(), + orthotropic_, + nonLinearGeometry::nonLinearNames_[nonLinear_] + ); } else - { - // fixed displacement zero shear + { + // fixed displacement zero shear - // set valueFraction to fix normal - this->valueFraction() = sqr(fixedNormal_); + // set valueFraction to fix normal + this->valueFraction() = sqr(fixedNormal_); - // force zero shear stresses - refGrad() = tractionBoundaryGradient() - ( - vectorField(traction_.size(), vector::zero), - scalarField(traction_.size(), 0.0), - word(fieldName_), - patch(), - orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + // force zero shear stresses + refGrad() = tractionBoundaryGradient::snGrad + ( + vectorField(traction_.size(), vector::zero), + scalarField(traction_.size(), 0.0), + fieldName_, + "U", + patch(), + orthotropic_, + nonLinearGeometry::nonLinearNames_[nonLinear_] + ); // set displacement refValue() = displacement_; @@ -256,7 +259,7 @@ void fixedDisplacementZeroShearOrSolidTractionFvPatchVectorField::updateCoeffs() void fixedDisplacementZeroShearOrSolidTractionFvPatchVectorField::write ( Ostream& os - ) const +) const { directionMixedFvPatchVectorField::write(os); os.writeKeyword("nonLinear") diff --git a/src/solidModels/fvPatchFields/solidContact/solidContactFvPatchVectorField.C b/src/solidModels/fvPatchFields/solidContact/solidContactFvPatchVectorField.C index fb05c7eae..e9b2d2c9b 100644 --- a/src/solidModels/fvPatchFields/solidContact/solidContactFvPatchVectorField.C +++ b/src/solidModels/fvPatchFields/solidContact/solidContactFvPatchVectorField.C @@ -767,6 +767,8 @@ void solidContactFvPatchVectorField::updateCoeffs() } // set boundary conditions + bool incremental(fieldName_ == "DU"); + if (!master_) { // set refValue, refGrad and valueFraction @@ -778,16 +780,18 @@ void solidContactFvPatchVectorField::updateCoeffs() //refGrad - set traction refGrad() = - tractionBoundaryGradient() + tractionBoundaryGradient::snGrad ( frictionContactModelPtr_->slaveTraction() + normalContactModelPtr_->slavePressure(), scalarField(patch().size(),0.0), - word(fieldName_), + fieldName_, + "U", patch(), orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + nonLinear_, + incremental + ); //valueFraction valueFraction() = @@ -805,32 +809,35 @@ void solidContactFvPatchVectorField::updateCoeffs() { // set to master to traction free if it is rigid refGrad() = - tractionBoundaryGradient() + tractionBoundaryGradient::snGrad ( vectorField(patch().size(),vector::zero), scalarField(patch().size(),0.0), - word(fieldName_), + fieldName_, + "U", patch(), orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + nonLinear_, + incremental + ); } else { - refGrad() = - tractionBoundaryGradient() + refGrad() = tractionBoundaryGradient::snGrad + ( + interpolateSlaveToMaster ( - interpolateSlaveToMaster - ( - -frictionContactModelPtr_->slaveTraction() - -normalContactModelPtr_->slavePressure() - ), - scalarField(patch().size(),0.0), - word(fieldName_), - patch(), - orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + -frictionContactModelPtr_->slaveTraction() + -normalContactModelPtr_->slavePressure() + ), + scalarField(patch().size(),0.0), + fieldName_, + "U", + patch(), + orthotropic_, + nonLinear_, + incremental + ); } } } // if correction freqeuncy @@ -840,28 +847,33 @@ void solidContactFvPatchVectorField::updateCoeffs() else { // set refGrad to traction free for master and slave + bool incremental(fieldName_ == "DU"); + refGrad() = - tractionBoundaryGradient() + tractionBoundaryGradient::snGrad ( vectorField(patch().size(),vector::zero), scalarField(patch().size(),0.0), - word(fieldName_), + fieldName_, + "U", patch(), orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + nonLinear_, + incremental + ); } directionMixedFvPatchVectorField::updateCoeffs(); } + // Interpolate traction from slave to master tmp solidContactFvPatchVectorField::interpolateSlaveToMaster ( const vectorField slaveField ) { - if (!master_) + if (!master_) { FatalError << "only the master may call the function " @@ -1315,85 +1327,96 @@ snGrad() const //- Increment of dissipated energy due to friction tmp solidContactFvPatchVectorField::Qc() const { - tmp tQc(new scalarField(patch().size(), 0.0)); - scalarField& Qc = tQc(); + tmp tQc(new scalarField(patch().size(), 0.0)); + scalarField& Qc = tQc(); - // Integrate energy using trapezoidal rule - // 0.5*averageForce*incrementOfDisplacement + // Integrate energy using trapezoidal rule + // 0.5*averageForce*incrementOfDisplacement - // displacement increment - const vectorField& curDU = *this; + // displacement increment + const vectorField& curDU = *this; - // average force - const fvPatchField& gradField = - patch().lookupPatchField("grad("+fieldName_+")"); - // current Cauchy traction for nonlinear - const vectorField curTrac = - tractionBoundaryGradient().traction - ( - gradField, - fieldName_, - patch(), - orthotropic_, - word(nonLinearGeometry::nonLinearNames_[nonLinear_]) - ); + // average force + const fvPatchField& gradField = + patch().lookupPatchField + ( + "grad(" + fieldName_ + ")" + ); - vectorField Sf = patch().Sf(); - if (nonLinear_ != nonLinearGeometry::OFF - && nonLinear_ == nonLinearGeometry::TOTAL_LAGRANGIAN) + // current Cauchy traction for nonlinear + bool incremental(fieldName_ == "DU"); + + const vectorField curTrac = + tractionBoundaryGradient::traction + ( + gradField, + fieldName_, + "U", + patch(), + orthotropic_, + nonLinear_, + incremental + ); + + vectorField Sf = patch().Sf(); + if + ( + nonLinear_ != nonLinearGeometry::OFF + && nonLinear_ == nonLinearGeometry::TOTAL_LAGRANGIAN + ) { - // current areas - const fvPatchField& gradU = - patch().lookupPatchField("grad(U)"); - tensorField F = I + gradField + gradU; - tensorField Finv = inv(F); - scalarField J = det(F); - Sf = J*(Finv & Sf); - } - const scalarField magSf = mag(Sf); - - const vectorField curForce = magSf * curTrac; - - const fvPatchField& oldSigma = - patch().lookupPatchField("sigma_0"); - - vectorField oldSf = patch().Sf(); - if (nonLinear_ != nonLinearGeometry::OFF) - { - // current areas - //tensorField F = I + gradField; - if (nonLinear_ == nonLinearGeometry::TOTAL_LAGRANGIAN) - { - const fvPatchField& gradU = + // current areas + const fvPatchField& gradU = patch().lookupPatchField("grad(U)"); - tensorField F = I + gradU; - tensorField Finv = inv(F); - scalarField J = det(F); - // rotate initial reference area to area of previous time-step - oldSf = J*(Finv & Sf); - } - else if (nonLinear_ == nonLinearGeometry::UPDATED_LAGRANGIAN) + tensorField F = I + gradField + gradU; + tensorField Finv = inv(F); + scalarField J = det(F); + Sf = J*(Finv & Sf); + } + const scalarField magSf = mag(Sf); + + const vectorField curForce = magSf*curTrac; + + const fvPatchField& oldSigma = + patch().lookupPatchField("sigma_0"); + + vectorField oldSf = patch().Sf(); + if (nonLinear_ != nonLinearGeometry::OFF) + { + // current areas + //tensorField F = I + gradField; + if (nonLinear_ == nonLinearGeometry::TOTAL_LAGRANGIAN) { - tensorField F = I + gradField; - tensorField Finv = inv(F); - scalarField J = det(F); - // rotate current area to area of previous time-step - oldSf = (F & Sf)/J; + const fvPatchField& gradU = + patch().lookupPatchField("grad(U)"); + tensorField F = I + gradU; + tensorField Finv = inv(F); + scalarField J = det(F); + // rotate initial reference area to area of previous time-step + oldSf = J*(Finv & Sf); } - else + else if (nonLinear_ == nonLinearGeometry::UPDATED_LAGRANGIAN) { - FatalError << "solidContact::Qc() nonLinear type not known!" - << exit(FatalError); + tensorField F = I + gradField; + tensorField Finv = inv(F); + scalarField J = det(F); + // rotate current area to area of previous time-step + oldSf = (F & Sf)/J; + } + else + { + FatalError << "solidContact::Qc() nonLinear type not known!" + << exit(FatalError); } } - const vectorField oldForce = oldSf & oldSigma; - const vectorField avForce = 0.5*(oldForce + curForce); + const vectorField oldForce = oldSf & oldSigma; + const vectorField avForce = 0.5*(oldForce + curForce); - // Increment of dissiptaed frictional energy for this timestep - Qc = mag(0.5*(avForce & curDU)); + // Increment of dissiptaed frictional energy for this timestep + Qc = mag(0.5*(avForce & curDU)); - return tQc; + return tQc; } diff --git a/src/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.C b/src/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.C index 1746fda7f..591902529 100644 --- a/src/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.C +++ b/src/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.C @@ -210,15 +210,19 @@ void solidTractionFvPatchVectorField::updateCoeffs() return; } - gradient() = tractionBoundaryGradient() - ( - traction_, - pressure_, - word(fieldName_), - patch(), - orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + bool incremental(fieldName_ == "DU"); + + gradient() = tractionBoundaryGradient::snGrad + ( + traction_, + pressure_, + fieldName_, + "U", + patch(), + orthotropic_, + nonLinear_, + incremental + ); fixedGradientFvPatchVectorField::updateCoeffs(); } @@ -243,14 +247,14 @@ void solidTractionFvPatchVectorField::evaluate(const Pstream::commsTypes) //- non-orthogonal correction vectors vectorField k = delta - n*(n&delta); - Field::operator= + vectorField::operator= ( this->patchInternalField() + (k&gradField.patchInternalField()) + gradient()/this->patch().deltaCoeffs() ); - fvPatchField::evaluate(); + fvPatchVectorField::evaluate(); } // Write diff --git a/src/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.H b/src/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.H index f939ac5f7..ccb8a64c7 100644 --- a/src/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.H +++ b/src/solidModels/fvPatchFields/solidTraction/solidTractionFvPatchVectorField.H @@ -53,7 +53,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class solidTractionFvPatchVectorField Declaration + Class solidTractionFvPatchVectorField Declaration \*---------------------------------------------------------------------------*/ class solidTractionFvPatchVectorField diff --git a/src/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.C b/src/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.C index 4381bd73f..889a5dc05 100644 --- a/src/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.C +++ b/src/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.C @@ -75,9 +75,9 @@ solidTractionFreeFvPatchVectorField if (dict.found("nonLinear")) { nonLinear_ = nonLinearGeometry::nonLinearNames_.read - ( - dict.lookup("nonLinear") - ); + ( + dict.lookup("nonLinear") + ); if (nonLinear_ == nonLinearGeometry::UPDATED_LAGRANGIAN) { @@ -191,15 +191,19 @@ void solidTractionFreeFvPatchVectorField::updateCoeffs() return; } - gradient() = tractionBoundaryGradient() + bool incremental(fieldName_ == "DU"); + + gradient() = tractionBoundaryGradient::snGrad ( vectorField(patch().size(), vector::zero), scalarField(patch().size(), 0.0), - word(fieldName_), + fieldName_, + "U", patch(), orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] - )(); + nonLinear_, + incremental + ); fixedGradientFvPatchVectorField::updateCoeffs(); } @@ -226,7 +230,7 @@ void solidTractionFreeFvPatchVectorField::evaluate(const Pstream::commsTypes) Field::operator= ( this->patchInternalField() - + (k&gradField.patchInternalField()) + + (k & gradField.patchInternalField()) + gradient()/this->patch().deltaCoeffs() ); diff --git a/src/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.H b/src/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.H index 1457588d7..740038b58 100644 --- a/src/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.H +++ b/src/solidModels/fvPatchFields/solidTractionFree/solidTractionFreeFvPatchVectorField.H @@ -66,7 +66,7 @@ class solidTractionFreeFvPatchVectorField //- Name of the displacement field const word fieldName_; - //- if it is a non linear solver + //- Is it a non linear solver nonLinearGeometry::nonLinearType nonLinear_; //- Is it an orthropic solver diff --git a/src/solidModels/fvPatchFields/timeVaryingFixedDisplacementZeroShear/timeVaryingFixedDisplacementZeroShearFvPatchVectorField.C b/src/solidModels/fvPatchFields/timeVaryingFixedDisplacementZeroShear/timeVaryingFixedDisplacementZeroShearFvPatchVectorField.C index a02015dfb..5b24a90c2 100644 --- a/src/solidModels/fvPatchFields/timeVaryingFixedDisplacementZeroShear/timeVaryingFixedDisplacementZeroShearFvPatchVectorField.C +++ b/src/solidModels/fvPatchFields/timeVaryingFixedDisplacementZeroShear/timeVaryingFixedDisplacementZeroShearFvPatchVectorField.C @@ -233,14 +233,18 @@ void timeVaryingFixedDisplacementZeroShearFvPatchVectorField::updateCoeffs() //vectorField n = patch().nf(); //this->valueFraction() = sqr(n); - refGrad() = tractionBoundaryGradient() + bool incremental(fieldName_ == "DU"); + + refGrad() = tractionBoundaryGradient::snGrad ( vectorField(patch().size(), vector::zero), scalarField(patch().size(), 0), - word(fieldName_), + fieldName_, + "U", patch(), orthotropic_, - nonLinearGeometry::nonLinearNames_[nonLinear_] + nonLinear_, + incremental ); directionMixedFvPatchVectorField::updateCoeffs(); diff --git a/src/solidModels/nonLinearGeometry/nonLinearGeometry.H b/src/solidModels/nonLinearGeometry/nonLinearGeometry.H index 7a100f693..fce826279 100644 --- a/src/solidModels/nonLinearGeometry/nonLinearGeometry.H +++ b/src/solidModels/nonLinearGeometry/nonLinearGeometry.H @@ -53,7 +53,7 @@ class nonLinearGeometry { public: - //- non-linear solver options + //- Non-linear solver options enum nonLinearType { OFF, diff --git a/tutorials/solidMechanics/elasticIncrSolidFoam/incrPlateHole/0/DU b/tutorials/solidMechanics/elasticIncrSolidFoam/incrPlateHole/0/DU index 64367517e..a19c42bed 100644 --- a/tutorials/solidMechanics/elasticIncrSolidFoam/incrPlateHole/0/DU +++ b/tutorials/solidMechanics/elasticIncrSolidFoam/incrPlateHole/0/DU @@ -28,10 +28,10 @@ boundaryField right { - type timeVaryingSolidTraction; - nonLinear off; - outOfBounds clamp; - fileName "$FOAM_CASE/constant/timeVsRightTraction"; + type timeVaryingSolidTraction; + nonLinear off; + outOfBounds clamp; + fileName "$FOAM_CASE/constant/timeVsRightTraction"; } down diff --git a/tutorials/solidMechanics/elasticIncrSolidFoam/incrPlateHole/constant/polyMesh/boundary b/tutorials/solidMechanics/elasticIncrSolidFoam/incrPlateHole/constant/polyMesh/boundary index 8b4279666..1f798d9a7 100644 --- a/tutorials/solidMechanics/elasticIncrSolidFoam/incrPlateHole/constant/polyMesh/boundary +++ b/tutorials/solidMechanics/elasticIncrSolidFoam/incrPlateHole/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.0 | +| \\ / O peration | Version: 3.0 | | \\ / A nd | Web: http://www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/solidMechanics/elasticSolidFoam/plateHole/0/U b/tutorials/solidMechanics/elasticSolidFoam/plateHole/0/U index 6dcdc00d9..5f1a3c347 100644 --- a/tutorials/solidMechanics/elasticSolidFoam/plateHole/0/U +++ b/tutorials/solidMechanics/elasticSolidFoam/plateHole/0/U @@ -27,19 +27,20 @@ boundaryField } right { - type analyticalPlateHoleTraction; +// type analyticalPlateHoleTraction; + type solidTraction; + traction uniform (0 0 0); + pressure uniform 1e7; } - down { type symmetryPlane; } - up { - type analyticalPlateHoleTraction; +// type analyticalPlateHoleTraction; + type solidTractionFree; } - hole { type solidTractionFree; diff --git a/tutorials/solidMechanics/elasticSolidFoam/plateHole/constant/polyMesh/boundary b/tutorials/solidMechanics/elasticSolidFoam/plateHole/constant/polyMesh/boundary index 8b4279666..1f798d9a7 100644 --- a/tutorials/solidMechanics/elasticSolidFoam/plateHole/constant/polyMesh/boundary +++ b/tutorials/solidMechanics/elasticSolidFoam/plateHole/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.0 | +| \\ / O peration | Version: 3.0 | | \\ / A nd | Web: http://www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ From bb03a935fa8a46ac4498f873aa61264e8ed6a1d8 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Sun, 23 Feb 2014 10:54:20 +0000 Subject: [PATCH 30/66] Solid models update: clean-up --- .../calculateRelativeResidual.H | 3 +- .../elasticIncrSolidFoam/createFields.H | 2 +- .../elasticIncrSolidFoam.C | 5 +- .../readDivDSigmaExpMethod.H | 31 +++-- .../elasticIncrSolidFoam/writeFields.H | 58 ++++---- .../elasticNonLinTLSolidFoam/createFields.H | 6 +- .../elasticNonLinTLSolidFoam.C | 80 +++++------ .../elasticNonLinULSolidFoam/moveMesh.H | 19 +-- .../elasticSolidFoam/aitkenRelaxation.H | 40 +++--- .../elasticSolidFoam/createFields.H | 63 ++++----- .../elasticSolidFoam/elasticSolidFoam.C | 128 +++++++++--------- 11 files changed, 224 insertions(+), 211 deletions(-) diff --git a/applications/solvers/solidMechanics/elasticIncrSolidFoam/calculateRelativeResidual.H b/applications/solvers/solidMechanics/elasticIncrSolidFoam/calculateRelativeResidual.H index d5eccd36b..36430dbbb 100644 --- a/applications/solvers/solidMechanics/elasticIncrSolidFoam/calculateRelativeResidual.H +++ b/applications/solvers/solidMechanics/elasticIncrSolidFoam/calculateRelativeResidual.H @@ -16,7 +16,6 @@ ( DU.internalField() - DU.prevIter().internalField() - ) - /magDU + )/magDU ); } diff --git a/applications/solvers/solidMechanics/elasticIncrSolidFoam/createFields.H b/applications/solvers/solidMechanics/elasticIncrSolidFoam/createFields.H index 659025e96..c0ec0e32f 100644 --- a/applications/solvers/solidMechanics/elasticIncrSolidFoam/createFields.H +++ b/applications/solvers/solidMechanics/elasticIncrSolidFoam/createFields.H @@ -24,7 +24,7 @@ IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimLength, vector::zero) + dimensionedVector("zero", dimLength, vector::zero) ); volSymmTensorField DEpsilon diff --git a/applications/solvers/solidMechanics/elasticIncrSolidFoam/elasticIncrSolidFoam.C b/applications/solvers/solidMechanics/elasticIncrSolidFoam/elasticIncrSolidFoam.C index cc059029b..4f6a0497f 100644 --- a/applications/solvers/solidMechanics/elasticIncrSolidFoam/elasticIncrSolidFoam.C +++ b/applications/solvers/solidMechanics/elasticIncrSolidFoam/elasticIncrSolidFoam.C @@ -79,7 +79,7 @@ int main(int argc, char *argv[]) # include "calculateDivDSigmaExp.H" - //- linear momentum equation + // Linear momentum equation fvVectorMatrix DUEqn ( fvm::d2dt2(rho, DU) @@ -127,7 +127,8 @@ int main(int argc, char *argv[]) && ++iCorr < nCorr ); - Info<< nl << "Time " << runTime.value() << ", Solving for " << DU.name() + Info<< nl << "Time " << runTime.value() + << ", Solving for " << DU.name() << ", Initial residual = " << initialResidual << ", Final residual = " << solverPerf.initialResidual() << ", Relative residual = " << relativeResidual diff --git a/applications/solvers/solidMechanics/elasticIncrSolidFoam/readDivDSigmaExpMethod.H b/applications/solvers/solidMechanics/elasticIncrSolidFoam/readDivDSigmaExpMethod.H index c75f4c342..de2a549e7 100644 --- a/applications/solvers/solidMechanics/elasticIncrSolidFoam/readDivDSigmaExpMethod.H +++ b/applications/solvers/solidMechanics/elasticIncrSolidFoam/readDivDSigmaExpMethod.H @@ -1,9 +1,22 @@ -//- how explicit component of sigma is to be calculated -word divDSigmaExpMethod(mesh.solutionDict().subDict("solidMechanics").lookup("divSigmaExp")); -Info << "Selecting divSigmaExp calculation method " << divDSigmaExpMethod << endl; -if(divDSigmaExpMethod != "standard" && divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "decompose" && divDSigmaExpMethod != "laplacian") - { - FatalError << "divSigmaExp method " << divDSigmaExpMethod << " not found!" << nl - << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" - << exit(FatalError); - } + const dictionary& stressControl = + mesh.solutionDict().subDict("solidMechanics"); + + // Read how explicit component of sigma is to be calculated + word divDSigmaExpMethod(stressControl.lookup("divSigmaExp")); + + Info<< "Selecting divSigmaExp calculation method: " + << divDSigmaExpMethod << endl; + + if + ( + divDSigmaExpMethod != "standard" + && divDSigmaExpMethod != "surface" + && divDSigmaExpMethod != "decompose" + && divDSigmaExpMethod != "laplacian" + ) + { + FatalErrorIn(args.executable()) + << "divSigmaExp method " << divDSigmaExpMethod << " not found! " + << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" + << exit(FatalError); + } diff --git a/applications/solvers/solidMechanics/elasticIncrSolidFoam/writeFields.H b/applications/solvers/solidMechanics/elasticIncrSolidFoam/writeFields.H index 574bd09a9..f666ec12b 100644 --- a/applications/solvers/solidMechanics/elasticIncrSolidFoam/writeFields.H +++ b/applications/solvers/solidMechanics/elasticIncrSolidFoam/writeFields.H @@ -1,36 +1,34 @@ if (runTime.outputTime()) - { +{ volScalarField epsilonEq - ( - IOobject - ( - "epsilonEq", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - sqrt((2.0/3.0)*magSqr(dev(epsilon))) - ); + ( + IOobject + ( + "epsilonEq", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqrt((2.0/3.0)*magSqr(dev(epsilon))) + ); - Info<< "Max epsilonEq = " << max(epsilonEq).value() - << endl; + Info<< "Max epsilonEq = " << max(epsilonEq).value() << endl; volScalarField sigmaEq - ( - IOobject - ( - "sigmaEq", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - sqrt((3.0/2.0)*magSqr(dev(sigma))) - ); - - Info<< "Max sigmaEq = " << max(sigmaEq).value() - << endl; - + ( + IOobject + ( + "sigmaEq", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqrt((3.0/2.0)*magSqr(dev(sigma))) + ); + + Info<< "Max sigmaEq = " << max(sigmaEq).value() << endl; + runTime.write(); - } +} diff --git a/applications/solvers/solidMechanics/elasticNonLinTLSolidFoam/createFields.H b/applications/solvers/solidMechanics/elasticNonLinTLSolidFoam/createFields.H index 81a6f557f..0a420cee6 100644 --- a/applications/solvers/solidMechanics/elasticNonLinTLSolidFoam/createFields.H +++ b/applications/solvers/solidMechanics/elasticNonLinTLSolidFoam/createFields.H @@ -25,11 +25,11 @@ IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), - mesh, - dimensionedSymmTensor("zero", dimless, symmTensor::zero) + mesh, + dimensionedSymmTensor("zero", dimless, symmTensor::zero) ); - //- second Piola-Kirchhoff stress tensor + //- Second Piola-Kirchhoff stress tensor volSymmTensorField sigma ( IOobject diff --git a/applications/solvers/solidMechanics/elasticNonLinTLSolidFoam/elasticNonLinTLSolidFoam.C b/applications/solvers/solidMechanics/elasticNonLinTLSolidFoam/elasticNonLinTLSolidFoam.C index 749a9e238..c6479e3cd 100644 --- a/applications/solvers/solidMechanics/elasticNonLinTLSolidFoam/elasticNonLinTLSolidFoam.C +++ b/applications/solvers/solidMechanics/elasticNonLinTLSolidFoam/elasticNonLinTLSolidFoam.C @@ -44,21 +44,21 @@ Author int main(int argc, char *argv[]) { -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "createSolidInterfaceNonLin.H" +# include "setRootCase.H" +# include "createTime.H" +# include "createMesh.H" +# include "createFields.H" +# include "createSolidInterfaceNonLin.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info<< "\nStarting time loop\n" << endl; + Info<< "\nStarting time loop\n" << endl; - while(runTime.loop()) + while(runTime.loop()) { - Info<< "Time: " << runTime.timeName() << nl << endl; + Info<< "Time: " << runTime.timeName() << nl << endl; -# include "readSolidMechanicsControls.H" +# include "readSolidMechanicsControls.H" int iCorr = 0; scalar initialResidual = 0; @@ -70,36 +70,40 @@ int main(int argc, char *argv[]) { U.storePrevIter(); - surfaceTensorField shearGradU = - ((I - n*n)&fvc::interpolate(gradU)); + surfaceTensorField shearGradU + ( + "shearGradU", + (I - sqr(n)) & fvc::interpolate(gradU) + ); fvVectorMatrix UEqn + ( + fvm::d2dt2(rho, U) + == + fvm::laplacian(2*muf + lambdaf, U, "laplacian(DU,U)") +// + fvc::div +// ( +// -(mu + lambda)*gradU +// + mu*gradU.T() +// + mu*(gradU & gradU.T()) +// + lambda*tr(gradU)*I +// + 0.5*lambda*tr(gradU & gradU.T())*I +// + (sigma & gradU), +// "div(sigma)" +// ) + + fvc::div ( - fvm::d2dt2(rho, U) - == - fvm::laplacian(2*muf + lambdaf, U, "laplacian(DU,U)") - // + fvc::div( - // -( (mu + lambda) * gradU ) - // + ( mu * gradU.T() ) - // + ( mu * (gradU & gradU.T()) ) - // + ( lambda * tr(gradU) * I ) - // + ( 0.5 * lambda * tr(gradU & gradU.T()) * I ) - // + ( sigma & gradU ), - // "div(sigma)" - // ) - + fvc::div( - mesh.magSf() - *( - - (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n)) - + lambdaf*tr(shearGradU&(I - n*n))*n - + muf*(shearGradU&n) - + muf * (n & fvc::interpolate(gradU & gradU.T())) - + 0.5*lambdaf - *(n * tr(fvc::interpolate(gradU & gradU.T()))) - + (n & fvc::interpolate( sigma & gradU )) - ) - ) - ); + mesh.magSf()* + ( + - (muf + lambdaf)*(fvc::snGrad(U) & (I - n*n)) + + lambdaf*tr(shearGradU & (I - n*n))*n + + muf*(shearGradU & n) + + muf*(n & fvc::interpolate(gradU & gradU.T())) + + 0.5*lambdaf*(n*tr(fvc::interpolate(gradU & gradU.T()))) + + (n & fvc::interpolate(sigma & gradU)) + ) + ) + ); if (solidInterfaceCorr) { @@ -153,9 +157,9 @@ int main(int argc, char *argv[]) << " s\n\n" << endl; } - Info<< "End\n" << endl; + Info<< "End\n" << endl; - return(0); + return(0); } diff --git a/applications/solvers/solidMechanics/elasticNonLinULSolidFoam/moveMesh.H b/applications/solvers/solidMechanics/elasticNonLinULSolidFoam/moveMesh.H index 807c713fd..fe91884e1 100644 --- a/applications/solvers/solidMechanics/elasticNonLinULSolidFoam/moveMesh.H +++ b/applications/solvers/solidMechanics/elasticNonLinULSolidFoam/moveMesh.H @@ -1,15 +1,16 @@ if(moveMeshMethod == "inverseDistance") - { +{ # include "moveMeshInverseDistance.H" - } - else if(moveMeshMethod == "leastSquares") - { +} +else if(moveMeshMethod == "leastSquares") +{ # include "moveMeshLeastSquares.H" - } - else - { - FatalError << "move mesh method " << moveMeshMethod << " not recognised" << nl +} +else +{ + FatalErrorIn(args.executable()) + << "move mesh method " << moveMeshMethod << " not recognised" << nl << "available methods are:" << nl << "inverseDistance" << nl << "leastSquares" << exit(FatalError); - } +} diff --git a/applications/solvers/solidMechanics/elasticSolidFoam/aitkenRelaxation.H b/applications/solvers/solidMechanics/elasticSolidFoam/aitkenRelaxation.H index e82330f12..779839046 100644 --- a/applications/solvers/solidMechanics/elasticSolidFoam/aitkenRelaxation.H +++ b/applications/solvers/solidMechanics/elasticSolidFoam/aitkenRelaxation.H @@ -1,4 +1,4 @@ -// aitken acceleration +// aitken acceleration aitkenDelta.storePrevIter(); @@ -7,26 +7,26 @@ aitkenDelta = (U - U.prevIter()) / aitkenInitialRes; // update relaxation factor if(iCorr == 0) - { +{ aitkenTheta = 0.1; - } - else - { - vectorField b = aitkenDelta.internalField() - aitkenDelta.prevIter().internalField(); - // scalar sumMagB = gSum(mag(b)); - scalar sumMagB = gSum(magSqr(b)); - if(sumMagB < SMALL) - { - // Warning << "Aitken under-relaxation: denominator less then SMALL" - // << endl; - sumMagB += SMALL; - } - - aitkenTheta = -aitkenTheta* - gSum(aitkenDelta.prevIter().internalField() & b) - / - sumMagB; - } +} +else +{ + vectorField b = aitkenDelta.internalField() + - aitkenDelta.prevIter().internalField(); + + scalar sumMagB = gSum(magSqr(b)); + if(sumMagB < SMALL) + { + // Warning << "Aitken under-relaxation: denominator less then SMALL" + // << endl; + sumMagB += SMALL; + } + + aitkenTheta = -aitkenTheta* + gSum(aitkenDelta.prevIter().internalField() & b)/ + sumMagB; +} // correction to the latest U U += aitkenTheta*aitkenDelta*aitkenInitialRes; diff --git a/applications/solvers/solidMechanics/elasticSolidFoam/createFields.H b/applications/solvers/solidMechanics/elasticSolidFoam/createFields.H index 9e916fb44..c26827227 100644 --- a/applications/solvers/solidMechanics/elasticSolidFoam/createFields.H +++ b/applications/solvers/solidMechanics/elasticSolidFoam/createFields.H @@ -12,21 +12,20 @@ mesh ); - // volTensorField gradU = fvc::grad(U); volTensorField gradU ( IOobject ( - "grad(U)", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "grad(U)", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), mesh, dimensionedTensor("zero", dimless, tensor::zero) - ); - //surfaceVectorField snGradU = fvc::snGrad(U); + ); + surfaceVectorField snGradU ( IOobject @@ -38,7 +37,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedVector("zero", dimless, vector::zero) + dimensionedVector("zero", dimless, vector::zero) ); volVectorField V @@ -85,19 +84,19 @@ dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero) ); - volVectorField divSigmaExp - ( + volVectorField divSigmaExp + ( IOobject ( - "divSigmaExp", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "divSigmaExp", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), mesh, dimensionedVector("zero", dimForce/dimVolume, vector::zero) - ); + ); constitutiveModel rheology(sigma, U); @@ -127,18 +126,20 @@ // for aitken relaxation volVectorField aitkenDelta - ( - IOobject - ( - "aitkenDelta", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionedVector("zero", dimLength, vector::zero) - ); + ( + IOobject + ( + "aitkenDelta", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedVector("zero", dimLength, vector::zero) + ); + + // aitken relaxation factor scalar aitkenInitialRes = 1.0; scalar aitkenTheta = 0.1; diff --git a/applications/solvers/solidMechanics/elasticSolidFoam/elasticSolidFoam.C b/applications/solvers/solidMechanics/elasticSolidFoam/elasticSolidFoam.C index d5977e294..905dc47b0 100644 --- a/applications/solvers/solidMechanics/elasticSolidFoam/elasticSolidFoam.C +++ b/applications/solvers/solidMechanics/elasticSolidFoam/elasticSolidFoam.C @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) Info<< "\nStarting time loop\n" << endl; while(runTime.loop()) - { + { Info<< "Time: " << runTime.timeName() << nl << endl; # include "readSolidMechanicsControls.H" @@ -74,84 +74,80 @@ int main(int argc, char *argv[]) lduMatrix::debug = 0; if (predictor) - { - Info << "\nPredicting U, gradU and snGradU based on V," - << "gradV and snGradV\n" << endl; - U += V*runTime.deltaT(); - gradU += gradV*runTime.deltaT(); - snGradU += snGradV*runTime.deltaT(); - } + { + Info<< "\nPredicting U, gradU and snGradU based on V," + << "gradV and snGradV\n" << endl; + U += V*runTime.deltaT(); + gradU += gradV*runTime.deltaT(); + snGradU += snGradV*runTime.deltaT(); + } do - { - U.storePrevIter(); + { + U.storePrevIter(); # include "calculateDivSigmaExp.H" - // linear momentum equation - fvVectorMatrix UEqn - ( - rho*fvm::d2dt2(U) - == - fvm::laplacian(2*muf + lambdaf, U, "laplacian(DU,U)") - + divSigmaExp - ); + // linear momentum equation + fvVectorMatrix UEqn + ( + rho*fvm::d2dt2(U) + == + fvm::laplacian(2*muf + lambdaf, U, "laplacian(DU,U)") + + divSigmaExp + ); - if (solidInterfaceCorr) - { - solidInterfacePtr->correct(UEqn); - } + if (solidInterfaceCorr) + { + solidInterfacePtr->correct(UEqn); + } -// if (relaxEqn) -// { -// UEqn.relax(); -// } + solverPerf = UEqn.solve(); - solverPerf = UEqn.solve(); + if (iCorr == 0) + { + initialResidual = solverPerf.initialResidual(); + aitkenInitialRes = gMax(mag(U.internalField())); + } - if (iCorr == 0) - { - initialResidual = solverPerf.initialResidual(); - aitkenInitialRes = gMax(mag(U.internalField())); - } - - if (aitkenRelax) - { + if (aitkenRelax) + { # include "aitkenRelaxation.H" - } - else - { - U.relax(); - } + } + else + { + U.relax(); + } - gradU = fvc::grad(U); + gradU = fvc::grad(U); # include "calculateRelativeResidual.H" - if (iCorr % infoFrequency == 0) - { - Info<< "\tTime " << runTime.value() - << ", Corrector " << iCorr - << ", Solving for " << U.name() - << " using " << solverPerf.solverName() - << ", res = " << solverPerf.initialResidual() - << ", rel res = " << relativeResidual; - if (aitkenRelax) - { - Info<< ", aitken = " << aitkenTheta; - } - Info<< ", inner iters = " << solverPerf.nIterations() << endl; - } - } + if (iCorr % infoFrequency == 0) + { + Info<< "\tTime " << runTime.value() + << ", Corrector " << iCorr + << ", Solving for " << U.name() + << " using " << solverPerf.solverName() + << ", res = " << solverPerf.initialResidual() + << ", rel res = " << relativeResidual; + + if (aitkenRelax) + { + Info<< ", aitken = " << aitkenTheta; + } + Info<< ", inner iters = " << solverPerf.nIterations() << endl; + } + } while - ( - iCorr++ == 0 - || - (solverPerf.initialResidual() > convergenceTolerance - //relativeResidual > convergenceTolerance - && - iCorr < nCorr) - ); + ( + iCorr++ == 0 + || ( + solverPerf.initialResidual() > convergenceTolerance + //relativeResidual > convergenceTolerance + && iCorr < nCorr + ) + ); Info<< nl << "Time " << runTime.value() << ", Solving for " << U.name() << ", Initial residual = " << initialResidual @@ -178,9 +174,9 @@ int main(int argc, char *argv[]) << " s\n\n" << endl; } - Info<< "End\n" << endl; + Info<< "End\n" << endl; - return(0); + return(0); } From adc2bbb08141ae1ab0019ad790b68d25428b31c0 Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Tue, 25 Feb 2014 09:36:02 +0100 Subject: [PATCH 31/66] Updated documentation in comments to include 'SYSTEMOPENMPI' again --- etc/bashrc | 2 +- etc/cshrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/bashrc b/etc/bashrc index 4d8c7ef55..137daddc9 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -144,7 +144,7 @@ export WM_COMPILER_LIB_ARCH= # WM_COMPILE_OPTION = Opt | Debug | Prof : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION -# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI +# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI : ${WM_MPLIB:=OPENMPI}; export WM_MPLIB # WM_NCOMPPROCS = diff --git a/etc/cshrc b/etc/cshrc index b130f8c75..c2a760d8b 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -128,7 +128,7 @@ if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt #setenv WM_COMPILE_OPTION Opt #setenv WM_COMPILE_OPTION Debug -# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI +# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI # WM_NCOMPPROCS = From 6a6c4903f33f20b8181b00835c54fd2530c53f63 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Tue, 25 Feb 2014 18:55:33 +0100 Subject: [PATCH 32/66] Support building Pstream against MVAPICH2 --- etc/bashrc | 2 +- etc/settings.sh | 36 ++++++++++++++++++++++++++++ src/Pstream/Allwmake | 2 +- wmake/rules/linux64Gcc/mplibMVAPICH2 | 0 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 wmake/rules/linux64Gcc/mplibMVAPICH2 diff --git a/etc/bashrc b/etc/bashrc index 6aad1f6ce..323d1a9dc 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -143,7 +143,7 @@ export WM_COMPILER_LIB_ARCH= # WM_COMPILE_OPTION = Opt | Debug | Prof : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION -# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI +# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI | MVAPICH2 : ${WM_MPLIB:=OPENMPI}; export WM_MPLIB # WM_NCOMPPROCS = diff --git a/etc/settings.sh b/etc/settings.sh index e85bf95e8..6a2bc3c7d 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -333,6 +333,42 @@ SYSTEMOPENMPI) unset mpi_version ;; +MVAPICH2) + mpi_version=mvapich2 + + if [ -n "${MVAPICH2_BIN_DIR}" ] && [ -d "${MVAPICH2_BIN_DIR}" ] + then + _foamAddPath $MVAPICH2_BIN_DIR + else + MVAPICH2_BIN_DIR=$(dirname `which mpicc`) + fi + + if which mpicc >/dev/null + then + mpicc -v 2>/dev/null | grep -q "mpicc for MVAPICH2" || + echo "Warning: `which mpicc` does not appear to be for MVAPICH2" + else + echo "Warning: mpicc not available" + fi + + export MPI_HOME=`dirname $MVAPICH2_BIN_DIR` + export MPI_ARCH_PATH=$MPI_HOME + + export PINC="`mpicc -show -cc= -nativelinking`" + export PLIBS="`mpicc -show -cc= | sed "s%$PINC%%"`" + + if [ "$FOAM_VERBOSE" -a "$PS1" ] + then + echo " Environment variables defined for MVAPICH2:" + echo " MPI_ARCH_PATH : $MPI_ARCH_PATH" + echo " PINC : $PINC" + echo " PLIBS : $PLIBS" + fi + + export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version + unset mpi_version + ;; + MPICH) mpi_version=mpich-1.2.4 export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake index a01538cc3..6c4131068 100755 --- a/src/Pstream/Allwmake +++ b/src/Pstream/Allwmake @@ -5,7 +5,7 @@ set -x wmake libso dummy case "$WM_MPLIB" in -*MPI*) +*MPI* | MVAPICH*) set +x echo echo "Note: ignore spurious warnings about missing mpicxx.h headers" diff --git a/wmake/rules/linux64Gcc/mplibMVAPICH2 b/wmake/rules/linux64Gcc/mplibMVAPICH2 new file mode 100644 index 000000000..e69de29bb From b3604684923677379d550e211ab7ec710ca81d47 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Wed, 5 Mar 2014 17:46:16 +0100 Subject: [PATCH 33/66] Add csh bits for MVAPICH2 build support --- etc/cshrc | 2 +- etc/settings.csh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/etc/cshrc b/etc/cshrc index b130f8c75..a565149d4 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -128,7 +128,7 @@ if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt #setenv WM_COMPILE_OPTION Opt #setenv WM_COMPILE_OPTION Debug -# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI +# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI | MVAPICH2 if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI # WM_NCOMPPROCS = diff --git a/etc/settings.csh b/etc/settings.csh index 6d3435b38..0b8674384 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -282,6 +282,36 @@ case SYSTEMOPENMPI: unset mpi_version breaksw +case MVAPICH2: + set mpi_version=mvapich2 + + if ($?MVAPICH2_BIN_DIR != 0) then + if (-d "${MVAPICH2_BIN_DIR}" ) then + _foamAddPath $MVAPICH2_BIN_DIR + endif + else + set mpicc_cmd=`which mpicc` + setenv MVAPICH2_BIN_DIR `dirname $mpicc_cmd` + unset mpicc_cmd + endif + + setenv MPI_HOME `dirname $MVAPICH2_BIN_DIR` + setenv MPI_ARCH_PATH $MPI_HOME + + setenv PINC "`mpicc -show -cc= -nativelinking`" + setenv PLIBS "`mpicc -show -cc= | sed "s%$PINC%%"`" + + if ($?FOAM_VERBOSE && $?prompt) then + echo " Environment variables defined for MVAPICH2:" + echo " MPI_ARCH_PATH : $MPI_ARCH_PATH" + echo " PINC : $PINC" + echo " PLIBS : $PLIBS" + endif + + setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version + unset mpi_version + breaksw + case MPICH: set mpi_version=mpich-1.2.4 setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version From e59cae58df6e84fd6aba023f0418e4bcce6a070a Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Fri, 7 Mar 2014 16:39:42 +0100 Subject: [PATCH 34/66] Added empty directories BUILD and RPMS, required for CentOS installation --- ThirdParty/rpmBuild/BUILD/.emptyFileForGit | 0 ThirdParty/rpmBuild/RPMS/.emptyFileForGit | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 ThirdParty/rpmBuild/BUILD/.emptyFileForGit create mode 100644 ThirdParty/rpmBuild/RPMS/.emptyFileForGit diff --git a/ThirdParty/rpmBuild/BUILD/.emptyFileForGit b/ThirdParty/rpmBuild/BUILD/.emptyFileForGit new file mode 100644 index 000000000..e69de29bb diff --git a/ThirdParty/rpmBuild/RPMS/.emptyFileForGit b/ThirdParty/rpmBuild/RPMS/.emptyFileForGit new file mode 100644 index 000000000..e69de29bb From 240d710a6e48661d9590de85563c0dd6c12cecbe Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Thu, 13 Mar 2014 17:52:52 +0100 Subject: [PATCH 35/66] Adaption to new boxes available on vagrantcloud.com (use vagrant 1.5) --- vagrantSandbox/README | 16 ++++++-- vagrantSandbox/Vagrantfile | 51 ++++++++++++++++---------- vagrantSandbox/initCentOSRHELScript.sh | 5 ++- vagrantSandbox/initGeneralScript.sh | 5 +++ 4 files changed, 52 insertions(+), 25 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 41d8b0f16..367925f24 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -3,7 +3,10 @@ * Prerequisites These virtual machines require - VirtualBox :: for running from [[https://www.virtualbox.org]] - - Vagrant :: to automatically set them up from [[http://www.vagrantup.com]] + - Vagrant :: to automatically set them up from + [[http://www.vagrantup.com]] Make sure that you have at + least version 1.5 to be able to use the base boxes from + https://vagrantcloud.com/ To make sure that for the boxes the have the newest VirtualBox-additions do : vagrant plugin install vagrant-vbguest @@ -31,7 +34,7 @@ doing * Virtual machines Currently existing virtual machines are - - precise :: Latest LTS Ubuntu. + - precise :: Latest LTS Ubuntu. Currently the default machine to use - lucid :: Previous LTS Ubuntu. Currently problems with automatic setting up (something with the =postfix=-package) @@ -39,8 +42,13 @@ =lucid=-machine. Not yet working - centos65 :: A CentOS 6.5 machine with preinstalled development tools - - freebsd92 :: FreeBSD 9.2 32-bit machine. Does not work because - FreeBSD does not support shared folders + - freebsd92 :: FreeBSD 9.2 64-bit machine. Currently this machine + does not provision automatically. After the first + failure log in and do +: sudo pkg_add -r rsync +: sudo pkg_add -r bash + then halt the machine and bring it up again (with the + =--provision=-option) - freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared folders via NFS. Currently not working - opensuse12 :: OpenSUSE 12.3 machine. Currently not completely diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index 081f8ab5b..d3b3eedd4 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -12,6 +12,28 @@ Vagrant.configure("2") do |config| vb.customize ["modifyvm", :id, "--memory", "1024"] end + # default + config.vm.define :precise do |precise| + precise.vm.box = "hashicorp/precise64" + precise.vm.box_check_update = true + # precise.vm.box_url = "http://files.vagrantup.com/precise64.box" + precise.vm.provision :shell do |s| + s.args = "precise" + s.path = "initUbunutuScript.sh" + end + end + + config.vm.define :centos65 do |centos65| + centos65.vm.box = "chef/centos-6.5" + centos65.vm.box_check_update = true + # centos65.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box" + centos65.vm.provision :shell do |s| + s.args = "centos65" + s.path = "initCentOSRHELScript.sh" + end + end + + # legacy config.vm.define :lucid do |lucid| lucid.vm.box = "lucid64" lucid.vm.box_url = "http://files.vagrantup.com/lucid64.box" @@ -21,6 +43,7 @@ Vagrant.configure("2") do |config| end end + #legacy config.vm.define :maverick do |maverick| maverick.vm.box = "maverick64" maverick.vm.box_url = "http://mathie-vagrant-boxes.s3.amazonaws.com/maverick64.box" @@ -30,34 +53,21 @@ Vagrant.configure("2") do |config| end end - config.vm.define :precise do |precise| - precise.vm.box = "precise64" - precise.vm.box_url = "http://files.vagrantup.com/precise64.box" - precise.vm.provision :shell do |s| - s.args = "precise" - s.path = "initUbunutuScript.sh" - end - end - - config.vm.define :centos65 do |centos65| - centos65.vm.box = "centos65" - centos65.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box" - centos65.vm.provision :shell do |s| - s.args = "centos65" - s.path = "initCentOSRHELScript.sh" - end - end - + # experimental config.vm.define :freebsd92 do |freebsd92| - freebsd92.vm.box = "freebsd92" + freebsd92.vm.box = "chef/freebsd-9.2" + freebsd92.vm.box_check_update = true # freebsd92.vm.box_url = "https://wunki.org/files/freebsd-9.2-amd64-wunki.box" - freebsd92.vm.box_url = "http://iris.hosting.lv/freebsd-9.2-i386.box" +# freebsd92.vm.box_url = "http://iris.hosting.lv/freebsd-9.2-i386.box" freebsd92.vm.provision :shell do |s| s.args = "freebsd92" s.path = "initFreeBSDScript.sh" end + freebsd92.vm.synced_folder "..", "/FOAM-sources", type: "rsync", rsync__exclude: "vagrantSandbox/" + freebsd92.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: "ccache4vm/" end + # legacy/experimental config.vm.define :freebsd10 do |freebsd10| freebsd10.vm.box = "freebsd10" # freebsd10.vm.box_url = "https://wunki.org/files/freebsd-10.0-amd64-wunki.box" @@ -78,6 +88,7 @@ Vagrant.configure("2") do |config| freebsd10.vm.synced_folder "..", "/FOAM-sources", :nfs => true end + # legacy config.vm.define :opensuse12 do |opensuse12| opensuse12.vm.box = "opensuse12" opensuse12.vm.box_url = "http://sourceforge.net/projects/opensusevagrant/files/12.3/opensuse-12.3-64.box/download" diff --git a/vagrantSandbox/initCentOSRHELScript.sh b/vagrantSandbox/initCentOSRHELScript.sh index b96b1f71e..4aca9927e 100755 --- a/vagrantSandbox/initCentOSRHELScript.sh +++ b/vagrantSandbox/initCentOSRHELScript.sh @@ -6,9 +6,12 @@ echo echo "Init script for $boxName" echo +echo "Install the EPEL-repository for additional software" +rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm + # some of these packages are already installed. But lets be sure -neededPackages=(gcc-g++ mercurial git flex bison make ccache rpm-build wget zlib-devel binutils-devel) +neededPackages=(gcc-c++ gcc-gfortran mercurial git flex bison make ccache rpm-build wget zlib-devel binutils-devel) bonusPackages=(emacs csh tcsh zsh) for p in ${neededPackages[@]}; do diff --git a/vagrantSandbox/initGeneralScript.sh b/vagrantSandbox/initGeneralScript.sh index 672f49af0..0a0025808 100755 --- a/vagrantSandbox/initGeneralScript.sh +++ b/vagrantSandbox/initGeneralScript.sh @@ -37,8 +37,12 @@ then then echo echo "Parent is git" + echo "Cloning. This may take some time" echo + + # su -c not correctly working on FreeBSD su vagrant - -c "git clone $OFParent $OFClone" + echo echo "Git cloned: TODO: set same branch as parent" echo @@ -52,6 +56,7 @@ then # sed removes + in case of a 'tainted' parent echo "Parent is on id $idName" + echo "Cloning. This may take some time" su vagrant - -c "hg clone -u $idName $OFParent $OFClone" echo else From d1d83c21f45ab27c1c7be627232b92b39956481c Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Thu, 13 Mar 2014 18:33:45 +0100 Subject: [PATCH 36/66] Changes necessary for FreeBSD --- vagrantSandbox/initFreeBSDScript.sh | 4 ++-- vagrantSandbox/initGeneralScript.sh | 2 +- vagrantSandbox/skel/bootstrapFoam.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vagrantSandbox/initFreeBSDScript.sh b/vagrantSandbox/initFreeBSDScript.sh index 48f738557..a5c0514ec 100755 --- a/vagrantSandbox/initFreeBSDScript.sh +++ b/vagrantSandbox/initFreeBSDScript.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash boxName=$1 @@ -8,7 +8,7 @@ echo pkg install -fy virtualbox-ose-additions -neededPackages=(mercurial git flex bison ccache rpm wget) +neededPackages=(mercurial git flex bison ccache rpm4 wget) bonusPackages=(emacs24 zsh) for p in ${neededPackages[@]}; do diff --git a/vagrantSandbox/initGeneralScript.sh b/vagrantSandbox/initGeneralScript.sh index 0a0025808..2dcc0af87 100755 --- a/vagrantSandbox/initGeneralScript.sh +++ b/vagrantSandbox/initGeneralScript.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash echo echo "Copying stuff from skeleton" diff --git a/vagrantSandbox/skel/bootstrapFoam.sh b/vagrantSandbox/skel/bootstrapFoam.sh index c589bb4cc..8bbd921b7 100755 --- a/vagrantSandbox/skel/bootstrapFoam.sh +++ b/vagrantSandbox/skel/bootstrapFoam.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash # Just to be sure export WM_SCHEDULER=ccache From ac7d562d699d96d43b1fe3691aa12727cfb57a68 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Mon, 17 Mar 2014 13:15:41 -0400 Subject: [PATCH 37/66] ThirdParty: fixing typo in scotch-6.0.0_patch_darwin --- ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_darwin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_darwin b/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_darwin index ec5b96bd4..7e9174eef 100644 --- a/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_darwin +++ b/ThirdParty/rpmBuild/SOURCES/scotch-6.0.0_patch_darwin @@ -12,7 +12,7 @@ +CCS = gcc +CCP = mpicc +CCD = mpicc -+CFLAGS = -O3 -Destrict=__restrict -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DCOMMON_FILE_COMPRESS_GZ -DSCOTCH_RENAME ++CFLAGS = -O3 -Drestrict=__restrict -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DCOMMON_FILE_COMPRESS_GZ -DSCOTCH_RENAME +CLIBFLAGS = +LDFLAGS = -lz -lm +LIBLDFLAGS = -dynamiclib -undefined dynamic_lookup From ff190304648d16ffc24c5c3dfba988048fecf90c Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Thu, 20 Mar 2014 14:56:02 +0000 Subject: [PATCH 38/66] Fixed buggy wideBandAbsoprtionEmission::addIntensity by removing it --- .../wideBandAbsorptionEmission.C | 10 ---------- .../wideBandAbsorptionEmission.H | 8 -------- 2 files changed, 18 deletions(-) diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C index 17f7b3756..0dbb8d6d3 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C @@ -285,16 +285,6 @@ Foam::radiation::wideBandAbsorptionEmission::ECont(const label bandI) const return E; } -Foam::tmp -Foam::radiation::wideBandAbsorptionEmission::addIntensity -( - const label i, - const volScalarField& ILambda -) const -{ - return ILambda*(iBands_[i][1] - iBands_[i][0])/totalWaveLength_; -} - void Foam::radiation::wideBandAbsorptionEmission::correct ( diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H index ca262d5f4..dd49b5390 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H @@ -232,14 +232,6 @@ public: return iBands_[i]; } - //- Add contribution of ILambda to the total radiative intensity in - // direction i - tmp addIntensity - ( - const label i, - const volScalarField& ILambda - ) const; - void correct ( volScalarField& a_, From bf9db8f8aefd0ee7d1e6e34cf420625938961c1e Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Thu, 20 Mar 2014 16:25:34 +0000 Subject: [PATCH 39/66] Changed mesquite download link --- ThirdParty/AllMake.stage3 | 2 +- ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ThirdParty/AllMake.stage3 b/ThirdParty/AllMake.stage3 index 71cdb6999..d23e5ac62 100755 --- a/ThirdParty/AllMake.stage3 +++ b/ThirdParty/AllMake.stage3 @@ -87,7 +87,7 @@ fi # Mesquite if [ -z "$MESQUITE_SYSTEM" ] then - ( rpm_make -p mesquite-2.1.2 -s mesquite-2.1.2.spec -u http://software.sandia.gov/~jakraft/mesquite-2.1.2.tar.gz ) + ( rpm_make -p mesquite-2.1.2 -s mesquite-2.1.2.spec -u http://downloads.sourceforge.net/project/openfoam-extend/foam-extend-3.0/ThirdParty/mesquite-2.1.2.tar.gz ) else echo "Using system installed Mesquite" echo "" diff --git a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec index 57fc14701..7e9ba0824 100644 --- a/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec +++ b/ThirdParty/rpmBuild/SPECS/mesquite-2.1.2.spec @@ -75,7 +75,7 @@ License: Unkown Name: %{name} Version: %{version} Release: %{release} -URL: http://software.sandia.gov/~jakraft +URL: http://downloads.sourceforge.net/project/openfoam-extend/foam-extend-3.0/ThirdParty/ Source: %url/%{name}-%{version}.tar.gz Prefix: %{_prefix} Group: Development/Tools From 39f09a8abd19e918d1e65565af2f85f3e1b7d408 Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Thu, 3 Apr 2014 15:54:00 +0100 Subject: [PATCH 40/66] Changed v2 to v3 in remaining text files --- COPYING | 840 +++++++++++++++++++++++++++------------ README | 236 ----------- bin/foamGetSystemInfo | 2 +- bin/foamInstallationTest | 34 +- bin/foamProbe | 2 +- 5 files changed, 606 insertions(+), 508 deletions(-) delete mode 100644 README diff --git a/COPYING b/COPYING index ef7ab2332..94a9ed024 100644 --- a/COPYING +++ b/COPYING @@ -1,285 +1,626 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + TERMS AND CONDITIONS - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". + 0. Definitions. -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. + "This License" refers to version 3 of the GNU General Public License. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. -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 fee. + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. + A "covered work" means either the unmodified Program or a work based +on the Program. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. + 1. Source Code. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. + The Corresponding Source for a work in source code form is that +same work. -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. + 2. Basic Permissions. - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. + 13. Use with the GNU Affero General Public License. -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. + 14. Revised Versions of this License. - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. - NO WARRANTY + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. + 15. Disclaimer of Warranty. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - END OF TERMS AND CONDITIONS + 16. Limitation of Liability. - How to Apply These Terms to Your New Programs + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least +state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -304,37 +645,30 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README b/README deleted file mode 100644 index b196be006..000000000 --- a/README +++ /dev/null @@ -1,236 +0,0 @@ -# -*- mode: org; -*- -# -#+TITLE: *OpenFOAM README for version 1.6-ext* -#+AUTHOR: Hrvoje Jasak. -#+DATE: 12 November 2010 -#+LINK: http://www.extend-project.de -#+OPTIONS: author:nil - -* License - OpenFOAM is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any later - version. See the file COPYING in this directory, for a description of - the GNU General Public License terms under which you can copy the files. - -* System requirements - OpenFOAM is developed and tested on Linux and Mac OS X. - Experimental Microsoft Windows port is currently not released - please follow - the user forum and annoucements - - * Linux - To check your system setup, execute the foamSystemCheck script - in the bin/ directory of the OpenFOAM installation. If no problems are - reported, proceed to "3. Installation"; otherwise contact your system - administrator. - - If the user wishes to run OpenFOAM in 32/64-bit mode they should consult the - section "Running OpenFOAM in 32-bit mode". - - * Apple Mac OS X - The recommended way of running OpenFOAM on the Mac is to download sparse disk - images, mount them on your system and link them into - - ~/OpenFOAM/OpenFOAM- - ~/OpenFOAM/ThirdParty- - - Both disk images support case-sensitive file names. If you wish to compile - OpenFOAM and Third Party packs from scratch, please create a case-sensitive - disk image using the Disk Utility, mount them as above and unpack the sources - at appropriate places. The remainder of build instructions is identical - to Linux. - -* Installation - Download and unpack the files in the $HOME/OpenFOAM directory as described in: - http://www.extend-project.de/ - - The environment variable settings are contained in files in an etc/ directory - in the OpenFOAM release. e.g. in - - + $HOME/OpenFOAM/OpenFOAM-/etc/ - + where corresponds to the version 1.6-ext etc - - 1) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the - etc/bashrc file by adding the following line to the end of your - $HOME/.bashrc file: - - + . $HOME/OpenFOAM/OpenFOAM-/etc/bashrc - - Then update the environment variables by sourcing the $HOME/.bashrc file by - typing in the terminal: - - + . $HOME/.bashrc - - 2) OR, if running tcsh or csh, source the etc/cshrc file by adding the - following line to the end of your $HOME/.cshrc file: - - + source $HOME/OpenFOAM/OpenFOAM-/etc/cshrc - - Then update the environment variables by sourcing the $HOME/.cshrc file by - typing in the terminal: - - + source $HOME/.cshrc - -*** Installation in alternative locations - OpenFOAM may also be installed in alternative locations. However, the - installation directory should be network available (e.g., NFS) if parallel - calculations are planned. - - The environment variable 'FOAM_INST_DIR' can be used to find and source the - appropriate resource file. Here is a bash/ksh/sh example: - - + export FOAM_INST_DIR=/data/app/OpenFOAM - + foamDotFile=$FOAM_INST_DIR/OpenFOAM-/etc/bashrc - + [ -f $foamDotFile ] && . $foamDotFile - - and a csh/tcsh example: - - + setenv FOAM_INST_DIR /data/app/OpenFOAM - + set foamDotFile=$FOAM_INST_DIR/OpenFOAM-/etc/cshrc - + if ( -f $foamDotFile ) source $foamDotFile - - The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts - of the OpenFOAM installation. - -* Building the ThirdParty packages from Sources - A new way of compiling and installing the ThirdParty suite of packages is proposed with OpenFOAM-1.6-ext. - Please consult the file ThirdParty/README.ThirdParty a for more information. - -* Building from Sources (Optional) - If you cannot find an appropriate binary pack for your platform, you can - build the complete OpenFOAM from the source-pack. You will first need to - compile or obtain a recent version of gcc (we recomend native gcc, - coming with your operating system) for your platform, - which may be obtained from http://gcc.gnu.org/. - - Install the compiler in - $WM_PROJECT_INST_DIR/ThirdParty/gcc-/platforms/$WM_ARCH$WM_COMPILER_ARCH/ - and change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and - $WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the - environment variables as in section 3. - - Now go to the top-level source directory $WM_PROJECT_DIR and execute the - top-level build script './Allwmake'. In principle this will build everything, - but if problems occur with the build order it may be necessary to update the - environment variables and re-execute 'Allwmake'. If you experience - difficulties with building the source-pack, or your platform is not currently - supported, please contact to negotiate a support - contract and we will do the port and maintain it for future releases. - -* Testing the installation - To check your installation setup, execute the 'foamInstallationTest' script - (in the bin/ directory of the OpenFOAM installation). If no problems are - reported, proceed to getting started with OpenFOAM; otherwise, go back and - check you have installed the software correctly and/or contact your system - administrator. - -* Getting Started - Create a project directory within the $HOME/OpenFOAM directory named - - (e.g. 'jasak-1.6-ext' for user jasak and OpenFOAM - version 1.6-ext) - and create a directory named 'run' within it, e.g. by typing: - - + mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run - - Copy the 'tutorial' examples directory in the OpenFOAM distribution to the - 'run' directory. If the OpenFOAM environment variables are set correctly, - then the following command will be correct: - - + cp -r $WM_PROJECT_DIR/tutorials - $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run - - Run the first example case of incompressible laminar flow in a cavity: - - + cd $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run/tutorials/incompressible/icoFoam/cavity - + blockMesh - + icoFoam - + paraFoam - -* Documentation and Community resources - http://www.extend-project.de/ - http://openfoamwiki.net/ - http://www.cfd-online.com/ Software->OpenFOAM - - -* Reporting Bugs in OpenFOAM - Please report all bugs and feature requests using our bug tracking system: - http://sourceforge.net/apps/mantisbt/openfoam-extend/main_page.php or - http://www.extend-project.de/project-final/openfoam-extend-bug-tracker - Please also report bugs at the CFD-Online User Forum. - -* Running OpenFOAM in 32-bit mode on 64-bit machines - Linux users with a 64-bit machine may install either the OpenFOAM 32-bit - version (linux) or the OpenFOAM 64-bit version (linux64), or both. The 64-bit - is the default mode on a 64-bit machine. To use an installed 32-bit version, - the user must set the environment variable $WM_32 (to anything, e.g. "on") - before sourcing the etc/bashrc (or etc/cshrc) file. - -* Instructions on how to contribute - http://www.extend-project.de/project-final/how-to-contribute - -* List of Contributors - Henry Weller - Hrvoje Jasak - Mattijs Janssens - Zeljko Tukovic - Bernhard Gschaider - Tommaso Lucchini - Martin Beaudoin - Sandeep Menon - Niklas Nordin - Eugene De Villiers - Henrik Rusche - Ivor Clifford - Philiposse Rajan - Gavin Tabor - Jovani Favero - Frank Bos - David Hill - Niklas Wikstrom - Dubravko Matijasevic - Darrin Stephens - Christian Beck - Oliver Borm - James Criner - Hua Shan - David Boner - Pierre-Olivier Dallaire - Norman Del Puppo - Dennis Kingsley - Frank Albina - Flavio Galeazzo - Hannes Kroger - Olivier Petit - David Schmidt - Andreas Feymark - Luca Mangani - Daniel Schmode - Christoph Goniva - Takuya Oshima - Juho Peltola - Eric Paterson - Fabian Peng Karrholm - Aleksandar Karac - Maria Garcia Camprubi - Chris Greenshields - Mark Olesen - Hilary Spencer - Andy Heather -# -*- mode: org; -*- -# -#+TITLE: *OpenFOAM README for version 1.6-ext* -#+AUTHOR: Hrvoje Jasak. -#+DATE: 12 November 2010 -#+LINK: http://www.extend-project.de -#+OPTIONS: author:nil - -* Copyright - OpenFOAM is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any later - version. See the file COPYING in this directory, for a description of - the GNU General Public License terms under which you can copy the files. - -* System requirements - OpenFOAM is developed and tested on Linux and Mac OS X. - E diff --git a/bin/foamGetSystemInfo b/bin/foamGetSystemInfo index e41ff8ee0..f32e52b43 100755 --- a/bin/foamGetSystemInfo +++ b/bin/foamGetSystemInfo @@ -11,7 +11,7 @@ # # OpenFOAM is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your +# Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT diff --git a/bin/foamInstallationTest b/bin/foamInstallationTest index edb861054..bb83a7d34 100755 --- a/bin/foamInstallationTest +++ b/bin/foamInstallationTest @@ -26,13 +26,13 @@ # foamInstallationTest # # Description -# Checks the machine system, the installation of OpenFOAM, and the user's -# personal configuration for running OpenFOAM. +# Checks the machine system, the installation of foam-extend, and the user's +# personal configuration for running foam-extend. # #------------------------------------------------------------------------------ # Base settings -FOAM_VERSION=1.6-ext +FOAM_VERSION=foam-extend-3.0 SUPPLIED_VERSION_GCC=4.3.3 MIN_VERSION_GCC=4.3.1 @@ -255,7 +255,7 @@ reportExecutable () { | cut -d" " -f3` if [ ! "$VERSION" = "$SUPPLIED_VERSION_GCC" ]; then echo "WARNING: gcc version does not match gcc supplied" \ - "with this release of OpenFOAM" + "with this release of foam-extend" echo " Supplied version: $SUPPLIED_VERSION_GCC" echo " User version : $VERSION" echo " Minimum required: $MIN_VERSION_GCC" @@ -284,7 +284,7 @@ reportExecutable () { else echo "`fixlen "$1" 9` `fixlen "$VERSION" 10`" echo "WARNING: Conflicting installations:" - echo " OpenFOAM settings : $APP_SPEC" + echo " foam-extend settings : $APP_SPEC" echo " current path : $APP_PATH" case $1 in icoFoam) @@ -381,14 +381,14 @@ checkSsh () { } -checkOpenFOAMEnvironment() { +checkFoamEnvironment() { [ -d "$WM_PROJECT_INST_DIR" ] && [ -d "$WM_THIRD_PARTY_DIR" ] || { echo "" - echo "FATAL ERROR: OpenFOAM environment not configured." + echo "FATAL ERROR: foam-extend environment not configured." echo "" - echo " Please refer to the installation section of the README file:" - echo " /OpenFOAM-${FOAM_VERSION}/README" - echo " to source the OpenFOAM environment." + echo " Please refer to the installation section of the file:" + echo " /${FOAM_VERSION}/ReleaseNotes-${FOAM_VERSION}" + echo " to source the foam-extend environment." echo "" exit 1 } @@ -409,7 +409,7 @@ checkUserShell() { # USER_CONFIG_TYPE="" echo "`fixlen "Shell:" $WIDTH` ${SHELL##*/}" echo "FATAL ERROR: Cannot identify the shell you are running." - echo " OpenFOAM ${FOAM_VERSION} is compatible with " + echo " ${FOAM_VERSION} is compatible with " echo " csh, tcsh, ksh and bash." echo FATALERROR=`expr $FATALERROR + 1`;; @@ -422,7 +422,7 @@ checkHostName() { echo "`fixlen "Host:" $WIDTH` ${HOST_NAME}" echo "FATAL ERROR: Cannot stat hostname." echo " Contact your system administrator, " - echo " OpenFOAM ${FOAM_VERSION} needs a valid " + echo " ${FOAM_VERSION} needs a valid " echo " hostname to function." echo FATALERROR=`expr $FATALERROR + 1` @@ -439,7 +439,7 @@ checkOS () { ;; *) echo "FATAL ERROR: Incompatible operating system \"$OS\"." - echo " OpenFOAM ${FOAM_VERSION} is currently " + echo " ${FOAM_VERSION} is currently " echo " available for Linux and SunOS only." echo FATALERROR=`expr $FATALERROR + 1` @@ -457,14 +457,14 @@ echo "Executing $0:" #------------------------------------------------------------------------------ heading "Checking basic setup..." hline -checkOpenFOAMEnvironment +checkFoamEnvironment checkUserShell checkHostName checkOS hline #------------------------------------------------------------------------------ -heading "Checking main OpenFOAM env variables..." +heading "Checking main foam-extend env variables..." COL1=`fixlen "Environment_variable" 21` COL2=`fixlen "Set_to_file_or_directory" 40` COL3="Valid" @@ -479,7 +479,7 @@ reportEnv '$WM_THIRD_PARTY_DIR' 'noPath' "yes" hline #------------------------------------------------------------------------------ -heading "Checking the OpenFOAM env variables set on the PATH..." +heading "Checking the foam-extend env variables set on the PATH..." hline echo "$COL1 $COL2 $COL3 $COL4 $COL5" hline @@ -492,7 +492,7 @@ reportEnv '$WM_DIR' '$PATH' "yes" hline #------------------------------------------------------------------------------ -heading "Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH..." +heading "Checking the foam-extend env variables set on the LD_LIBRARY_PATH..." hline echo "$COL1 $COL2 $COL3 $COL4 $COL5" hline diff --git a/bin/foamProbe b/bin/foamProbe index 3f155579b..a79f1d2ad 100755 --- a/bin/foamProbe +++ b/bin/foamProbe @@ -11,7 +11,7 @@ # # OpenFOAM is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your +# Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT From c6a04e7242baef030bc594ac3f2a94c227106782 Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Thu, 3 Apr 2014 16:00:47 +0100 Subject: [PATCH 41/66] Removed dependency on objectRegistry in constructor --- .../MarshakRadiationMixedFvPatchScalarField.C | 21 ++++++++++++----- ...iffusiveRadiationMixedFvPatchScalarField.C | 14 +++++------ ...iffusiveRadiationMixedFvPatchScalarField.C | 23 ++++++++++++------- 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C index e16b58f45..9a11b0c16 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C @@ -75,21 +75,30 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField TName_(dict.lookup("T")), emissivity_(readScalar(dict.lookup("emissivity"))) { - const scalarField& Tp = - lookupPatchField(TName_); - - refValue() = 4.0*radiation::sigmaSB.value()*pow4(Tp); - refGrad() = 0.0; - if (dict.found("value")) { fvPatchScalarField::operator= ( scalarField("value", dict, p.size()) ); + refValue() = scalarField("value", dict, p.size()); + + refGrad() = 0; + valueFraction() = 1; } else { + // No value given. Restart as fixedValue b.c. + + // Bugfix: Do not initialize from temperautre because it is unavailable + // when running, e.g. decomposePar and loading radiation as + // shared library. Initialize to zero instead. + // 26 Mar 2014 - DC + refValue() = 0; + + refGrad() = 0; + valueFraction() = 0; + fvPatchScalarField::operator=(refValue()); } } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C index c990b30e9..181a66edc 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C @@ -93,15 +93,15 @@ greyDiffusiveRadiationMixedFvPatchScalarField { // No value given. Restart as fixedValue b.c. - const scalarField& Tp = - lookupPatchField(TName_); + // Bugfix: Do not initialize from temperautre because it is unavailable + // when running, e.g. decomposePar and loading radiation as + // shared library. Initialize to zero instead. + // 26 Mar 2014 - DC - refValue() = - emissivity_*4.0*radiation::sigmaSB.value()*pow4(Tp) - /Foam::mathematicalConstant::pi; + refValue() = 0; - refGrad() = 0.0; - valueFraction() = 1.0; + refGrad() = 0; + valueFraction() = 1; fvPatchScalarField::operator=(refValue()); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C index af4fce40e..c2df23e43 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C @@ -79,23 +79,30 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField TName_(dict.lookup("T")), emissivity_(readScalar(dict.lookup("emissivity"))) { - const scalarField& Tp = - lookupPatchField(TName_); - - refValue() = - emissivity_*4.0*radiation::sigmaSB.value()*pow4(Tp) - /Foam::mathematicalConstant::pi; - refGrad() = 0.0; - if (dict.found("value")) { fvPatchScalarField::operator= ( scalarField("value", dict, p.size()) ); + refValue() = scalarField("value", dict, p.size()); + + refGrad() = 0; + valueFraction() = 1; } else { + // No value given. Restart as fixedValue b.c. + + // Bugfix: Do not initialize from temperautre because it is unavailable + // when running, e.g. decomposePar and loading radiation as + // shared library. Initialize to zero instead. + // 26 Mar 2014 - DC + refValue() = 0; + + refGrad() = 0; + valueFraction() = 1; + fvPatchScalarField::operator=(refValue()); } } From ba2fb578119d50abfd7f6a99d3faacbf57ec5a19 Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Thu, 3 Apr 2014 18:15:36 +0100 Subject: [PATCH 42/66] Updated buildInstructions --- ReleaseNotes-foam-extend-3.0 | 8 +- .../Manjaro/Compilation_Manjaro_64bit.txt | 167 ------------------ .../5.5/Compilation_Centos_5.5_64bit.txt | 164 ----------------- doc/buildInstructions/Fedora/Fedora19 | 55 ++++++ doc/buildInstructions/README | 13 ++ .../Compilation_Ubuntu_10.04.3_32-bit.txt | 112 ------------ .../Compilation_Ubuntu_10.04.3_64-bit.txt | 112 ------------ .../12.04/Compilation_Ubuntu_12.04_32-bit.txt | 120 ------------- .../12.04/Compilation_Ubuntu_12.04_64-bit.txt | 119 ------------- .../12.10/Compilation_Ubuntu_12.10_64-bit.txt | 131 -------------- .../Ubuntu/Ubuntu_12.04_and_13.10 | 58 ++++++ .../12.1/Compilation_openSUSE_12.1_64bit.txt | 124 ------------- 12 files changed, 131 insertions(+), 1052 deletions(-) delete mode 100644 doc/buildInstructions/Arch/Manjaro/Compilation_Manjaro_64bit.txt delete mode 100644 doc/buildInstructions/Centos/5.5/Compilation_Centos_5.5_64bit.txt create mode 100644 doc/buildInstructions/Fedora/Fedora19 create mode 100644 doc/buildInstructions/README delete mode 100644 doc/buildInstructions/Ubuntu/10.04/Compilation_Ubuntu_10.04.3_32-bit.txt delete mode 100644 doc/buildInstructions/Ubuntu/10.04/Compilation_Ubuntu_10.04.3_64-bit.txt delete mode 100644 doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_32-bit.txt delete mode 100644 doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_64-bit.txt delete mode 100644 doc/buildInstructions/Ubuntu/12.10/Compilation_Ubuntu_12.10_64-bit.txt create mode 100644 doc/buildInstructions/Ubuntu/Ubuntu_12.04_and_13.10 delete mode 100644 doc/buildInstructions/openSUSE/12.1/Compilation_openSUSE_12.1_64bit.txt diff --git a/ReleaseNotes-foam-extend-3.0 b/ReleaseNotes-foam-extend-3.0 index d0ee9c512..ffe6d3b4b 100644 --- a/ReleaseNotes-foam-extend-3.0 +++ b/ReleaseNotes-foam-extend-3.0 @@ -47,9 +47,11 @@ Contents: Apple Mac OS X. ** From source - Please refer to doc/buildInstructions/ for details. If you have - improvements or build instructions for a new system, please share them - with the community (see section "How to contribute", below). + Please refer to doc/buildInstructions/ for details. Further + installation instruction are available on the unofficial OpenFOAM Wiki: + http://openfoamwiki.net/index.php/Installation/Linux/foam-extend-3.0 + If you have improvements or build instructions for a new system, please + share them with the community (see section "How to contribute", below). ** Binary packages Binary packages are available for download at diff --git a/doc/buildInstructions/Arch/Manjaro/Compilation_Manjaro_64bit.txt b/doc/buildInstructions/Arch/Manjaro/Compilation_Manjaro_64bit.txt deleted file mode 100644 index f0174364d..000000000 --- a/doc/buildInstructions/Arch/Manjaro/Compilation_Manjaro_64bit.txt +++ /dev/null @@ -1,167 +0,0 @@ -Installation of OpenFOAM-1.6-ext on Arch - Manjaro --------------------------------------------------- - -Update your Manjaro installation: - -pacman -Syyu - --------------------------------------------------------------------------------- - -# Installation of additional system packages: - -pacman -S git -pacman -S mercurial -pacman -S graphviz -pacman -S doxygen - --------------------------------------------------------------------------------- - -# Minor correction for make/gmake -sudo ln -s /usr/bin/make /usr/local/bin/gmake - --------------------------------------------------------------------------------- - -# Installation of rpm version 5.2.1 from source code - -# Compilation of beecrypt-4.2.1 -cd /tmp -wget http://downloads.sourceforge.net/project/beecrypt/beecrypt/4.2.1/beecrypt-4.2.1.tar.gz -tar -zxvf beecrypt-4.2.1.tar.gz -cd beecrypt-4.2.1; -./configure --without-python --without-cplusplus -make -sudo make install - -# Compilation of rpm-5.2.1 -cd /tmp -wget https://launchpad.net/rpm/5.2/5.2.1/+download/rpm-5.2.1.tar.gz -tar -zxvf rpm-5.2.1.tar.gz -cd rpm-5.2.1 -./configure -make -sudo make install -# The rpm command is now available under /usr/local/bin/rpm - -# Cleanup -cd /tmp -rm -rf beecrypt-4.2.1 beecrypt-4.2.1.tar.gz rpm-5.2.1 rpm-5.2.1.tar.gz - --------------------------------------------------------------------------------- - -# Download OpenFOAM-1.6-ext - -mkdir ~/OpenFOAM -cd ~/OpenFOAM -git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext - --------------------------------------------------------------------------------- - -# We need to tweak our OpenFOAM setup using the prefs.sh file - -cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE \ - ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# We are going to use version 4.6.4 of gcc, provided by the ThirdParty packages -# -# The version of gcc 4.8.1 provided by Manjaro is too recent for the git 'master' branch. -# -# So the system installed compiler will only serve to compile gcc 4.6.4. - -# Modify the etc/prefs.sh file to switch to gcc 4.6.4 -sed -i s/"compilerInstall=System"/"compilerInstall=OpenFOAM\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -# Activate the compilation of gcc 4.6.4 in the ThirdParty/AllMake.stage1 file -sed -i 0,/"#( rpm_make -p gmp-5.1.2"/s//"( rpm_make -p gmp-5.1.2"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1 -sed -i 0,/"#( rpm_make -p mpfr-3.1.2"/s//"( rpm_make -p mpfr-3.1.2"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1 -sed -i 0,/"#( rpm_make -p mpc-1.0.1"/s//"( rpm_make -p mpc-1.0.1"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1 -sed -i 0,/"#( rpm_make -p gcc-4.6.4"/s//"( rpm_make -p gcc-4.6.4"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1 - --------------------------------------------------------------------------------- - -# We are going to use the version of QT4 provided by Manjaro -# Unfortunately, the 'qmake' command on Manjaro is called 'qmake-qt4' -# The compilation script for ParaView requires a command called 'qmake'. -# So we are going to make a symbolic link in order to create a 'qmake' command, -# but this should be seen as a bad fix. A much better fix will be contributed under -# 'nextRelease' branch. Until then, this will have to do. - -sudo ln -s /usr/bin/qmake-qt4 /usr/local/bin/qmake - - -# Uncomment and modify the initialization of the variables QT_DIR in the -# file prefs.sh - -sed -i s/"#export QT_DIR=path_to_system_installed_qt"/"export QT_DIR=\/usr\/local"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export QT_BIN_DIR=\$QT_DIR\/bin"/"export QT_BIN_DIR=\$QT_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - - -# This section of the prefs.sh file should now look like this: - -#export QT_THIRD_PARTY=1 -export QT_DIR=/usr/local -export QT_BIN_DIR=$QT_DIR/bin - - --------------------------------------------------------------------------------- - -# Source this initial OpenFOAM environment to get the basic configuration for -# compilation -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# You will get some warnings about missing file for gcc-4.6.4, and problem with -# your compiler installation. -# This is quite normal, your gcc-4.6.4 compiler is not even compiled and -# installed yet. Patience patience... - -# Compile the ThirdParty packages, including the gcc 4.6.4 compiler - -cd $WM_PROJECT_DIR/ThirdParty -./AllMake >& log.AllMake & -tail -f log.AllMake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Update your OpenFOAM environment to get the basic configuration from the newly -# compiled ThirdParty packages - -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile OpenFOAM-1.6-ext - -cd $WM_PROJECT_DIR -./Allwmake >& log.Allwmake & -tail -f log.Allwmake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Execute Allwmake a second time because of a bad library building sequence for -# the library -lfaceDecompositionMotionSolver - -./Allwmake >& log.Allwmake2 & -tail -f log.Allwmake2 # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Run a tutorial to check the basic functionality - -cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily -blockMesh >& log.blockMesh -simpleFoam >& log.simpleFoam -paraFoam - --------------------------------------------------------------------------------- - -# You can also generate the Doxygen documentation, which is quite handy if -# you plan to poke around the OpenFOAM source code - -cd $WM_PROJECT_DIR/doc -./Allwmake - - -# You are done! - --------------------------------------------------------------------------------- -Martin Beaudoin -October 2013 diff --git a/doc/buildInstructions/Centos/5.5/Compilation_Centos_5.5_64bit.txt b/doc/buildInstructions/Centos/5.5/Compilation_Centos_5.5_64bit.txt deleted file mode 100644 index b320197b6..000000000 --- a/doc/buildInstructions/Centos/5.5/Compilation_Centos_5.5_64bit.txt +++ /dev/null @@ -1,164 +0,0 @@ -Installation of OpenFOAM-1.6-ext on Centos 5.5 64-bit --------------------------------------------------------------------------------- - -Network download and installation from: -ftp://mirrors.usc.edu/pub/linux/distributions/centos/5.5/os/x86_64/ - -Basic configuration: - Desktop - Gnome - Packages from CentOS Extras: unchecked - - Complete installation log: /root/install.log - -Run Package updater to update your installation - --------------------------------------------------------------------------------- - -Add your user as a valid user for the command 'sudo'. - -You will need to use the command 'visudo' as the user root for this. - -I won't go into the details for this, there is a lot of info all over the Net -for doing this relatively minor adjustment. - -In doubt, simply ask your local Unix guru. - --------------------------------------------------------------------------------- - -# Add the EPEL package repository: -sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm - --------------------------------------------------------------------------------- - -# Installation of additional system packages: - -sudo yum install git-1.7.4.1-1.el5.x86_64 -sudo yum install gcc.x86_64 gcc-c++.x86_64 -sudo yum install bison.x86_64 -sudo yum install flex.x86_64 -sudo yum install rpm-build-4.4.2.3-22.el5.x86_64 -sudo yum install zlib-devel-1.2.3-3.x86_64 -sudo yum install libX11-devel.x86_64 -sudo yum install libXext-devel.x86_64 -sudo yum install libXrender-devel.x86_64 -sudo yum install libXt-devel-1.0.2-3.2.el5.x86_64 - -# You can also install everything at once: - -sudo yum install \ - git-1.7.4.1-1.el5.x86_64 \ - gcc.x86_64 gcc-c++.x86_64 \ - bison.x86_64 \ - flex.x86_64 \ - rpm-build-4.4.2.3-22.el5.x86_64 \ - zlib-devel-1.2.3-3.x86_64 \ - libX11-devel.x86_64 \ - libXext-devel.x86_64 \ - libXrender-devel.x86_64 \ - libXt-devel-1.0.2-3.2.el5.x86_64 - --------------------------------------------------------------------------------- - -# Download OpenFOAM-1.6-ext - -mkdir ~/OpenFOAM -cd ~/OpenFOAM -git clone git://git.code.sf.net/p/openfoam-extend/OpenFOAM-1.6-ext - - --------------------------------------------------------------------------------- - -# We need to tweak our OpenFOAM setup using the prefs.sh file - -cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE \ - ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# We are going to use version 4.4.5 of gcc, provided by the ThirdParty packages -# -# The versions provided by Centos 5.5 are either too old, or a just a preview -# version of gcc 4.4.0, which is a bit 'green'. -# -# So the system installed compiler will only serve to compile gcc 4.4.5. - -# Modify the etc/prefs.sh file to switch to gcc 4.4.5 -sed -i s/"compilerInstall=System"/"compilerInstall=OpenFOAM\nWM_COMPILER=Gcc44"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -# Activate the compilation of gcc 4.4.5 in the ThirdParty/AllMake.stage1 file -sed -i 0,/"#( rpm_make -p gmp-5.0.1"/s//"( rpm_make -p gmp-5.0.1"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1 -sed -i 0,/"#( rpm_make -p mpfr-3.0.1"/s//"( rpm_make -p mpfr-3.0.1"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1 -sed -i 0,/"#( rpm_make -p gcc-4.4.5"/s//"( rpm_make -p gcc-4.4.5"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1 - -# Add the wmake rules set for Gcc44 -ln -s ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc ~/OpenFOAM/OpenFOAM-1.6-ext/wmake/rules/linux64Gcc44 - --------------------------------------------------------------------------------- - - -# We are going to use the version of QT4 provided by the ThirdParty packages - -# Uncomment and modify the initialization of the variables QT_THIRD_PARTY in the -# file prefs.sh - -sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -# This section of the prefs.sh file should now look like this: - -export QT_THIRD_PARTY=1 -#export QT_DIR=path_to_system_installed_qt -#export QT_BIN_DIR=$QT_DIR/bin - - --------------------------------------------------------------------------------- - -# Source this initial OpenFOAM environment to get the basic configuration for -# compilation -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# You will get some warnings about missing file for gcc-4.4.5, and problem with -# your compiler installation. -# This is quite normal, your gcc-4.4.5 compiler is not even compiled and -# installed yet. Patience patience... - -# Compile the ThirdParty packages, including the gcc 4.4.5 compiler - -cd $WM_PROJECT_DIR/ThirdParty -./AllMake >& log.AllMake & -tail -f log.AllMake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Update your OpenFOAM environment to get the basic configuration from the newly -# compiled ThirdParty packages - -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile OpenFOAM-1.6-ext - -cd $WM_PROJECT_DIR -./Allwmake >& log.Allwmake & -tail -f log.Allwmake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Execute Allwmake a second time because of a bad library building sequence for -# the library -lfaceDecompositionMotionSolver - -./Allwmake >& log.Allwmake2 & -tail -f log.Allwmake2 # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Run a tutorial to check the basic functionality - -cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily -blockMesh >& log.blockMesh -simpleFoam >& log.simpleFoam -paraFoam - -# You are done! - --------------------------------------------------------------------------------- -Martin Beaudoin -August 2011 diff --git a/doc/buildInstructions/Fedora/Fedora19 b/doc/buildInstructions/Fedora/Fedora19 new file mode 100644 index 000000000..34512044a --- /dev/null +++ b/doc/buildInstructions/Fedora/Fedora19 @@ -0,0 +1,55 @@ +Below are build instructions for Fedora 19: + +These instructions assume that you install in the default location, which is +~/foam/ . Create this folder with: + + cd ~ + mkdir foam + + +* Obtain and unpack source code (if you read this, you probably already have): + +The recommended way is to get the source code through git source code +management system. This way, you can get updates and bugfixes easily by running +"git pull". To install into the default location run: + + cd ~/foam + git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 + + +Alternatively, you can download a snapshot (.tgz) of the source code from: +http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/ + + +* Install required packages: + + sudo yum groupinstall "Development Tools" + sudo yum install gcc-c++ binutils-devel bison flex m4 zlib-devel \ + qt-devel qtwebkit-devel mercurial + +* Set environment variables: + + cd ~/foam/foam-extend-3.0 + . etc/bashrc + +Optionally, set environment variable for Qt to compile ParaView: + + export QT_BIN_DIR=/usr/lib64/qt4/bin + +Optionally, set environment variable for compiling Cuda solvers, for example +(replace "sm_30" with value according to your GPU architecture): + + export CUDA_ARCH=sm_30 + + +* Compile: + + ./Allwmake.firstInstall + + +* Create user directory: + + mkdir -p $FOAM_RUN + + +And you are ready to start. diff --git a/doc/buildInstructions/README b/doc/buildInstructions/README new file mode 100644 index 000000000..12dd52819 --- /dev/null +++ b/doc/buildInstructions/README @@ -0,0 +1,13 @@ +Here you can find build instructions for foam-extend-3.0 . The instructions for +different Linux distributions are in corresponding sub-folders. If you need to +take different or additional steps to get foam-extend compiled on your machine, +please file a bug at http://sourceforge.net/apps/mantisbt/openfoam-extend/. + +If you compiled/installed on a Linux distribution that is not listed here, +please contribute to the project and submit installation instructions. Contact +the project admins on http://sourceforge.net/projects/openfoam-extend/ for +details. + +Please also refer to the unofficial OpenFOAM Wiki for additional installation +instructions: +http://openfoamwiki.net/index.php/Installation/Linux/foam-extend-3.0 diff --git a/doc/buildInstructions/Ubuntu/10.04/Compilation_Ubuntu_10.04.3_32-bit.txt b/doc/buildInstructions/Ubuntu/10.04/Compilation_Ubuntu_10.04.3_32-bit.txt deleted file mode 100644 index 312642365..000000000 --- a/doc/buildInstructions/Ubuntu/10.04/Compilation_Ubuntu_10.04.3_32-bit.txt +++ /dev/null @@ -1,112 +0,0 @@ -Installation of OpenFOAM-1.6-ext on Ubuntu 10.04.3 32-bit - -- Proceed with the installation of the OS -- Update your OS installation using "Update Manager". -- If asked to reboot your system, please do so. - --------------------------------------------------------------------------------- - -# Installation of additional system packages: -git: sudo apt-get install git-core -flex: sudo apt-get install flex -bison: sudo apt-get install bison -rpm: sudo apt-get install rpm -g++: sudo apt-get install g++ -libz: sudo apt-get install zlib1g-dev -binutils-dev : sudo apt-get install binutils-dev -qt4: sudo apt-get install libqt4-dev qt4-dev-tools - -libxext: sudo apt-get install libxext-dev -libxt : sudo apt-get install libxt-dev - -# You can also install everything at once: -sudo apt-get install git-core flex bison rpm g++ zlib1g-dev binutils-dev \ - libqt4-dev qt4-dev-tools libxext-dev libxt-dev - --------------------------------------------------------------------------------- - -# Minor correction for make/gmake -sudo ln -s /usr/bin/make /usr/bin/gmake - --------------------------------------------------------------------------------- - -# Installation of libstdc++.so.5: - -For Ubuntu 32bit: ------------------ -Grab the package libstdc++5_3.3.6-24_i386.deb from one of the sites listed here: -http://packages.debian.org/lenny/i386/libstdc++5/download - -wget http://ftp.us.debian.org/debian/pool/main/g/gcc-3.3/libstdc++5_3.3.6-24_i386.deb -dpkg-deb -x ./libstdc++5_3.3.6-24_i386.deb /tmp/tmp_dir - -sudo cp /tmp/tmp_dir/usr/lib/libstdc++.so.5.0.7 /usr/lib/ -sudo ln -s /usr/lib/libstdc++.so.5.0.7 /usr/lib/libstdc++.so.5 -rm -rf /tmp/tmp_dir - --------------------------------------------------------------------------------- - -# Download OpenFOAM-1.6-ext -mkdir ~/OpenFOAM -cd ~/OpenFOAM -git clone git://git.code.sf.net/p/openfoam-extend/OpenFOAM-1.6-ext - --------------------------------------------------------------------------------- - -# We are going to use the system installed version of QT4 -cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -#Uncomment and modify the initialization of the variables QT_DIR and QT_BIN_DIR in the file prefs.sh - -sed -i s/"#export QT_DIR=path_to_system_installed_qt"/"export QT_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export QT_BIN_DIR=\$QT_DIR\/bin"/"export QT_BIN_DIR=\$QT_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -# This section of the prefs.sh file should now look like this: - -#export QT_THIRD_PARTY=1 -export QT_DIR=/usr -export QT_BIN_DIR=$QT_DIR/bin - --------------------------------------------------------------------------------- - -# Source your OpenFOAM environment to get the basic configuration for -# compilation -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile the ThirdParty packages -cd $WM_PROJECT_DIR/ThirdParty -./AllMake >& log.AllMake & -tail -f log.AllMake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Update your OpenFOAM environment to get the basic configuration from the newly -# compiled ThirdParty packages -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile OpenFOAM-1.6-ext -cd $WM_PROJECT_DIR -./Allwmake >& log.Allwmake & -tail -f log.Allwmake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Execute Allwmake a second time because of a bad library building sequence for -# the library -lfaceDecompositionMotionSolver - -./Allwmake >& log.Allwmake2 & -tail -f log.Allwmake2 # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Run a tutorial to check the basic functionality -cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily -blockMesh >& log.blockMesh -simpleFoam >& log.simpleFoam -paraFoam - -# You are done! - --------------------------------------------------------------------------------- -Martin Beaudoin -August 2011 diff --git a/doc/buildInstructions/Ubuntu/10.04/Compilation_Ubuntu_10.04.3_64-bit.txt b/doc/buildInstructions/Ubuntu/10.04/Compilation_Ubuntu_10.04.3_64-bit.txt deleted file mode 100644 index fce775580..000000000 --- a/doc/buildInstructions/Ubuntu/10.04/Compilation_Ubuntu_10.04.3_64-bit.txt +++ /dev/null @@ -1,112 +0,0 @@ -Installation of OpenFOAM-1.6-ext on Ubuntu 10.04.3 64-bit - -- Proceed with the installation of the OS -- Update your OS installation using "Update Manager". -- If asked to reboot your system, please do so. - --------------------------------------------------------------------------------- - -# Installation of additional system packages: -git: sudo apt-get install git-core -flex: sudo apt-get install flex -bison: sudo apt-get install bison -rpm: sudo apt-get install rpm -g++: sudo apt-get install g++ -libz: sudo apt-get install zlib1g-dev -binutils-dev : sudo apt-get install binutils-dev -qt4: sudo apt-get install libqt4-dev qt4-dev-tools - -libxext: sudo apt-get install libxext-dev -libxt : sudo apt-get install libxt-dev - -# You can also install everything at once: -sudo apt-get install git-core flex bison rpm g++ zlib1g-dev binutils-dev \ - libqt4-dev qt4-dev-tools libxext-dev libxt-dev - --------------------------------------------------------------------------------- - -# Minor correction for make/gmake -sudo ln -s /usr/bin/make /usr/bin/gmake - --------------------------------------------------------------------------------- - -# Installation of libstdc++.so.5: - -For Ubuntu 64bit: ------------------ -Grab the package libstdc++5_3.3.6-24_amd64.deb from one of the sites listed here: -http://packages.debian.org/lenny/amd64/Libstdc++5/download - -wget http://ftp.us.debian.org/debian/pool/main/g/gcc-3.3/libstdc++5_3.3.6-24_amd64.deb -dpkg-deb -x ./libstdc++5_3.3.6-24_amd64.deb /tmp/tmp_dir - -sudo cp /tmp/tmp_dir/usr/lib/libstdc++.so.5.0.7 /usr/lib/ -sudo ln -s /usr/lib/libstdc++.so.5.0.7 /usr/lib/libstdc++.so.5 -rm -rf /tmp/tmp_dir - --------------------------------------------------------------------------------- - -# Download OpenFOAM-1.6-ext -mkdir ~/OpenFOAM -cd ~/OpenFOAM -git clone git://git.code.sf.net/p/openfoam-extend/OpenFOAM-1.6-ext - --------------------------------------------------------------------------------- - -# We are going to use the system installed version of QT4 -cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -#Uncomment and modify the initialization of the variables QT_DIR and QT_BIN_DIR in the file prefs.sh - -sed -i s/"#export QT_DIR=path_to_system_installed_qt"/"export QT_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export QT_BIN_DIR=\$QT_DIR\/bin"/"export QT_BIN_DIR=\$QT_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -# This section of the prefs.sh file should now look like this: - -#export QT_THIRD_PARTY=1 -export QT_DIR=/usr -export QT_BIN_DIR=$QT_DIR/bin - --------------------------------------------------------------------------------- - -# Source your OpenFOAM environment to get the basic configuration for -# compilation -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile the ThirdParty packages -cd $WM_PROJECT_DIR/ThirdParty -./AllMake >& log.AllMake & -tail -f log.AllMake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Update your OpenFOAM environment to get the basic configuration from the newly -# compiled ThirdParty packages -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile OpenFOAM-1.6-ext -cd $WM_PROJECT_DIR -./Allwmake >& log.Allwmake & -tail -f log.Allwmake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Execute Allwmake a second time because of a bad library building sequence for -# the library -lfaceDecompositionMotionSolver - -./Allwmake >& log.Allwmake2 & -tail -f log.Allwmake2 # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Run a tutorial to check the basic functionality -cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily -blockMesh >& log.blockMesh -simpleFoam >& log.simpleFoam -paraFoam - -# You are done! - --------------------------------------------------------------------------------- -Martin Beaudoin -August 2011 diff --git a/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_32-bit.txt b/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_32-bit.txt deleted file mode 100644 index 93c7469d8..000000000 --- a/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_32-bit.txt +++ /dev/null @@ -1,120 +0,0 @@ -Installation of OpenFOAM-1.6-ext on Ubuntu 12.04 32-bit - -- Proceed with the installation of the OS -- Update your OS installation using "Update Manager". -- If asked to reboot your system, please do so. - --------------------------------------------------------------------------------- - -# Installation of additional system packages: -git: sudo apt-get install git -flex: sudo apt-get install flex -bison: sudo apt-get install bison -rpm: sudo apt-get install rpm -g++: sudo apt-get install g++ -libz: sudo apt-get install zlib1g-dev -binutils-dev : sudo apt-get install binutils-dev -openmpi: sudo apt-get install openmpi-bin libopenmpi-dev -libxext: sudo apt-get install libxext-dev -libxt : sudo apt-get install libxt-dev -libXrender: sudo apt-get install libxrender-dev -libstdc++5: sudo apt-get install libstdc++5 -OpenGL: sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev - -# You can also install everything at once: -sudo apt-get install git flex bison rpm g++ zlib1g-dev binutils-dev \ - openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev \ - libstdc++5 libgl1-mesa-dev libglu1-mesa-dev - --------------------------------------------------------------------------------- - -# If you need to compile swak4Foam, it is a good idea to install Mercurial (hg) -# sudo apt-get install mercurial - --------------------------------------------------------------------------------- - -# Minor correction for make/gmake -sudo ln -s /usr/bin/make /usr/bin/gmake - --------------------------------------------------------------------------------- - -# Download OpenFOAM-1.6-ext -mkdir ~/OpenFOAM -cd ~/OpenFOAM -git clone git://git.code.sf.net/p/openfoam-extend/OpenFOAM-1.6-ext - --------------------------------------------------------------------------------- - -# Create the file etc/prefs.sh -cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# Use the system compiler -sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# Use the system installation of OpenMPI -sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export OPENMPI_DIR=path_to_system_installed_openmpi"/"export OPENMPI_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/"export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# About QT4 -# -# Ubuntu 12.04 comes with QT4 version 4.8.1 -# Even thoug ParaView will compile with this version of QT, ParaView will also generate a bunch of -# warnings on the console at runtime. So we will be using the version of QT4 supplied with the -# ThirdParty packages. - -#Uncomment the variable QT_THIRD_PARTY in the file prefs.sh - -sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -# This section of the prefs.sh file should now look like this: - -export QT_THIRD_PARTY=1 -#export QT_DIR=path_to_system_installed_qt -#export QT_BIN_DIR=$QT_DIR/bin - --------------------------------------------------------------------------------- - -# Source your OpenFOAM environment to get the basic configuration for -# compilation -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - --------------------------------------------------------------------------------- - -# Compile the ThirdParty packages -cd $WM_PROJECT_DIR/ThirdParty -./AllMake.stage1 >& log.AllMake.stage1 -#./AllMake.stage2 >& log.AllMake.stage2 # No need for this one -./AllMake.stage3 >& log.AllMake.stage3 -./AllMake.stage4 >& log.AllMake.stage4 - --------------------------------------------------------------------------------- - -# Update your OpenFOAM environment to get the basic configuration from the newly -# compiled ThirdParty packages -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile OpenFOAM-1.6-ext -cd $WM_PROJECT_DIR -./Allwmake >& log.Allwmake & -tail -f log.Allwmake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Run a tutorial to check the basic functionality -cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily -blockMesh >& log.blockMesh -simpleFoam >& log.simpleFoam -paraFoam - -# You are done! - --------------------------------------------------------------------------------- -Martin Beaudoin -May 2012 diff --git a/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_64-bit.txt b/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_64-bit.txt deleted file mode 100644 index 0c30f8bae..000000000 --- a/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_64-bit.txt +++ /dev/null @@ -1,119 +0,0 @@ -Installation of OpenFOAM-1.6-ext on Ubuntu 12.04 64-bit - -- Proceed with the installation of the OS -- Update your OS installation using "Update Manager". -- If asked to reboot your system, please do so. - --------------------------------------------------------------------------------- - -# Installation of additional system packages: -git: sudo apt-get install git -flex: sudo apt-get install flex -bison: sudo apt-get install bison -rpm: sudo apt-get install rpm -g++: sudo apt-get install g++ -libz: sudo apt-get install zlib1g-dev -binutils-dev : sudo apt-get install binutils-dev -openmpi: sudo apt-get install openmpi-bin libopenmpi-dev -libxext: sudo apt-get install libxext-dev -libxt : sudo apt-get install libxt-dev -libXrender: sudo apt-get install libxrender-dev -OpenGL: sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev - -# You can also install everything at once: -sudo apt-get install git flex bison rpm g++ zlib1g-dev binutils-dev \ - openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev \ - libgl1-mesa-dev libglu1-mesa-dev - --------------------------------------------------------------------------------- - -# If you need to compile swak4Foam, it is a good idea to install Mercurial (hg) -# sudo apt-get install mercurial - --------------------------------------------------------------------------------- - -# Minor correction for make/gmake -sudo ln -s /usr/bin/make /usr/bin/gmake - --------------------------------------------------------------------------------- - -# Download OpenFOAM-1.6-ext -mkdir ~/OpenFOAM -cd ~/OpenFOAM -git clone git://git.code.sf.net/p/openfoam-extend/OpenFOAM-1.6-ext - --------------------------------------------------------------------------------- - -# Create the file etc/prefs.sh -cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# Use the system compiler -sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# Use the system installation of OpenMPI -sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export OPENMPI_DIR=path_to_system_installed_openmpi"/"export OPENMPI_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/"export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# About QT4 -# -# Ubuntu 12.04 comes with QT4 version 4.8.1 -# Even thoug ParaView will compile with this version of QT, ParaView will also generate a bunch of -# warnings on the console at runtime. So we will be using the version of QT4 supplied with the -# ThirdParty packages. - -#Uncomment the variable QT_THIRD_PARTY in the file prefs.sh - -sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -# This section of the prefs.sh file should now look like this: - -export QT_THIRD_PARTY=1 -#export QT_DIR=/usr -#export QT_BIN_DIR=$QT_DIR/bin - --------------------------------------------------------------------------------- - -# Source your OpenFOAM environment to get the basic configuration for -# compilation -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - --------------------------------------------------------------------------------- - -# Compile the ThirdParty packages -cd $WM_PROJECT_DIR/ThirdParty -./AllMake.stage1 >& log.AllMake.stage1 -#./AllMake.stage2 >& log.AllMake.stage2 # No need for this one -./AllMake.stage3 >& log.AllMake.stage3 -./AllMake.stage4 >& log.AllMake.stage4 - --------------------------------------------------------------------------------- - -# Update your OpenFOAM environment to get the basic configuration from the newly -# compiled ThirdParty packages -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile OpenFOAM-1.6-ext -cd $WM_PROJECT_DIR -./Allwmake >& log.Allwmake & -tail -f log.Allwmake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Run a tutorial to check the basic functionality -cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily -blockMesh >& log.blockMesh -simpleFoam >& log.simpleFoam -paraFoam - -# You are done! - --------------------------------------------------------------------------------- -Martin Beaudoin -May 2012 diff --git a/doc/buildInstructions/Ubuntu/12.10/Compilation_Ubuntu_12.10_64-bit.txt b/doc/buildInstructions/Ubuntu/12.10/Compilation_Ubuntu_12.10_64-bit.txt deleted file mode 100644 index fe17ad103..000000000 --- a/doc/buildInstructions/Ubuntu/12.10/Compilation_Ubuntu_12.10_64-bit.txt +++ /dev/null @@ -1,131 +0,0 @@ -Installation of OpenFOAM-1.6-ext on Ubuntu 12.10 64-bit - -- Proceed with the installation of the OS -- Update your OS installation using "Update Manager". -- If asked to reboot your system, please do so. - --------------------------------------------------------------------------------- - -# Installation of additional system packages: -git: sudo apt-get install git -flex: sudo apt-get install flex -bison: sudo apt-get install bison -rpm: sudo apt-get install rpm -g++: sudo apt-get install g++ -libz: sudo apt-get install zlib1g-dev -binutils-dev : sudo apt-get install binutils-dev -openmpi: sudo apt-get install openmpi-bin libopenmpi-dev -libxext: sudo apt-get install libxext-dev -libxt : sudo apt-get install libxt-dev -libXrender: sudo apt-get install libxrender-dev -OpenGL: sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev -Python-dev: sudo apt-get install python-dev - -# You can also install everything at once: -sudo apt-get install git flex bison rpm g++ zlib1g-dev binutils-dev \ - openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev \ - libgl1-mesa-dev libglu1-mesa-dev python-dev - --------------------------------------------------------------------------------- - -# If you need to compile swak4Foam, it is a good idea to install Mercurial (hg) -# and Subversion (svn) -# sudo apt-get install mercurial -# sudo apt-get install subversion - --------------------------------------------------------------------------------- - -# Minor correction for make/gmake -sudo ln -s /usr/bin/make /usr/bin/gmake - --------------------------------------------------------------------------------- - -# Download OpenFOAM-1.6-ext -mkdir ~/OpenFOAM -cd ~/OpenFOAM -git clone git://git.code.sf.net/p/openfoam-extend/OpenFOAM-1.6-ext - --------------------------------------------------------------------------------- - -# Create the file etc/prefs.sh -cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# Use the system compiler -sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# Use the version of OpenMPI supplied with the ThirdParty packages -# The version of OpenMPI supplied by Ubuntu 12.10 is 1.4.5, which is outdated -# So nothing to do here. - --------------------------------------------------------------------------------- - -# About QT4 -# -# Ubuntu 12.10 comes with QT4 version 4.8.3 -# Even thoug ParaView will compile with this version of QT, ParaView will also generate a bunch of -# warnings on the console at runtime. So we will be using the version of QT4 supplied with the -# ThirdParty packages. - -#Uncomment the variable QT_THIRD_PARTY in the file prefs.sh - -sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -# This section of the prefs.sh file should now look like this: - -export QT_THIRD_PARTY=1 -#export QT_DIR=/usr -#export QT_BIN_DIR=$QT_DIR/bin - --------------------------------------------------------------------------------- - -# About Paraview -# -# After a lot of trials, I just cannot find a way to make the OpenFOAM-1.6-ext reader -# work under Ubuntu 12 and ParaView-3.x. -# -# So use the command 'paraFoam -nativeReader' instead in order to start ParaView with the -# OpenFOAM built-in native reader. - --------------------------------------------------------------------------------- - -# Source your OpenFOAM environment to get the basic configuration for -# compilation -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - --------------------------------------------------------------------------------- - -# Compile the ThirdParty packages -cd $WM_PROJECT_DIR/ThirdParty -./AllMake.stage1 >& log.AllMake.stage1 -./AllMake.stage2 >& log.AllMake.stage2 -./AllMake.stage3 >& log.AllMake.stage3 -./AllMake.stage4 >& log.AllMake.stage4 - --------------------------------------------------------------------------------- - -# Update your OpenFOAM environment to get the basic configuration from the newly -# compiled ThirdParty packages -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile OpenFOAM-1.6-ext -cd $WM_PROJECT_DIR -./Allwmake >& log.Allwmake & -tail -f log.Allwmake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Run a tutorial to check the basic functionality -cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily -blockMesh >& log.blockMesh -simpleFoam >& log.simpleFoam -paraFoam -nativeReader - -# You are done! - --------------------------------------------------------------------------------- -Martin Beaudoin -July 2013 diff --git a/doc/buildInstructions/Ubuntu/Ubuntu_12.04_and_13.10 b/doc/buildInstructions/Ubuntu/Ubuntu_12.04_and_13.10 new file mode 100644 index 000000000..43af34c64 --- /dev/null +++ b/doc/buildInstructions/Ubuntu/Ubuntu_12.04_and_13.10 @@ -0,0 +1,58 @@ +Below are build instructions for Ubuntu 12.04 and Ubuntu 13.10. + +These instructions assume that you install in the default location, which is +~/foam/ . Create this folder with: + + cd ~ + mkdir foam + + +* Obtain and unpack source code (if you read this, you probably already have): + +The recommended way is to get the source code through git source code +management system. This way, you can get updates and bugfixes easily by running +"git pull". To install into the default location run: + + cd ~/foam + git clone git://git.code.sf.net/p/openfoam-extend/foam-extend-3.0 + + +Alternatively, you can download a snapshot (.tgz) of the source code from: +http://sourceforge.net/projects/openfoam-extend/files/foam-extend-3.0/ + + +* Install required packages: + + sudo apt-get install git-core build-essential binutils-dev flex bison \ + zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev libxt-dev rpm mercurial + +Make an additional link: + + sudo ln -s /usr/bin/make /usr/bin/gmake + +* Set environment variables: + + cd ~/foam/foam-extend-3.0 + . etc/bashrc + +Optionally, set environment variable for Qt to compile ParaView: + + export QT_BIN_DIR=/usr/bin + +Optionally, set environment variable for compiling Cuda solvers, for example +(replace "sm_30" with value according to your GPU architecture): + + export CUDA_ARCH=sm_30 + + +* Compile: + + ./Allwmake.firstInstall + + +* Create user directory: + + mkdir -p $FOAM_RUN + + +And you are ready to start. diff --git a/doc/buildInstructions/openSUSE/12.1/Compilation_openSUSE_12.1_64bit.txt b/doc/buildInstructions/openSUSE/12.1/Compilation_openSUSE_12.1_64bit.txt deleted file mode 100644 index 6bfa46857..000000000 --- a/doc/buildInstructions/openSUSE/12.1/Compilation_openSUSE_12.1_64bit.txt +++ /dev/null @@ -1,124 +0,0 @@ -Installation of OpenFOAM-1.6-ext on openSUSE 12.1 64-bit --------------------------------------------------------------------------------- - -We assume you have a fresh installation of openSUSE 12.1 64-bit, with all the -necessary updates already applied - --------------------------------------------------------------------------------- - -# Installation of additional system packages: - -sudo zypper install git -sudo zypper install openmpi-devel -sudo zypper install gnuplot -sudo zypper install -t pattern devel_qt4 - --------------------------------------------------------------------------------- - -# Download OpenFOAM-1.6-ext - -mkdir ~/OpenFOAM -cd ~/OpenFOAM -git clone git://git.code.sf.net/p/openfoam-extend/OpenFOAM-1.6-ext - - --------------------------------------------------------------------------------- - -# We need to tweak our OpenFOAM setup using the prefs.sh file - -cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE \ - ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# We are going to use version system installed version of gcc 4.6.2 - -# Modify the etc/prefs.sh file to switch to gcc 4.6.2 -sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - --------------------------------------------------------------------------------- - -# We are going to use the system installed version of openmpi-1.4.3 -# -# No need to run AllMake.stage2 -sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export OPENMPI_DIR=path_to_system_installed_openmpi"/"export OPENMPI_DIR=\/usr\/lib64\/mpi\/gcc\/openmpi"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/"export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - - --------------------------------------------------------------------------------- - -# We are going to use the system installed development version of Qt (Version: 4.7.4-19.6.1) - -# Uncomment and modify the initialization of the variables QT_DIR and QT_BIN_DIR in the -# file prefs.sh - -sed -i s/"#export QT_DIR=path_to_system_installed_qt"/"export QT_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh -sed -i s/"#export QT_BIN_DIR=\$QT_DIR\/bin"/"export QT_BIN_DIR=\$QT_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh - -# This section of the prefs.sh file should now look like this: - -#export QT_THIRD_PARTY=1 -export QT_DIR=/usr -export QT_BIN_DIR=$QT_DIR/bin - --------------------------------------------------------------------------------- - -# ParaView: -# -# Version 3.8.1 of ParaView does not compile with gcc 4.6.2 on openSUSE 12.1 -# -# I suggest you switch to ParaView 12.1 -# --------------------------------------------------------------------------------- - -# Source this initial OpenFOAM environment to get the basic configuration for -# compilation -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile the ThirdParty packages - -cd $WM_PROJECT_DIR/ThirdParty -./AllMake.stage1 >& log.AllMake.stage1 -./AllMake.stage3 >& log.AllMake.stage3 -./AllMake.stage4 >& log.AllMake.stage4 - -# You can keep an eye on the compilation process with the command tail e.g: -# tail -f log.AllMake.stage1 - --------------------------------------------------------------------------------- - -# Update your OpenFOAM environment to get the basic configuration from the newly -# compiled ThirdParty packages - -. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc - -# Compile OpenFOAM-1.6-ext - -cd $WM_PROJECT_DIR -./Allwmake >& log.Allwmake & -tail -f log.Allwmake # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Execute Allwmake a second time because of a bad library building sequence for -# the library -lfaceDecompositionMotionSolver -# Warning: Not sure if this is still necessary... MB 05/2012 - -./Allwmake >& log.Allwmake2 & -tail -f log.Allwmake2 # To keep an eye on the compilation process - --------------------------------------------------------------------------------- - -# Run a tutorial to check the basic functionality - -cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily -blockMesh >& log.blockMesh -simpleFoam >& log.simpleFoam -paraFoam - -# You are done! - --------------------------------------------------------------------------------- -Martin Beaudoin -May 2012 From 1179d296b3853feecd2c8ac85bbd508273055cdb Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Tue, 8 Apr 2014 13:21:30 +0100 Subject: [PATCH 43/66] Solved restart issue with corrected BCs --- .../MarshakRadiationMixedFvPatchScalarField.C | 5 +++-- .../greyDiffusiveRadiationMixedFvPatchScalarField.C | 6 ++++-- .../wideBandDiffusiveRadiationMixedFvPatchScalarField.C | 5 +++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C index 9a11b0c16..fb4c25079 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C @@ -77,11 +77,12 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField { if (dict.found("value")) { + refValue() = scalarField("value", dict, p.size()); + fvPatchScalarField::operator= ( - scalarField("value", dict, p.size()) + refValue() ); - refValue() = scalarField("value", dict, p.size()); refGrad() = 0; valueFraction() = 1; diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C index 181a66edc..b7b13b408 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C @@ -81,11 +81,13 @@ greyDiffusiveRadiationMixedFvPatchScalarField { if (dict.found("refValue")) { + refValue() = scalarField("value", dict, p.size()); + fvPatchScalarField::operator= ( - scalarField("value", dict, p.size()) + refValue() ); - refValue() = scalarField("refValue", dict, p.size()); + refGrad() = scalarField("refGradient", dict, p.size()); valueFraction() = scalarField("valueFraction", dict, p.size()); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C index c2df23e43..53b749cb1 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C @@ -81,11 +81,12 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField { if (dict.found("value")) { + refValue() = scalarField("value", dict, p.size()); + fvPatchScalarField::operator= ( - scalarField("value", dict, p.size()) + refValue() ); - refValue() = scalarField("value", dict, p.size()); refGrad() = 0; valueFraction() = 1; From 0709b52a69cacec8b51ed82b5a13c81f44f7980c Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Tue, 8 Apr 2014 13:35:54 +0100 Subject: [PATCH 44/66] Avoid race condition with single processor compilation of conjugateHeatFoam --- applications/solvers/coupled/{conjugateHeatFoam => }/Allwmake | 4 +++- applications/solvers/coupled/conjugateHeatFoam/Make/options | 2 +- .../solvers/coupled/conjugateHeatSimpleFoam/Make/options | 2 +- .../{conjugateHeatFoam => }/conjugateHeatTransfer/Make/files | 0 .../conjugateHeatTransfer/Make/options | 0 .../heatFlux/fieldAverageItem/fieldAverageItem.C | 0 .../heatFlux/fieldAverageItem/fieldAverageItem.H | 0 .../heatFlux/fieldAverageItem/fieldAverageItemIO.C | 0 .../functionObjects/heatFlux/heatFlux/IOFieldAverage.H | 0 .../functionObjects/heatFlux/heatFlux/detachPatches.H | 0 .../functionObjects/heatFlux/heatFlux/heatFlux.C | 0 .../functionObjects/heatFlux/heatFlux/heatFlux.H | 0 .../functionObjects/heatFlux/heatFlux/heatFluxTemplates.C | 0 .../heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.C | 0 .../heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.H | 0 .../fvPatchFields/adiabatic/adiabaticFvPatchScalarField.C | 0 .../fvPatchFields/adiabatic/adiabaticFvPatchScalarField.H | 0 .../chtRcTemperature/chtRcTemperatureFvPatchScalarField.C | 0 .../chtRcTemperature/chtRcTemperatureFvPatchScalarField.H | 0 .../chtRcThermalDiffusivityFvPatchScalarField.C | 0 .../chtRcThermalDiffusivityFvPatchScalarField.H | 0 .../chtRcThermalDiffusivityResistanceFvPatchScalarField.C | 0 .../chtRcThermalDiffusivityResistanceFvPatchScalarField.H | 0 .../chtRcThermalDiffusivitySlaveFvPatchScalarField.C | 0 .../chtRcThermalDiffusivitySlaveFvPatchScalarField.H | 0 .../fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.C | 0 .../fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.H | 0 .../controlledParabolicVelocityFvPatchVectorField.C | 0 .../controlledParabolicVelocityFvPatchVectorField.H | 0 .../extendedWallHeatTransferFvPatchScalarField.C | 0 .../extendedWallHeatTransferFvPatchScalarField.H | 0 .../extendedWallHeatTransfer/viewFactorRadiation.C | 0 .../extendedWallHeatTransfer/viewFactorRadiation.H | 0 .../externalRadiation/ersConstantFlux/ersConstantFlux.C | 0 .../externalRadiation/ersConstantFlux/ersConstantFlux.H | 0 .../externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.C | 0 .../externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.H | 0 .../externalRadiation/ersPointSource/ersPointSource.C | 0 .../externalRadiation/ersPointSource/ersPointSource.H | 0 .../externalRadiation/ersViewFactor/ersViewFactor.C | 0 .../externalRadiation/ersViewFactor/ersViewFactor.H | 0 .../externalRadiationSource/externalRadiationSource.C | 0 .../externalRadiationSource/externalRadiationSource.H | 0 .../externalRadiationSource/newExternalRadiationSource.C | 0 .../fvPatchFields/fieldStorage/fieldStorage.C | 0 .../fvPatchFields/fieldStorage/fieldStorage.H | 0 .../solidWallHeatFluxTemperatureFvPatchScalarField.C | 0 .../solidWallHeatFluxTemperatureFvPatchScalarField.H | 0 .../constantResistanceThermalGap.C | 0 .../constantResistanceThermalGap.H | 0 .../thermalGaps/constantThermalGap/constantThermalGap.C | 0 .../thermalGaps/constantThermalGap/constantThermalGap.H | 0 .../thermalModel/thermalGaps/thermalGap/newThermalGap.C | 0 .../thermalModel/thermalGaps/thermalGap/thermalGap.C | 0 .../thermalModel/thermalGaps/thermalGap/thermalGap.H | 0 .../thermalLaws/constantThermal/constantThermal.C | 0 .../thermalLaws/constantThermal/constantThermal.H | 0 .../thermalLaws/multiMaterialThermal/multiMaterialThermal.C | 0 .../thermalLaws/multiMaterialThermal/multiMaterialThermal.H | 0 .../multiMaterialZonesThermal/multiMaterialZonesThermal.C | 0 .../multiMaterialZonesThermal/multiMaterialZonesThermal.H | 0 .../thermalModel/thermalLaws/thermalLaw/newThermalLaw.C | 0 .../thermalModel/thermalLaws/thermalLaw/thermalLaw.C | 0 .../thermalModel/thermalLaws/thermalLaw/thermalLaw.H | 0 .../conjugateHeatTransfer/thermalModel/thermalModel.C | 0 .../conjugateHeatTransfer/thermalModel/thermalModel.H | 0 .../constantThermalSource/constantThermalSource.C | 0 .../constantThermalSource/constantThermalSource.H | 0 .../thermalSource/thermalSource/newThermalSource.C | 0 .../thermalModel/thermalSource/thermalSource/thermalSource.C | 0 .../thermalModel/thermalSource/thermalSource/thermalSource.H | 0 71 files changed, 5 insertions(+), 3 deletions(-) rename applications/solvers/coupled/{conjugateHeatFoam => }/Allwmake (65%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/Make/files (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/Make/options (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItemIO.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/IOFieldAverage.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/detachPatches.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFluxTemplates.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/newExternalRadiationSource.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/newThermalGap.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/newThermalLaw.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalModel.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalModel.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.H (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/newThermalSource.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.C (100%) rename applications/solvers/coupled/{conjugateHeatFoam => }/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.H (100%) diff --git a/applications/solvers/coupled/conjugateHeatFoam/Allwmake b/applications/solvers/coupled/Allwmake similarity index 65% rename from applications/solvers/coupled/conjugateHeatFoam/Allwmake rename to applications/solvers/coupled/Allwmake index c416ec239..3292954ac 100755 --- a/applications/solvers/coupled/conjugateHeatFoam/Allwmake +++ b/applications/solvers/coupled/Allwmake @@ -3,6 +3,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x wmake libso conjugateHeatTransfer -wmake +wmake blockCoupledScalarTransportFoam +wmake conjugateHeatFoam +wmake conjugateHeatSimpleFoam # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/coupled/conjugateHeatFoam/Make/options b/applications/solvers/coupled/conjugateHeatFoam/Make/options index 75fefc0ed..1fddbff0a 100644 --- a/applications/solvers/coupled/conjugateHeatFoam/Make/options +++ b/applications/solvers/coupled/conjugateHeatFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -IconjugateHeatTransfer/lnInclude \ + -I../conjugateHeatTransfer/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ diff --git a/applications/solvers/coupled/conjugateHeatSimpleFoam/Make/options b/applications/solvers/coupled/conjugateHeatSimpleFoam/Make/options index 9c1fa7a2f..1fddbff0a 100644 --- a/applications/solvers/coupled/conjugateHeatSimpleFoam/Make/options +++ b/applications/solvers/coupled/conjugateHeatSimpleFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I../conjugateHeatFoam/conjugateHeatTransfer/lnInclude \ + -I../conjugateHeatTransfer/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/Make/files b/applications/solvers/coupled/conjugateHeatTransfer/Make/files similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/Make/files rename to applications/solvers/coupled/conjugateHeatTransfer/Make/files diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/Make/options b/applications/solvers/coupled/conjugateHeatTransfer/Make/options similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/Make/options rename to applications/solvers/coupled/conjugateHeatTransfer/Make/options diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.C b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.C rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.H b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.H rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItem.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItemIO.C b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItemIO.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItemIO.C rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/fieldAverageItem/fieldAverageItemIO.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/IOFieldAverage.H b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/IOFieldAverage.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/IOFieldAverage.H rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/IOFieldAverage.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/detachPatches.H b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/detachPatches.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/detachPatches.H rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/detachPatches.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.C b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.C rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.H b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.H rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFlux.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFluxTemplates.C b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFluxTemplates.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFluxTemplates.C rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFlux/heatFluxTemplates.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.C b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.C rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.H b/applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.H rename to applications/solvers/coupled/conjugateHeatTransfer/functionObjects/heatFlux/heatFluxFunctionObject/heatFluxFunctionObject.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/adiabatic/adiabaticFvPatchScalarField.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/chtRcTemperatureFvPatchScalarField.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivity/chtRcThermalDiffusivityFvPatchScalarField.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivityResistance/chtRcThermalDiffusivityResistanceFvPatchScalarField.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRcThermalDiffusivitySlave/chtRcThermalDiffusivitySlaveFvPatchScalarField.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/chtRegionCoupleBase/chtRegionCoupleBase.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/controlledParabolicVelocity/controlledParabolicVelocityFvPatchVectorField.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/extendedWallHeatTransferFvPatchScalarField.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/extendedWallHeatTransfer/viewFactorRadiation.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersConstantFlux/ersConstantFlux.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPlaneToCylinder/ersPlaneToCylinder.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersPointSource/ersPointSource.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/ersViewFactor/ersViewFactor.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/externalRadiationSource.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/newExternalRadiationSource.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/newExternalRadiationSource.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/newExternalRadiationSource.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/externalRadiation/externalRadiationSource/newExternalRadiationSource.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/fieldStorage/fieldStorage.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H b/applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H rename to applications/solvers/coupled/conjugateHeatTransfer/fvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/constantResistanceThermalGap/constantResistanceThermalGap.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/constantThermalGap/constantThermalGap.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/newThermalGap.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/newThermalGap.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/newThermalGap.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/newThermalGap.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalGaps/thermalGap/thermalGap.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/constantThermal/constantThermal.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialThermal/multiMaterialThermal.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/multiMaterialZonesThermal/multiMaterialZonesThermal.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/newThermalLaw.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/newThermalLaw.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/newThermalLaw.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/newThermalLaw.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalLaws/thermalLaw/thermalLaw.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalModel.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalModel.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalModel.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalModel.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalModel.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalModel.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalModel.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalModel.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/constantThermalSource/constantThermalSource.H diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/newThermalSource.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/newThermalSource.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/newThermalSource.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/newThermalSource.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.C b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.C similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.C rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.C diff --git a/applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.H b/applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.H similarity index 100% rename from applications/solvers/coupled/conjugateHeatFoam/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.H rename to applications/solvers/coupled/conjugateHeatTransfer/thermalModel/thermalSource/thermalSource/thermalSource.H From bae94fac3b3e2c2890ed6c2c83fdccb0eb57f765 Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Thu, 10 Apr 2014 16:46:22 +0200 Subject: [PATCH 45/66] BUG: linearUpwind hangs in parallel execution on empty patches --- .../limitedSchemes/linearUpwind/linearUpwind.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/linearUpwind/linearUpwind.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/linearUpwind/linearUpwind.C index 22a3f1d42..daf9fe644 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/linearUpwind/linearUpwind.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/linearUpwind/linearUpwind.C @@ -97,7 +97,7 @@ Foam::linearUpwind::correction { fvsPatchField& pSfCorr = bSfCorr[patchi]; - if (pSfCorr.coupled() && pSfCorr.size()) + if (pSfCorr.coupled()) { const fvPatch& p = mesh.boundary()[patchi]; From a3b9ee8fac50db3decf0715003e3f05dcb819923 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 17:45:26 +0100 Subject: [PATCH 46/66] Update and clean-up of solid mechanics --- applications/solvers/solidMechanics/Allwmake | 2 + .../solidMechanics/deprecatedSolvers/Allwmake | 2 - .../stressFemFoam/calculateStress.H | 53 ------ .../calculateDEpsilonDSigma.H | 4 +- .../calculateDivDSigmaExp.H | 101 +++++----- .../calculateDivDSigmaNonLinExp.H | 103 ++++++---- .../elasticPlasticNonLinTLSolidFoam.C | 178 +++++++++--------- .../readDivDSigmaExpMethod.H | 25 ++- .../writeFields.H | 159 ++++++++-------- .../stressFemFoam/Make/files | 0 .../stressFemFoam/Make/options | 0 .../stressFemFoam/calculateStress.H | 120 ++++++++++++ .../stressFemFoam/createFemFields.H | 0 .../stressFemFoam/createFemMesh.H | 0 .../stressFemFoam/createFields.H | 0 .../Traction/TractionPointPatchVectorField.C | 13 +- .../Traction/TractionPointPatchVectorField.H | 0 .../tractionTetPolyPatchVectorField.C | 0 .../tractionTetPolyPatchVectorField.H | 0 .../stressFemFoam/readControls.H | 0 .../stressFemFoam/readMechanicalProperties.H | 0 .../stressFemFoam/stressFemFoam.C | 4 +- .../stressFemFoam/Allclean | 0 .../stressFemFoam/Allrun | 0 .../stressFemFoam/plateHole/0/U | 0 .../plateHole/constant/mechanicalProperties | 0 .../plateHole/constant/polyMesh/blockMeshDict | 60 +++--- .../plateHole/constant/polyMesh/boundary | 2 +- .../plateHole/system/controlDict | 6 +- .../stressFemFoam/plateHole/system/fvSchemes | 0 .../stressFemFoam/plateHole/system/fvSolution | 0 .../plateHole/system/tetFemSolution | 10 +- 32 files changed, 483 insertions(+), 359 deletions(-) delete mode 100644 applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/calculateStress.H rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/Make/files (100%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/Make/options (100%) create mode 100644 applications/solvers/solidMechanics/stressFemFoam/calculateStress.H rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/createFemFields.H (100%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/createFemMesh.H (100%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/createFields.H (100%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C (96%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.H (100%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/femStress/tractionTetPolyPatchVectorField.C (100%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/femStress/tractionTetPolyPatchVectorField.H (100%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/readControls.H (100%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/readMechanicalProperties.H (100%) rename applications/solvers/solidMechanics/{deprecatedSolvers => }/stressFemFoam/stressFemFoam.C (97%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/Allclean (100%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/Allrun (100%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/plateHole/0/U (100%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/plateHole/constant/mechanicalProperties (100%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/plateHole/constant/polyMesh/blockMeshDict (72%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/plateHole/constant/polyMesh/boundary (96%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/plateHole/system/controlDict (94%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/plateHole/system/fvSchemes (100%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/plateHole/system/fvSolution (100%) rename tutorials/solidMechanics/{deprecatedTutorials => }/stressFemFoam/plateHole/system/tetFemSolution (86%) diff --git a/applications/solvers/solidMechanics/Allwmake b/applications/solvers/solidMechanics/Allwmake index 7c7dc0f32..58381dd5b 100755 --- a/applications/solvers/solidMechanics/Allwmake +++ b/applications/solvers/solidMechanics/Allwmake @@ -20,5 +20,7 @@ wmake elasticThermalSolidFoam wmake icoFsiElasticNonLinULSolidFoam wmake viscoElasticSolidFoam +wmake stressFemFoam + (cd utilities ; wmake all) (cd deprecatedSolvers ; ./Allwmake) \ No newline at end of file diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/Allwmake b/applications/solvers/solidMechanics/deprecatedSolvers/Allwmake index 1e2a5ecab..612815a04 100755 --- a/applications/solvers/solidMechanics/deprecatedSolvers/Allwmake +++ b/applications/solvers/solidMechanics/deprecatedSolvers/Allwmake @@ -11,8 +11,6 @@ wmake contactStressFoam wmake newStressedFoam wmake newContactStressFoam -wmake stressFemFoam - wmake icoFsiFoam wmake solidDisplacementFoam diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/calculateStress.H b/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/calculateStress.H deleted file mode 100644 index f81f620cb..000000000 --- a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/calculateStress.H +++ /dev/null @@ -1,53 +0,0 @@ - if (runTime.outputTime()) - { - // Displacement gradient - tetPointTensorField gradU = tetFec::grad(U); - - // Stress tensor - tetPointSymmTensorField sigma = - rho*(2.0*mu*symm(gradU) + lambda*I*tr(gradU)); - - // sigmaXX - tetPointScalarField sigmaXX - ( - IOobject - ( - "sigmaXX", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - sigma.component(symmTensor::XX) - ); - - // sigmaYY - tetPointScalarField sigmaYY - ( - IOobject - ( - "sigmaYY", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - sigma.component(symmTensor::YY) - ); - - // sigmaXY - tetPointScalarField sigmaXY - ( - IOobject - ( - "sigmaXY", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - sigma.component(symmTensor::XY) - ); - - runTime.write(); - } diff --git a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDEpsilonDSigma.H b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDEpsilonDSigma.H index dd03be9eb..50b2d2e95 100644 --- a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDEpsilonDSigma.H +++ b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDEpsilonDSigma.H @@ -1,5 +1,5 @@ -//- Increment of Green finite strain tensor +// Increment of Green finite strain tensor DEpsilon = symm(gradDU) + 0.5*symm((gradDU & gradU.T()) + (gradU & gradDU.T()) + (gradDU & gradDU.T())); -//- Increment of second Piola-Kirchhoff stress tensor +// Increment of second Piola-Kirchhoff stress tensor DSigma = 2*mu*(DEpsilon - DEpsilonP) + lambda*(I*tr(DEpsilon)); diff --git a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDivDSigmaExp.H b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDivDSigmaExp.H index c938e46ed..831730cf9 100644 --- a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDivDSigmaExp.H +++ b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDivDSigmaExp.H @@ -1,45 +1,46 @@ if(divDSigmaExpMethod == "standard") - { +{ divDSigmaExp = fvc::div - ( - (mu*gradDU.T()) - + (lambda*(I*tr(gradDU))) - - ((mu + lambda)*gradDU), - "div(sigma)" - ); - } - else if(divDSigmaExpMethod == "surface") - { - divDSigmaExp = - fvc::div( - mesh.magSf() - *( - muf*(n&fvc::interpolate(gradDU.T())) - + lambdaf*tr(fvc::interpolate(gradDU))*n - - (muf + lambdaf)*(n&fvc::interpolate(gradDU)) - ) - ); + ( + (mu*gradDU.T()) + + (lambda*(I*tr(gradDU))) + - ((mu + lambda)*gradDU), + "div(sigma)" + ); +} +else if(divDSigmaExpMethod == "surface") +{ + divDSigmaExp = fvc::div + ( + mesh.magSf()* + ( + muf*(n & fvc::interpolate(gradDU.T())) + + lambdaf*tr(fvc::interpolate(gradDU))*n + - (muf + lambdaf)*(n & fvc::interpolate(gradDU)) + ) + ); + // divDSigmaExp = fvc::div // ( // muf*(mesh.Sf() & fvc::interpolate(gradDU.T())) // + lambdaf*(mesh.Sf() & I*fvc::interpolate(tr(gradDU))) // - (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradDU)) // ); - } - else if(divDSigmaExpMethod == "decompose") - { - surfaceTensorField shearGradDU = - ((I - n*n)&fvc::interpolate(gradDU)); +} +else if(divDSigmaExpMethod == "decompose") +{ + 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) - ) - ); + divDSigmaExp = fvc::div + ( + mesh.magSf()* + ( + - (muf + lambdaf)*(fvc::snGrad(DU) & (I - n*n)) + + lambdaf*tr(shearGradDU & (I - n*n))*n + + muf*(shearGradDU & n) + ) + ); + // divDSigmaExp = fvc::div // ( // mesh.magSf() @@ -49,19 +50,21 @@ if(divDSigmaExpMethod == "standard") // + muf*(shearGradDU&n) // ) // ); - } - else if(divDSigmaExpMethod == "laplacian") - { - divDSigmaExp = - - fvc::laplacian(mu + lambda, DU, "laplacian(DDU,DU)") - + fvc::div - ( - mu*gradDU.T() - + lambda*(I*tr(gradDU)), - "div(sigma)" - ); - } - else - { - FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << endl; - } +} +else if(divDSigmaExpMethod == "laplacian") +{ + divDSigmaExp = + - fvc::laplacian(mu + lambda, DU, "laplacian(DDU,DU)") + + fvc::div + ( + mu*gradDU.T() + + lambda*(I*tr(gradDU)), + "div(sigma)" + ); +} +else +{ + FatalErrorIn(args.executable()) + << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" + << abort(FatalError); +} diff --git a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDivDSigmaNonLinExp.H b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDivDSigmaNonLinExp.H index 535509f4e..d95d0c730 100644 --- a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDivDSigmaNonLinExp.H +++ b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/calculateDivDSigmaNonLinExp.H @@ -1,32 +1,69 @@ if(divDSigmaNonLinExpMethod == "standard") - { +{ divDSigmaNonLinExp = fvc::div - ( - ( mu * ( - (gradDU & gradU.T()) - + (gradU & gradDU.T()) - + (gradDU & gradDU.T()) - ) ) - + ( lambda * 0.5 * tr( (gradDU & gradU.T()) - + (gradU & gradDU.T()) - + (gradDU & gradDU.T()) - ) * I ) - + ( DSigma & gradU ) - + ( (sigma + DSigma) & gradDU ), - "div(sigma)" - ); - } - else if(divDSigmaNonLinExpMethod == "surface") - { - divDSigmaNonLinExp = - fvc::div( - mesh.magSf() - *( - ( muf * (n & fvc::interpolate( (gradU & gradDU.T()) + (gradDU & gradU.T()) + (gradDU & gradDU.T()) )) ) - + ( 0.5*lambdaf * (n * tr(fvc::interpolate( (gradU & gradDU.T()) + (gradDU & gradU.T()) + (gradDU & gradDU.T()) ))) ) - + (n & fvc::interpolate( (DSigma & gradU) + ((sigma + DSigma) & gradDU) )) - ) - ); + ( + ( + mu* + ( + (gradDU & gradU.T()) + + (gradU & gradDU.T()) + + (gradDU & gradDU.T()) + ) + ) + + ( + 0.5*lambda* + tr + ( + (gradDU & gradU.T()) + + (gradU & gradDU.T()) + + (gradDU & gradDU.T()) + )*I + ) + + (DSigma & gradU) + + ((sigma + DSigma) & gradDU), + "div(sigma)" + ); +} +else if(divDSigmaNonLinExpMethod == "surface") +{ + divDSigmaNonLinExp = fvc::div + ( + mesh.magSf()* + ( + ( + muf* + ( + n & fvc::interpolate + ( + (gradU & gradDU.T()) + + (gradDU & gradU.T()) + + (gradDU & gradDU.T()) + ) + ) + ) + + ( + 0.5*lambdaf* + ( + n*tr + ( + fvc::interpolate + ( + (gradU & gradDU.T()) + + (gradDU & gradU.T()) + + (gradDU & gradDU.T()) + ) + ) + ) + ) + + ( + n & fvc::interpolate + ( + (DSigma & gradU) + + ((sigma + DSigma) & gradDU) + ) + ) + ) + ); // divDSigmaNonLinExp = // fvc::div @@ -48,8 +85,10 @@ if(divDSigmaNonLinExpMethod == "standard") // + ( (sigma + DSigma) & gradDU ) // ) ) // ); - } - else - { - FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << endl; - } +} +else +{ + FatalErrorIn(args.executable()) + << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" + << abort(FatalError); +} diff --git a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/elasticPlasticNonLinTLSolidFoam.C b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/elasticPlasticNonLinTLSolidFoam.C index 1f2b203a9..5e24bf0be 100644 --- a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/elasticPlasticNonLinTLSolidFoam.C +++ b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/elasticPlasticNonLinTLSolidFoam.C @@ -66,114 +66,116 @@ int main(int argc, char *argv[]) scalar initialResidual = 0; lduMatrix::solverPerformance solverPerf; scalar relativeResidual = GREAT; - lduMatrix::debug=0; + lduMatrix::debug = 0; do - { - DU.storePrevIter(); + { + DU.storePrevIter(); # include "calculateDivDSigmaExp.H" # include "calculateDivDSigmaNonLinExp.H" - // Incremental form of the - // linear momentum conservation - // ensuring conservation of total momentum - fvVectorMatrix DUEqn - ( - fvm::d2dt2(rho, DU) - == - fvm::laplacian(2*muf + lambdaf, DU, "laplacian(DDU,DU)") - + divDSigmaExp - + divDSigmaNonLinExp - //- fvc::div(2*mu*DEpsilonP, "div(sigma)") - - fvc::div - ( - 2*muf*( mesh.Sf() & fvc::interpolate(DEpsilonP)) - ) - ); + // Incremental form of the + // linear momentum conservation + // ensuring conservation of total momentum + fvVectorMatrix DUEqn + ( + fvm::d2dt2(rho, DU) + == + fvm::laplacian(2*muf + lambdaf, DU, "laplacian(DDU,DU)") + + divDSigmaExp + + divDSigmaNonLinExp + //- fvc::div(2*mu*DEpsilonP, "div(sigma)") + - fvc::div + ( + 2*muf*(mesh.Sf() & fvc::interpolate(DEpsilonP)) + ) + ); - if (largeStrainOverRelax) - { - // the terms (gradDU & gradU.T()) and (gradU & gradDU.T()) - // are linearly dependent of DU and represent initial - // displacement effect - // which can cause convergence difficulties when treated - // explicitly - // so we implicitly over-relax with gradU & gradDU here - // which tends to help convergence - // this should improve convergence when gradU is large - // but maybe not execution time - DUEqn -= - fvm::laplacian - ( - (2*mu + lambda)*gradU, DU, "laplacian(DDU,DU)" - ) - - fvc::div( (2*mu + lambda)*(gradU&gradDU), "div(sigma)"); - } + if (largeStrainOverRelax) + { + // the terms (gradDU & gradU.T()) and (gradU & gradDU.T()) + // are linearly dependent of DU and represent initial + // displacement effect + // which can cause convergence difficulties when treated + // explicitly + // so we implicitly over-relax with gradU & gradDU here + // which tends to help convergence + // this should improve convergence when gradU is large + // but maybe not execution time + DUEqn -= + fvm::laplacian + ( + (2*mu + lambda)*gradU, DU, "laplacian(DDU,DU)" + ) + - fvc::div((2*mu + lambda)*(gradU & gradDU), "div(sigma)"); + } - if (nonLinearSemiImplicit) - { - // experimental - // we can treat the nonlinear term (gradDU & gradDU.T()) in a - // semi-implicit over-relaxed manner - // this should improve convergence when gradDU is large - // but maybe not execution time - DUEqn -= - fvm::laplacian - ( - (2*mu + lambda)*gradDU, DU, "laplacian(DDU,DU)" - ) - - fvc::div( (2*mu + lambda)*(gradDU&gradDU), "div(sigma)"); - } + if (nonLinearSemiImplicit) + { + // experimental + // we can treat the nonlinear term (gradDU & gradDU.T()) in a + // semi-implicit over-relaxed manner + // this should improve convergence when gradDU is large + // but maybe not execution time + DUEqn -= + fvm::laplacian + ( + (2*mu + lambda)*gradDU, DU, "laplacian(DDU,DU)" + ) + - fvc::div((2*mu + lambda)*(gradDU & gradDU), "div(sigma)"); + } - solverPerf = DUEqn.solve(); + solverPerf = DUEqn.solve(); - if (iCorr == 0) - { - initialResidual = solverPerf.initialResidual(); - } + if (iCorr == 0) + { + initialResidual = solverPerf.initialResidual(); + } - if (aitkenRelax) - { + if (aitkenRelax) + { # include "aitkenRelaxation.H" - } - else - { - DU.relax(); - } + } + else + { + DU.relax(); + } - gradDU = fvc::grad(DU); + gradDU = fvc::grad(DU); - // correct plasticty term - rheology.correct(); + // correct plasticty term + rheology.correct(); # include "calculateDEpsilonDSigma.H" # include "calculateRelativeResidual.H" - if (iCorr % infoFrequency == 0) - { - Info << "\tTime " << runTime.value() - << ", Corrector " << iCorr - << ", Solving for " << DU.name() - << " using " << solverPerf.solverName() - << ", res = " << solverPerf.initialResidual() - << ", rel res = " << relativeResidual; - if (aitkenRelax) - { - Info << ", aitken = " << aitkenTheta; - } - Info << ", iters = " << solverPerf.nIterations() << endl; - } - } + if (iCorr % infoFrequency == 0) + { + Info<< "\tTime " << runTime.value() + << ", Corrector " << iCorr + << ", Solving for " << DU.name() + << " using " << solverPerf.solverName() + << ", res = " << solverPerf.initialResidual() + << ", rel res = " << relativeResidual; + + if (aitkenRelax) + { + Info << ", aitken = " << aitkenTheta; + } + Info << ", iters = " << solverPerf.nIterations() << endl; + } + } while + ( + iCorr++ == 0 + || ( - iCorr++ == 0 - || - (//solverPerf.initialResidual() > convergenceTolerance - relativeResidual > convergenceTolerance - && - iCorr < nCorr) - ); + //solverPerf.initialResidual() > convergenceTolerance + relativeResidual > convergenceTolerance + && iCorr < nCorr + ) + ); Info<< nl << "Time " << runTime.value() << ", Solving for " << DU.name() << ", Initial residual = " << initialResidual diff --git a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/readDivDSigmaExpMethod.H b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/readDivDSigmaExpMethod.H index 1615c5211..421acb29d 100644 --- a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/readDivDSigmaExpMethod.H +++ b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/readDivDSigmaExpMethod.H @@ -1,9 +1,20 @@ //- how explicit component of sigma is to be calculated -word divDSigmaExpMethod(mesh.solutionDict().subDict("solidMechanics").lookup("divSigmaExp")); +word divDSigmaExpMethod +( + mesh.solutionDict().subDict("solidMechanics").lookup("divSigmaExp") +); + Info << "divSigmaExp method " << divDSigmaExpMethod << endl; -if(divDSigmaExpMethod != "standard" && divDSigmaExpMethod != "surface" && divDSigmaExpMethod != "decompose" && divDSigmaExpMethod != "laplacian") - { - FatalError << "divSigmaExp method " << divDSigmaExpMethod << " not found!" << nl - << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" - << exit(FatalError); - } +if +( + divDSigmaExpMethod != "standard" + && divDSigmaExpMethod != "surface" + && divDSigmaExpMethod != "decompose" + && divDSigmaExpMethod != "laplacian" +) +{ + FatalErrorIn(args.executable()) + << "divSigmaExp method " << divDSigmaExpMethod << " not found!" << nl + << "valid methods are:\nstandard\nsurface\ndecompose\nlaplacian" + << exit(FatalError); +} diff --git a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/writeFields.H b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/writeFields.H index a3de4657b..c2db3454e 100644 --- a/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/writeFields.H +++ b/applications/solvers/solidMechanics/elasticPlasticNonLinTLSolidFoam/writeFields.H @@ -1,100 +1,95 @@ if (runTime.outputTime()) - { +{ volScalarField epsilonEq - ( - IOobject - ( - "epsilonEq", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - sqrt((2.0/3.0)*magSqr(dev(epsilon))) - ); - Info<< "Max epsilonEq = " << max(epsilonEq).value() - << endl; + ( + IOobject + ( + "epsilonEq", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqrt((2.0/3.0)*magSqr(dev(epsilon))) + ); + Info<< "Max epsilonEq = " << max(epsilonEq).value() << endl; volScalarField epsilonPEq - ( - IOobject - ( - "epsilonPEq", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE + ( + IOobject + ( + "epsilonPEq", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE ), - sqrt((2.0/3.0)*magSqr(dev(epsilonP))) - ); - Info<< "Max epsilonPEq = " << max(epsilonPEq).value() - << endl; + sqrt((2.0/3.0)*magSqr(dev(epsilonP))) + ); + Info<< "Max epsilonPEq = " << max(epsilonPEq).value()<< endl; volScalarField sigmaEq - ( - IOobject - ( - "sigmaEq", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - sqrt((3.0/2.0)*magSqr(dev(sigma))) - ); - - Info<< "Max sigmaEq = " << max(sigmaEq).value() - << endl; + ( + IOobject + ( + "sigmaEq", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqrt((3.0/2.0)*magSqr(dev(sigma))) + ); - // deformation gradient + Info<< "Max sigmaEq = " << max(sigmaEq).value() << endl; + + // Deformation gradient volTensorField F = I + gradU; volScalarField J = det(F); - //- Calculate Cauchy stress + // Calculate Cauchy stress volSymmTensorField sigmaCauchy - ( - IOobject - ( - "sigmaCauchy", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - (1/J) * symm(F.T() & sigma & F) - ); + ( + IOobject + ( + "sigmaCauchy", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + (1/J)*symm(F.T() & sigma & F) + ); - //- Cauchy von Mises stress + // Cauchy von Mises stress volScalarField sigmaCauchyEq - ( - IOobject - ( - "sigmaCauchyEq", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - sqrt((3.0/2.0)*magSqr(dev(sigmaCauchy))) - ); - - Info<< "Max sigmaCauchyEq = " << max(sigmaCauchyEq).value() - << endl; + ( + IOobject + ( + "sigmaCauchyEq", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sqrt((3.0/2.0)*magSqr(dev(sigmaCauchy))) + ); - //volTensorField Finv = inv(F); - // volSymmTensorField epsilonAlmansi -// ( -// IOobject -// ( -// "epsilonAlmansi", -// runTime.timeName(), -// mesh, -// IOobject::NO_READ, -// IOobject::AUTO_WRITE -// ), -// symm(Finv & epsilon & Finv.T()) -// ); + Info<< "Max sigmaCauchyEq = " << max(sigmaCauchyEq).value() << endl; +// volTensorField Finv = inv(F); +// volSymmTensorField epsilonAlmansi +// ( +// IOobject +// ( +// "epsilonAlmansi", +// runTime.timeName(), +// mesh, +// IOobject::NO_READ, +// IOobject::AUTO_WRITE +// ), +// symm(Finv & epsilon & Finv.T()) +// ); runTime.write(); - } +} diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/Make/files b/applications/solvers/solidMechanics/stressFemFoam/Make/files similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/Make/files rename to applications/solvers/solidMechanics/stressFemFoam/Make/files diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/Make/options b/applications/solvers/solidMechanics/stressFemFoam/Make/options similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/Make/options rename to applications/solvers/solidMechanics/stressFemFoam/Make/options diff --git a/applications/solvers/solidMechanics/stressFemFoam/calculateStress.H b/applications/solvers/solidMechanics/stressFemFoam/calculateStress.H new file mode 100644 index 000000000..3e4619cef --- /dev/null +++ b/applications/solvers/solidMechanics/stressFemFoam/calculateStress.H @@ -0,0 +1,120 @@ + if (runTime.outputTime()) + { + // Displacement gradient + tetPointTensorField gradU = tetFec::grad(U); + + // Stress tensor + tetPointSymmTensorField sigma = + rho*(2.0*mu*symm(gradU) + lambda*I*tr(gradU)); + + + // Create pointMesh for field post-processing + const pointMesh& pMesh = pointMesh::New(mesh); + + // U + pointVectorField Up + ( + IOobject + ( + "Up", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pMesh, + U.dimensions() + ); + + Up.internalField() = vectorField::subField + ( + U.internalField(), + pMesh.size() + ); + + // sigmaEq + pointScalarField sigmaEq + ( + IOobject + ( + "sigmaEq", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pMesh, + sigma.dimensions() + ); + + sigmaEq.internalField() = scalarField::subField + ( + sqrt((3.0/2.0)*magSqr(dev(sigma.internalField())))(), + pMesh.size() + ); + + // sigmaXX + pointScalarField sigmaXX + ( + IOobject + ( + "sigmaXX", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pMesh, + sigma.dimensions() + ); + + sigmaXX.internalField() = scalarField::subField + ( + sigma.component(symmTensor::XX)().internalField(), + pMesh.size() + ); + + // sigmaYY + pointScalarField sigmaYY + ( + IOobject + ( + "sigmaYY", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pMesh, + sigma.dimensions() + ); + + sigmaYY.internalField() = scalarField::subField + ( + sigma.component(symmTensor::YY)().internalField(), + pMesh.size() + ); + + // sigmaXY + pointScalarField sigmaXY + ( + IOobject + ( + "sigmaXY", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pMesh, + sigma.dimensions() + ); + + sigmaXY.internalField() = scalarField::subField + ( + sigma.component(symmTensor::XY)().internalField(), + pMesh.size() + ); + + runTime.write(); + } diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/createFemFields.H b/applications/solvers/solidMechanics/stressFemFoam/createFemFields.H similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/createFemFields.H rename to applications/solvers/solidMechanics/stressFemFoam/createFemFields.H diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/createFemMesh.H b/applications/solvers/solidMechanics/stressFemFoam/createFemMesh.H similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/createFemMesh.H rename to applications/solvers/solidMechanics/stressFemFoam/createFemMesh.H diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/createFields.H b/applications/solvers/solidMechanics/stressFemFoam/createFields.H similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/createFields.H rename to applications/solvers/solidMechanics/stressFemFoam/createFields.H diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C b/applications/solvers/solidMechanics/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C similarity index 96% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C rename to applications/solvers/solidMechanics/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C index b5cf8cb66..a10dadc9d 100644 --- a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C +++ b/applications/solvers/solidMechanics/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C @@ -46,8 +46,9 @@ template class PointPatch, template class MatrixType > -void TractionPointPatchVectorField -::checkFieldSize() const +void +TractionPointPatchVectorField:: +checkFieldSize() const { if ( @@ -229,7 +230,7 @@ addBoundarySourceDiag const vectorField& pointNormals = this->patch().pointNormals(); const label nFaces = this->patch().nFaces(); - vectorField& source = matrix.source(); + vectorField& b = matrix.b(); for (label faceI = 0; faceI < nFaces; faceI++) { @@ -240,7 +241,7 @@ addBoundarySourceDiag { const triFace& tri = faceTriangles[triI]; - source[meshPoints[tri[0]]] += + b[meshPoints[tri[0]]] += tri.mag(points)* ( traction_[faceI]/6.0 @@ -251,7 +252,7 @@ addBoundarySourceDiag - pressure_[faceI]*pointNormals[tri[2]]/12.0 ); - source[meshPoints[tri[1]]] += + b[meshPoints[tri[1]]] += tri.mag(points)* ( traction_[faceI]/6.0 @@ -262,7 +263,7 @@ addBoundarySourceDiag - pressure_[faceI]*pointNormals[tri[0]]/12.0 ); - source[meshPoints[tri[2]]] += + b[meshPoints[tri[2]]] += tri.mag(points)* ( traction_[faceI]/6.0 diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.H b/applications/solvers/solidMechanics/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.H similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.H rename to applications/solvers/solidMechanics/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.H diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/femStress/tractionTetPolyPatchVectorField.C b/applications/solvers/solidMechanics/stressFemFoam/femStress/tractionTetPolyPatchVectorField.C similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/femStress/tractionTetPolyPatchVectorField.C rename to applications/solvers/solidMechanics/stressFemFoam/femStress/tractionTetPolyPatchVectorField.C diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/femStress/tractionTetPolyPatchVectorField.H b/applications/solvers/solidMechanics/stressFemFoam/femStress/tractionTetPolyPatchVectorField.H similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/femStress/tractionTetPolyPatchVectorField.H rename to applications/solvers/solidMechanics/stressFemFoam/femStress/tractionTetPolyPatchVectorField.H diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/readControls.H b/applications/solvers/solidMechanics/stressFemFoam/readControls.H similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/readControls.H rename to applications/solvers/solidMechanics/stressFemFoam/readControls.H diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/readMechanicalProperties.H b/applications/solvers/solidMechanics/stressFemFoam/readMechanicalProperties.H similarity index 100% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/readMechanicalProperties.H rename to applications/solvers/solidMechanics/stressFemFoam/readMechanicalProperties.H diff --git a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/stressFemFoam.C b/applications/solvers/solidMechanics/stressFemFoam/stressFemFoam.C similarity index 97% rename from applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/stressFemFoam.C rename to applications/solvers/solidMechanics/stressFemFoam/stressFemFoam.C index 65b8fae2a..50daab29a 100644 --- a/applications/solvers/solidMechanics/deprecatedSolvers/stressFemFoam/stressFemFoam.C +++ b/applications/solvers/solidMechanics/stressFemFoam/stressFemFoam.C @@ -36,6 +36,8 @@ Description #include "fvCFD.H" +#include "pointMesh.H" +#include "pointFields.H" #include "tetPolyMesh.H" #include "tetPointFields.H" #include "tetFem.H" @@ -69,7 +71,7 @@ int main(int argc, char *argv[]) + tetFem::laplacianTrace(lambda, U) ); - solve(UEqn); + UEqn.solve(); # include "calculateStress.H" diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/Allclean b/tutorials/solidMechanics/stressFemFoam/Allclean similarity index 100% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/Allclean rename to tutorials/solidMechanics/stressFemFoam/Allclean diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/Allrun b/tutorials/solidMechanics/stressFemFoam/Allrun similarity index 100% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/Allrun rename to tutorials/solidMechanics/stressFemFoam/Allrun diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/0/U b/tutorials/solidMechanics/stressFemFoam/plateHole/0/U similarity index 100% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/0/U rename to tutorials/solidMechanics/stressFemFoam/plateHole/0/U diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/constant/mechanicalProperties b/tutorials/solidMechanics/stressFemFoam/plateHole/constant/mechanicalProperties similarity index 100% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/constant/mechanicalProperties rename to tutorials/solidMechanics/stressFemFoam/plateHole/constant/mechanicalProperties diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/constant/polyMesh/blockMeshDict b/tutorials/solidMechanics/stressFemFoam/plateHole/constant/polyMesh/blockMeshDict similarity index 72% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/constant/polyMesh/blockMeshDict rename to tutorials/solidMechanics/stressFemFoam/plateHole/constant/polyMesh/blockMeshDict index 8b27dc96d..227250905 100644 --- a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/constant/polyMesh/blockMeshDict +++ b/tutorials/solidMechanics/stressFemFoam/plateHole/constant/polyMesh/blockMeshDict @@ -19,28 +19,28 @@ convertToMeters 1; vertices ( - (0.5 0 0) - (1 0 0) - (2 0 0) - (2 0.707107 0) - (0.707107 0.707107 0) - (0.353553 0.353553 0) - (2 2 0) - (0.707107 2 0) - (0 2 0) - (0 1 0) - (0 0.5 0) - (0.5 0 0.5) - (1 0 0.5) - (2 0 0.5) - (2 0.707107 0.5) - (0.707107 0.707107 0.5) - (0.353553 0.353553 0.5) - (2 2 0.5) - (0.707107 2 0.5) - (0 2 0.5) - (0 1 0.5) - (0 0.5 0.5) + (0.5 0 -0.1) + (1 0 -0.1) + (2 0 -0.1) + (2 0.707107 -0.1) + (0.707107 0.707107 -0.1) + (0.353553 0.353553 -0.1) + (2 2 -0.1) + (0.707107 2 -0.1) + (0 2 -0.1) + (0 1 -0.1) + (0 0.5 -0.1) + (0.5 0 0.1) + (1 0 0.1) + (2 0 0.1) + (2 0.707107 0.1) + (0.707107 0.707107 0.1) + (0.353553 0.353553 0.1) + (2 2 0.1) + (0.707107 2 0.1) + (0 2 0.1) + (0 1 0.1) + (0 0.5 0.1) ); blocks @@ -54,14 +54,14 @@ blocks edges ( - arc 0 5 (0.469846 0.17101 0) - arc 5 10 (0.17101 0.469846 0) - arc 1 4 (0.939693 0.34202 0) - arc 4 9 (0.34202 0.939693 0) - arc 11 16 (0.469846 0.17101 0.5) - arc 16 21 (0.17101 0.469846 0.5) - arc 12 15 (0.939693 0.34202 0.5) - arc 15 20 (0.34202 0.939693 0.5) + arc 0 5 (0.469846 0.17101 -0.1) + arc 5 10 (0.17101 0.469846 -0.1) + arc 1 4 (0.939693 0.34202 -0.1) + arc 4 9 (0.34202 0.939693 -0.1) + arc 11 16 (0.469846 0.17101 0.1) + arc 16 21 (0.17101 0.469846 0.1) + arc 12 15 (0.939693 0.34202 0.1) + arc 15 20 (0.34202 0.939693 0.1) ); patches diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/constant/polyMesh/boundary b/tutorials/solidMechanics/stressFemFoam/plateHole/constant/polyMesh/boundary similarity index 96% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/constant/polyMesh/boundary rename to tutorials/solidMechanics/stressFemFoam/plateHole/constant/polyMesh/boundary index f7b45bdb7..1401a1b37 100644 --- a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/constant/polyMesh/boundary +++ b/tutorials/solidMechanics/stressFemFoam/plateHole/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.0 | +| \\ / O peration | Version: 3.0 | | \\ / A nd | Web: http://www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/controlDict b/tutorials/solidMechanics/stressFemFoam/plateHole/system/controlDict similarity index 94% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/controlDict rename to tutorials/solidMechanics/stressFemFoam/plateHole/system/controlDict index 8a9087959..80f2e4a5f 100644 --- a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/controlDict +++ b/tutorials/solidMechanics/stressFemFoam/plateHole/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application stressFemFoam; +application stressFemFoam; startFrom startTime; @@ -23,13 +23,13 @@ startTime 0; stopAt endTime; -endTime 100; +endTime 1; deltaT 1; writeControl timeStep; -writeInterval 20; +writeInterval 1; purgeWrite 0; diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/fvSchemes b/tutorials/solidMechanics/stressFemFoam/plateHole/system/fvSchemes similarity index 100% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/fvSchemes rename to tutorials/solidMechanics/stressFemFoam/plateHole/system/fvSchemes diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/fvSolution b/tutorials/solidMechanics/stressFemFoam/plateHole/system/fvSolution similarity index 100% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/fvSolution rename to tutorials/solidMechanics/stressFemFoam/plateHole/system/fvSolution diff --git a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/tetFemSolution b/tutorials/solidMechanics/stressFemFoam/plateHole/system/tetFemSolution similarity index 86% rename from tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/tetFemSolution rename to tutorials/solidMechanics/stressFemFoam/plateHole/system/tetFemSolution index 91a9a7218..85927aea3 100644 --- a/tutorials/solidMechanics/deprecatedTutorials/stressFemFoam/plateHole/system/tetFemSolution +++ b/tutorials/solidMechanics/stressFemFoam/plateHole/system/tetFemSolution @@ -19,11 +19,15 @@ solvers { U { - solver PCG; - preconditioner DIC; + solver CG; + preconditioner Cholesky; + minIter 1; + maxIter 2000; + tolerance 1e-06; - relTol 0.1; + relTol 0; } } + // ************************************************************************* // From 8269d111b2b6d75d3689f073c58f4c6648cac62a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 17:46:24 +0100 Subject: [PATCH 47/66] High-level CoeffFields --- .../fields/CoeffField/CoeffFieldFunctions.C | 2 +- src/foam/fields/CoeffField/coeffFields.H | 4 + .../fields/CoeffField/diagTensorCoeffField.C | 141 ++++++++++++++++++ .../fields/CoeffField/diagTensorCoeffField.H | 101 +++++++++++++ .../CoeffField/symmTensor4thOrderCoeffField.C | 141 ++++++++++++++++++ .../CoeffField/symmTensor4thOrderCoeffField.H | 105 +++++++++++++ 6 files changed, 493 insertions(+), 1 deletion(-) create mode 100644 src/foam/fields/CoeffField/diagTensorCoeffField.C create mode 100644 src/foam/fields/CoeffField/diagTensorCoeffField.H create mode 100644 src/foam/fields/CoeffField/symmTensor4thOrderCoeffField.C create mode 100644 src/foam/fields/CoeffField/symmTensor4thOrderCoeffField.H diff --git a/src/foam/fields/CoeffField/CoeffFieldFunctions.C b/src/foam/fields/CoeffField/CoeffFieldFunctions.C index bf6c70647..ec954e916 100644 --- a/src/foam/fields/CoeffField/CoeffFieldFunctions.C +++ b/src/foam/fields/CoeffField/CoeffFieldFunctions.C @@ -328,7 +328,7 @@ Foam::tmp > Foam::operator op \ // Operator multiply is not available for all types, as it expands rank // HJ, 17/Jun/2010 -// BINARY_OPERATOR_R(Type, Type, *, multiply) +BINARY_OPERATOR_R(Type, Type, *, multiply) #undef BINARY_OPERATOR_R #undef BINARY_OPERATOR_FF diff --git a/src/foam/fields/CoeffField/coeffFields.H b/src/foam/fields/CoeffField/coeffFields.H index 10c98f4ab..d403c39e0 100644 --- a/src/foam/fields/CoeffField/coeffFields.H +++ b/src/foam/fields/CoeffField/coeffFields.H @@ -37,8 +37,10 @@ Author #include "scalarCoeffField.H" #include "sphericalTensorCoeffField.H" +#include "diagTensorCoeffField.H" #include "symmTensorCoeffField.H" #include "tensorCoeffField.H" +#include "symmTensor4thOrderCoeffField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,8 +52,10 @@ namespace Foam typedef CoeffField scalarCoeffField; typedef CoeffField vectorCoeffField; typedef CoeffField sphericalTensorCoeffField; +typedef CoeffField diagTensorCoeffField; typedef CoeffField symmTensorCoeffField; typedef CoeffField tensorCoeffField; +typedef CoeffField symmTensor4thOrderCoeffField; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/foam/fields/CoeffField/diagTensorCoeffField.C b/src/foam/fields/CoeffField/diagTensorCoeffField.C new file mode 100644 index 000000000..ce554e2c4 --- /dev/null +++ b/src/foam/fields/CoeffField/diagTensorCoeffField.C @@ -0,0 +1,141 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | + \\ / A nd | For copyright notice see file Copyright + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with foam-extend. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "diagTensorCoeffField.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::CoeffField::CoeffField(const label size) +: + DecoupledCoeffField(size) +{} + + +Foam::CoeffField::CoeffField +( + const CoeffField& f +) +: + DecoupledCoeffField(f) +{} + + +Foam::CoeffField::CoeffField +( + const DecoupledCoeffField& f +) +: + DecoupledCoeffField(f) +{} + + +Foam::CoeffField::CoeffField +( + const tmp >& tf +) +: + DecoupledCoeffField(tf()) +{} + + +Foam::CoeffField::CoeffField(Istream& is) +: + DecoupledCoeffField(is) +{} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +void Foam::CoeffField::operator= +( + const CoeffField& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const tmp >& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const CoeffField::scalarTypeField& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const tmp::scalarTypeField>& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const CoeffField::linearTypeField& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const tmp::linearTypeField>& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +/* * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * */ + +Foam::tmp > Foam::inv +( + const CoeffField& f +) +{ + const DecoupledCoeffField& df = f; + + return tmp > + ( + new CoeffField(inv(df)()) + ); +} + + +// ************************************************************************* // diff --git a/src/foam/fields/CoeffField/diagTensorCoeffField.H b/src/foam/fields/CoeffField/diagTensorCoeffField.H new file mode 100644 index 000000000..4a28f6a4c --- /dev/null +++ b/src/foam/fields/CoeffField/diagTensorCoeffField.H @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | + \\ / A nd | For copyright notice see file Copyright + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with foam-extend. If not, see . + +Class + CoeffField + +Description + Template specialisation for diagTensor coefficients + +Author + Hrvoje Jasak, Wikki Ltd. All rights reserved. + +SourceFiles + diagTensorCoeffField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef diagTensorCoeffField_H +#define diagTensorCoeffField_H + +#include "CoeffField.H" +#include "DecoupledCoeffField.H" +#include "diagTensor.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<> +class CoeffField +: + public DecoupledCoeffField +{ +public: + + // Constructors + + //- Construct given size + explicit CoeffField(const label); + + //- Construct as copy + CoeffField(const CoeffField&); + + //- Construct as copy of base + explicit CoeffField(const DecoupledCoeffField&); + + //- Construct as copy of base + explicit CoeffField(const tmp >&); + + //- Construct from Istream + explicit CoeffField(Istream&); + + + // Member operators + + void operator=(const CoeffField&); + void operator=(const tmp >&); + + void operator=(const scalarTypeField&); + void operator=(const tmp&); + void operator=(const linearTypeField&); + void operator=(const tmp&); + +}; + + +/* * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * */ + +tmp > inv(const CoeffField& f); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/foam/fields/CoeffField/symmTensor4thOrderCoeffField.C b/src/foam/fields/CoeffField/symmTensor4thOrderCoeffField.C new file mode 100644 index 000000000..ee609e1a5 --- /dev/null +++ b/src/foam/fields/CoeffField/symmTensor4thOrderCoeffField.C @@ -0,0 +1,141 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | + \\ / A nd | For copyright notice see file Copyright + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with foam-extend. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "symmTensor4thOrderCoeffField.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::CoeffField::CoeffField(const label size) +: + DecoupledCoeffField(size) +{} + + +Foam::CoeffField::CoeffField +( + const CoeffField& f +) +: + DecoupledCoeffField(f) +{} + + +Foam::CoeffField::CoeffField +( + const DecoupledCoeffField& f +) +: + DecoupledCoeffField(f) +{} + + +Foam::CoeffField::CoeffField +( + const tmp >& tf +) +: + DecoupledCoeffField(tf()) +{} + + +Foam::CoeffField::CoeffField(Istream& is) +: + DecoupledCoeffField(is) +{} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +void Foam::CoeffField::operator= +( + const CoeffField& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const tmp >& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const CoeffField::scalarTypeField& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const tmp::scalarTypeField>& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const CoeffField::linearTypeField& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +void Foam::CoeffField::operator= +( + const tmp::linearTypeField>& f +) +{ + DecoupledCoeffField::operator=(f); +} + + +/* * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * */ + +Foam::tmp > Foam::inv +( + const CoeffField& f +) +{ + const DecoupledCoeffField& df = f; + + return tmp > + ( + new CoeffField(inv(df)()) + ); +} + + +// ************************************************************************* // diff --git a/src/foam/fields/CoeffField/symmTensor4thOrderCoeffField.H b/src/foam/fields/CoeffField/symmTensor4thOrderCoeffField.H new file mode 100644 index 000000000..3981b081b --- /dev/null +++ b/src/foam/fields/CoeffField/symmTensor4thOrderCoeffField.H @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | + \\ / A nd | For copyright notice see file Copyright + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with foam-extend. If not, see . + +Class + CoeffField + +Description + Template specialisation for symmTensor4thOrder coefficients + +Author + Hrvoje Jasak, Wikki Ltd. All rights reserved. + +SourceFiles + symmTensor4thOrderCoeffField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symmTensor4thOrderCoeffField_H +#define symmTensor4thOrderCoeffField_H + +#include "CoeffField.H" +#include "DecoupledCoeffField.H" +#include "symmTensor4thOrder.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<> +class CoeffField +: + public DecoupledCoeffField +{ +public: + + // Constructors + + //- Construct given size + explicit CoeffField(const label); + + //- Construct as copy + CoeffField(const CoeffField&); + + //- Construct as copy of base + explicit CoeffField(const DecoupledCoeffField&); + + //- Construct as copy of base + explicit CoeffField + ( + const tmp >& + ); + + //- Construct from Istream + explicit CoeffField(Istream&); + + + // Member operators + + void operator=(const CoeffField&); + void operator=(const tmp >&); + + void operator=(const scalarTypeField&); + void operator=(const tmp&); + void operator=(const linearTypeField&); + void operator=(const tmp&); + +}; + + +/* * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * */ + +tmp > +inv(const CoeffField& f); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // From 91ca61dfd2cccb46b71dccf359a7a067245a5811 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 17:46:56 +0100 Subject: [PATCH 48/66] Scaling factor fix --- .../mesh/manipulation/deformedTetFemGeom/deformedTetFemGeom.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/utilities/mesh/manipulation/deformedTetFemGeom/deformedTetFemGeom.C b/applications/utilities/mesh/manipulation/deformedTetFemGeom/deformedTetFemGeom.C index 9e418a905..803206174 100644 --- a/applications/utilities/mesh/manipulation/deformedTetFemGeom/deformedTetFemGeom.C +++ b/applications/utilities/mesh/manipulation/deformedTetFemGeom/deformedTetFemGeom.C @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) # include "setRootCase.H" - scalar scaleFactor(readScalar(IStringStream(args.args()[3])())); + scalar scaleFactor(readScalar(IStringStream(args.additionalArgs()[0])())); # include "createTime.H" # include "createPolyMesh.H" From 39fac12c97a4e010a5a60c30c00fd35ebf5592ef Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 17:47:21 +0100 Subject: [PATCH 49/66] Update of old format dimension set --- src/thermophysicalModels/basic/basicThermo/basicThermo.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 60f975175..d9834738e 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -182,7 +182,7 @@ Foam::basicThermo::basicThermo(const fvMesh& mesh, const objectRegistry& obj) IOobject::NO_WRITE ), mesh, - dimensionSet(0, -2, 2, 0, 0) + dimensionSet(0, -2, 2, 0, 0, 0, 0) ), T_ From 84227f7290eb12f7590eb6f9731533c672c77c52 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 17:48:03 +0100 Subject: [PATCH 50/66] Update tutorial to better initial conditions --- .../incompressible/icoDyMFoam/movingConeMotion/0/U | 2 +- .../movingConeMotion/constant/polyMesh/boundary | 2 +- .../icoDyMFoam/movingConeMotion/system/controlDict | 4 ++-- .../icoDyMFoam/movingConeMotion/system/tetFemSolution | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tutorials/incompressible/icoDyMFoam/movingConeMotion/0/U b/tutorials/incompressible/icoDyMFoam/movingConeMotion/0/U index cbdb2c4e1..3f109e186 100644 --- a/tutorials/incompressible/icoDyMFoam/movingConeMotion/0/U +++ b/tutorials/incompressible/icoDyMFoam/movingConeMotion/0/U @@ -23,7 +23,7 @@ boundaryField movingWall { type fixedValue; - value uniform (1 0 0); + value uniform (0 0 0); } farFieldMoving diff --git a/tutorials/incompressible/icoDyMFoam/movingConeMotion/constant/polyMesh/boundary b/tutorials/incompressible/icoDyMFoam/movingConeMotion/constant/polyMesh/boundary index 9a4c35057..8b7c0bae0 100644 --- a/tutorials/incompressible/icoDyMFoam/movingConeMotion/constant/polyMesh/boundary +++ b/tutorials/incompressible/icoDyMFoam/movingConeMotion/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.0 | +| \\ / O peration | Version: 3.0 | | \\ / A nd | Web: http://www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/icoDyMFoam/movingConeMotion/system/controlDict b/tutorials/incompressible/icoDyMFoam/movingConeMotion/system/controlDict index eea021ff0..c7c0c6914 100644 --- a/tutorials/incompressible/icoDyMFoam/movingConeMotion/system/controlDict +++ b/tutorials/incompressible/icoDyMFoam/movingConeMotion/system/controlDict @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application icoDyMFoam; +application icoDyMFoam; startFrom startTime; @@ -28,7 +28,7 @@ deltaT 2e-05; writeControl timeStep; -writeInterval 10; +writeInterval 1; purgeWrite 0; diff --git a/tutorials/incompressible/icoDyMFoam/movingConeMotion/system/tetFemSolution b/tutorials/incompressible/icoDyMFoam/movingConeMotion/system/tetFemSolution index 30e0dfe6f..8884625af 100644 --- a/tutorials/incompressible/icoDyMFoam/movingConeMotion/system/tetFemSolution +++ b/tutorials/incompressible/icoDyMFoam/movingConeMotion/system/tetFemSolution @@ -18,14 +18,14 @@ solvers { motionU { - solver PCG; - preconditioner DIC; + solver CG; + preconditioner Cholesky; minIter 0; maxIter 1000; tolerance 1e-6; - relTol 0.01; - }; + relTol 0.0; + } // motionU // { // solver amgSolver; @@ -43,7 +43,7 @@ solvers // maxIter 500; // tolerance 1e-8; // relTol 0.0; -// }; +// } } // ************************************************************************* // From b6a35f93438596713b8bf8925ff3b9393efc8e27 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 17:58:14 +0100 Subject: [PATCH 51/66] Formatting --- src/foam/matrices/constraint/constraintTools.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/foam/matrices/constraint/constraintTools.C b/src/foam/matrices/constraint/constraintTools.C index 8ecf9ea34..f822c240a 100644 --- a/src/foam/matrices/constraint/constraintTools.C +++ b/src/foam/matrices/constraint/constraintTools.C @@ -175,7 +175,8 @@ void constraint::eliminateEquation const unallocLabelList& owner = matrix.psi().mesh().lduAddr().lowerAddr(); const unallocLabelList& neighbour = matrix.psi().mesh().lduAddr().upperAddr(); - const unallocLabelList& losort = matrix.psi().mesh().lduAddr().losortAddr(); + const unallocLabelList& losort = + matrix.psi().mesh().lduAddr().losortAddr(); // My index = rowID if (matrix.symmetric()) From b3db6d226ffea0a1ce1790d55a8287a965b11bd8 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 17:59:45 +0100 Subject: [PATCH 52/66] Formatting --- .../PointPatchFields/PointPatchField/PointPatchField.H | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/foam/fields/PointPatchFields/PointPatchField/PointPatchField.H b/src/foam/fields/PointPatchFields/PointPatchField/PointPatchField.H index e4966e607..a3cca1f92 100644 --- a/src/foam/fields/PointPatchFields/PointPatchField/PointPatchField.H +++ b/src/foam/fields/PointPatchFields/PointPatchField/PointPatchField.H @@ -279,7 +279,8 @@ public: } //- Return internal field reference - const DimensionedField& dimensionedInternalField() const + const DimensionedField& + dimensionedInternalField() const { return internalField_; } @@ -555,7 +556,7 @@ public: // This function is added as a hack to enable simple backward compatability -// with verions using referenceLevel in GeometicField +// with versions using referenceLevel in GeometricField template < template class PatchField, @@ -564,7 +565,8 @@ template template class MatrixType, class Type > -const PointPatchField& operator+ +const PointPatchField& +operator+ ( const PointPatchField& ppf, const Type& @@ -735,7 +737,7 @@ typedef Type##PointPatchField \ typedef Type##PointPatchField \ \ type##pointPatchType##DiagTensorField; \ -typedef Type##PointPatchField \ +typedef Type##PointPatchField \ \ type##pointPatchType##TensorField; From 2ba267c767f7c707d334e25b40bb37b19b3fd30b Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 18:01:10 +0100 Subject: [PATCH 53/66] Issue with the rank of 4th order symm tensors --- .../SymmTensor4thOrder/SymmTensor4thOrder.H | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/foam/primitives/SymmTensor4thOrder/SymmTensor4thOrder.H b/src/foam/primitives/SymmTensor4thOrder/SymmTensor4thOrder.H index e873556b3..5353cc8de 100644 --- a/src/foam/primitives/SymmTensor4thOrder/SymmTensor4thOrder.H +++ b/src/foam/primitives/SymmTensor4thOrder/SymmTensor4thOrder.H @@ -85,6 +85,8 @@ public: rank = 2 // Hacked by PC: Actual rank of SymmTensor4thOrder is 4 }; + //HJ, reconsider and fix. HJ, 23/Feb/2014 + // Static data members @@ -172,22 +174,22 @@ public: }; -// template -// class typeOfRank -// { -// public: +template +class typeOfRank +{ +public: -// typedef SymmTensor4thOrder type; -// }; + typedef SymmTensor4thOrder type; +}; -// template -// class symmTypeOfRank -// { -// public: +template +class symmTypeOfRank +{ +public: -// typedef SymmTensor4thOrder type; -// }; + typedef SymmTensor4thOrder type; +}; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // From c456128f912d39dfafda315f58cdc913b9f7a4a9 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 18:01:40 +0100 Subject: [PATCH 54/66] Formatting --- .../viscoelasticFluidFoam/Oldroyd-B/constant/polyMesh/boundary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/viscoelastic/viscoelasticFluidFoam/Oldroyd-B/constant/polyMesh/boundary b/tutorials/viscoelastic/viscoelasticFluidFoam/Oldroyd-B/constant/polyMesh/boundary index ea7a3b4ad..b3b623bdf 100644 --- a/tutorials/viscoelastic/viscoelasticFluidFoam/Oldroyd-B/constant/polyMesh/boundary +++ b/tutorials/viscoelastic/viscoelasticFluidFoam/Oldroyd-B/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.0 | +| \\ / O peration | Version: 3.0 | | \\ / A nd | Web: http://www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ From 118ac4349e425f1b3eef221a14d933521c83a73b Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 18:03:08 +0100 Subject: [PATCH 55/66] Formatting --- .../fields/fvPatchFields/basic/coupled/coupledFvPatchField.H | 1 + 1 file changed, 1 insertion(+) diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H index d545d6034..a06704958 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H @@ -213,6 +213,7 @@ public: "(Field& f) const" ); } + //- Initialise neighbour matrix update virtual void initInterfaceMatrixUpdate ( From 979bc9da146d323c24b7e71546ff908f3a10a906 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 18:03:36 +0100 Subject: [PATCH 56/66] Access to patch --- .../constraint/cyclicGgi/cyclicGgiFvPatchField.C | 4 +++- .../constraint/cyclicGgi/cyclicGgiFvPatchField.H | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicGgi/cyclicGgiFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicGgi/cyclicGgiFvPatchField.C index 89511f94c..015f56640 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicGgi/cyclicGgiFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicGgi/cyclicGgiFvPatchField.C @@ -298,7 +298,9 @@ void cyclicGgiFvPatchField::initInterfaceMatrixUpdate const Pstream::commsTypes commsType ) const { - notImplemented("void cyclicGgiFvPatchField::initInterfaceMatrixUpdate" + notImplemented + ( + "void cyclicGgiFvPatchField::initInterfaceMatrixUpdate" " for block-coupled matrices of tensor types" ) } diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicGgi/cyclicGgiFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicGgi/cyclicGgiFvPatchField.H index 1c4046614..6738cc56e 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicGgi/cyclicGgiFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicGgi/cyclicGgiFvPatchField.H @@ -129,6 +129,15 @@ public: // Member functions + // Access + + //- Return access to cyclic ggi patch + const cyclicGgiFvPatch& cyclicGgiPatch() const + { + return cyclicGgiPatch_; + } + + // Evaluation functions //- Return neighbour field From 721a2397775fd6a2bea379d0a7687aba2257a034 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 18:16:30 +0100 Subject: [PATCH 57/66] correctImplicitBoundarySource bug fix for non-parallel coupled patches: cyclic, cyclicGgi --- .../fvMatrices/fvMatrix/fvMatrix.C | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index ca046d953..1c10647b7 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -28,6 +28,7 @@ License #include "calculatedFvPatchFields.H" #include "zeroGradientFvPatchFields.H" #include "coupledFvPatchFields.H" +#include "transformField.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -163,8 +164,7 @@ void Foam::fvMatrix::addBoundarySource } else if (couples) { - tmp > tpnf = ptf.patchNeighbourField(); - const Field& pnf = tpnf(); + Field pnf = ptf.patchNeighbourField(); const unallocLabelList& addr = lduAddr().patchAddr(patchI); @@ -192,11 +192,36 @@ void Foam::fvMatrix::correctImplicitBoundarySource if (ptf.coupled()) { - scalarField pnf = ptf.patchNeighbourField()().component(cmpt); - + // Get access to transformation data const lduInterfaceField& lf = refCast(ptf); + const coupledFvPatch& cfvp = + refCast(ptf.patch()); + + // Get the component of "other side" field that will be handled + // implicitly. Note that patchNeighbourField function gives + // the neighbour field AFTER transform, where the implicit + // components are mis-aligned: it needs to be transformed back + // HJ, 10/Apr/2014 + scalarField pnf; + + if (cfvp.parallel()) + { + // No transformation needed + pnf = ptf.patchNeighbourField()().component(cmpt); + } + else + { + // Transform back to this side to get the implicit component + pnf = transform + ( + cfvp.reverseT(), + ptf.patchNeighbourField() + )().component(cmpt); + } + + // Identical implicitness transformation (back) lf.transformCoupleField(pnf, cmpt); const unallocLabelList& addr = lduAddr().patchAddr(patchI); @@ -526,7 +551,7 @@ void Foam::fvMatrix::setReference if ((forceReference || psi_.needReference()) && celli >= 0) { // HR, 9/Jul/2013 - // Very early versions could produce memory violations if celli is read + // Very early versions could produce memory violations if celli is read // from dictionary, however, the proposed fix produced unpredictable // results in parallel. Keeping in mind that topologically changing // meshes will complicate the matter to level that cannot possibly be From 45576c2dea9f50a97d5983d72b47edb852403233 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 20:39:06 +0100 Subject: [PATCH 58/66] Update for segregated stress solver --- .../solidMechanics/stressFemFoam/plateHole/system/controlDict | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/solidMechanics/stressFemFoam/plateHole/system/controlDict b/tutorials/solidMechanics/stressFemFoam/plateHole/system/controlDict index 80f2e4a5f..19b5d3a2d 100644 --- a/tutorials/solidMechanics/stressFemFoam/plateHole/system/controlDict +++ b/tutorials/solidMechanics/stressFemFoam/plateHole/system/controlDict @@ -23,13 +23,13 @@ startTime 0; stopAt endTime; -endTime 1; +endTime 100; deltaT 1; writeControl timeStep; -writeInterval 1; +writeInterval 20; purgeWrite 0; From e732980a533627c6cbb03e8ec6e1db61023755e6 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 20:54:24 +0100 Subject: [PATCH 59/66] Tutorial fix elasticThermalSolidFoam --- .../elasticThermalSolidFoam/createFields.H | 57 +++--- .../elasticThermalSolidFoam.C | 171 +++++++++--------- .../elasticThermalSolidFoam/hotCylinder/0/T | 18 +- .../elasticThermalSolidFoam/hotCylinder/0/U | 19 +- .../hotCylinder/Allrun | 2 +- .../constant/polyMesh/blockMeshDict | 59 +++--- .../hotCylinder/constant/polyMesh/boundary | 34 ++-- .../hotCylinder/constant/thermalProperties | 11 +- 8 files changed, 181 insertions(+), 190 deletions(-) diff --git a/applications/solvers/solidMechanics/elasticThermalSolidFoam/createFields.H b/applications/solvers/solidMechanics/elasticThermalSolidFoam/createFields.H index e789e67f2..0ab66ab7e 100644 --- a/applications/solvers/solidMechanics/elasticThermalSolidFoam/createFields.H +++ b/applications/solvers/solidMechanics/elasticThermalSolidFoam/createFields.H @@ -12,21 +12,20 @@ mesh ); - // volTensorField gradU = fvc::grad(U); volTensorField gradU ( IOobject ( - "grad(U)", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "grad(U)", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), mesh, dimensionedTensor("zero", dimless, tensor::zero) - ); - //surfaceVectorField snGradU = fvc::snGrad(U); + ); + surfaceVectorField snGradU ( IOobject @@ -38,7 +37,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedVector("zero", dimless, vector::zero) + dimensionedVector("zero", dimless, vector::zero) ); volSymmTensorField epsilon @@ -115,31 +114,33 @@ thermalModel thermal(T); volScalarField C = thermal.C(); - volScalarField k = thermal.k(); + volScalarField k + ( + "DT", + thermal.k() + ); volScalarField threeKalpha = rheology.threeK()*rho*thermal.alpha(); - surfaceScalarField threeKalphaf = fvc::interpolate(threeKalpha, "threeKalpha"); + surfaceScalarField threeKalphaf = + fvc::interpolate(threeKalpha, "threeKalpha"); volScalarField T0 = thermal.T0(); volScalarField rhoC = rho*C; -// for aitken relaxation -volVectorField aitkenDelta - ( + // for aitken relaxation + volVectorField aitkenDelta + ( IOobject ( - "aitkenDelta", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "aitkenDelta", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), mesh, dimensionedVector("zero", dimLength, vector::zero) ); -// aitken relaxation factor -scalar aitkenInitialRes = 1.0; -scalar aitkenTheta = 0.01; -// if(mesh.relax(U.name())) -// { -// aitkenTheta = mesh.relaxationFactor(U.name()); -// } + + // aitken relaxation factor + scalar aitkenInitialRes = 1.0; + scalar aitkenTheta = 0.01; diff --git a/applications/solvers/solidMechanics/elasticThermalSolidFoam/elasticThermalSolidFoam.C b/applications/solvers/solidMechanics/elasticThermalSolidFoam/elasticThermalSolidFoam.C index 3fe868901..c90b1096e 100644 --- a/applications/solvers/solidMechanics/elasticThermalSolidFoam/elasticThermalSolidFoam.C +++ b/applications/solvers/solidMechanics/elasticThermalSolidFoam/elasticThermalSolidFoam.C @@ -46,100 +46,99 @@ Author int main(int argc, char *argv[]) { -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "readDivSigmaExpMethod.H" +# include "setRootCase.H" +# include "createTime.H" +# include "createMesh.H" +# include "createFields.H" +# include "readDivSigmaExpMethod.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info<< "\nStarting time loop\n" << endl; + Info<< "\nStarting time loop\n" << endl; - while(runTime.loop()) + while(runTime.loop()) { - Info<< "Time: " << runTime.timeName() << nl << endl; + Info<< "Time: " << runTime.timeName() << nl << endl; -# include "readSolidMechanicsControls.H" +# include "readSolidMechanicsControls.H" - int iCorr = 0; - scalar initialResidual = 1.0; - scalar relResT = 1.0; - scalar relResU = 1.0; - lduMatrix::solverPerformance solverPerfU; - lduMatrix::solverPerformance solverPerfT; - lduMatrix::debug = 0; + int iCorr = 0; + scalar initialResidual = 1.0; + scalar relResT = 1.0; + scalar relResU = 1.0; + lduMatrix::solverPerformance solverPerfU; + lduMatrix::solverPerformance solverPerfT; + lduMatrix::debug = 0; - // solve energy equation for temperature - // the loop is for non-orthogonal corrections - Info<< "Solving for " << T.name() << nl; - do - { - T.storePrevIter(); + // solve energy equation for temperature + // the loop is for non-orthogonal corrections + Info<< "Solving for " << T.name() << nl; + do + { + T.storePrevIter(); - fvScalarMatrix TEqn - ( - rhoC*fvm::ddt(T) == fvm::laplacian(k, T, "laplacian(k,T)") - ); + fvScalarMatrix TEqn + ( + rhoC*fvm::ddt(T) == fvm::laplacian(k, T, "laplacian(k,T)") + ); - solverPerfT = TEqn.solve(); + solverPerfT = TEqn.solve(); - T.relax(); + T.relax(); -# include "calculateRelResT.H" +# include "calculateRelResT.H" - if (iCorr % infoFrequency == 0) - { - Info<< "\tCorrector " << iCorr - << ", residual = " << solverPerfT.initialResidual() - << ", relative res = " << relResT - << ", inner iters = " << solverPerfT.nIterations() << endl; - } - } - while - ( - relResT > convergenceToleranceT - && - ++iCorr < nCorr - ); + if (iCorr % infoFrequency == 0) + { + Info<< "\tCorrector " << iCorr + << ", residual = " << solverPerfT.initialResidual() + << ", relative res = " << relResT + << ", inner iters = " << solverPerfT.nIterations() << endl; + } + } + while + ( + relResT > convergenceToleranceT + && ++iCorr < nCorr + ); - Info<< "Solved for " << T.name() - << " using " << solverPerfT.solverName() - << " in " << iCorr << " iterations" - << ", residual = " << solverPerfT.initialResidual() - << ", relative res = " << relResT << nl - << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << ", ClockTime = " << runTime.elapsedClockTime() << " s" - << endl; + Info<< "Solved for " << T.name() + << " using " << solverPerfT.solverName() + << " in " << iCorr << " iterations" + << ", residual = " << solverPerfT.initialResidual() + << ", relative res = " << relResT << nl + << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << ", ClockTime = " << runTime.elapsedClockTime() << " s" + << endl; - // solve momentum equation for displacement - iCorr = 0; - volVectorField gradThreeKalphaDeltaT = - fvc::grad(threeKalpha*(T-T0), "grad(threeKalphaDeltaT)"); - surfaceVectorField threeKalphaDeltaTf = - mesh.Sf()*threeKalphaf*fvc::interpolate(T-T0, "deltaT"); + // Solve momentum equation for displacement + iCorr = 0; + volVectorField gradThreeKalphaDeltaT = + fvc::grad(threeKalpha*(T-T0), "grad(threeKalphaDeltaT)"); + surfaceVectorField threeKalphaDeltaTf = + mesh.Sf()*threeKalphaf*fvc::interpolate(T-T0, "deltaT"); - Info<< "Solving for " << U.name() << nl; - do + Info<< "Solving for " << U.name() << nl; + do { U.storePrevIter(); -# include "calculateDivSigmaExp.H" +# include "calculateDivSigmaExp.H" // Linear momentum equaiton fvVectorMatrix UEqn - ( - rho*fvm::d2dt2(U) - == - fvm::laplacian(2*muf + lambdaf, U, "laplacian(DU,U)") - + divSigmaExp - ); + ( + rho*fvm::d2dt2(U) + == + fvm::laplacian(2*muf + lambdaf, U, "laplacian(DU,U)") + + divSigmaExp + ); solverPerfU = UEqn.solve(); if (aitkenRelax) { -# include "aitkenRelaxation.H" +# include "aitkenRelaxation.H" } else { @@ -148,7 +147,7 @@ int main(int argc, char *argv[]) gradU = fvc::grad(U); -# include "calculateRelResU.H" +# include "calculateRelResU.H" if (iCorr == 0) { @@ -160,6 +159,7 @@ int main(int argc, char *argv[]) Info<< "\tCorrector " << iCorr << ", residual = " << solverPerfU.initialResidual() << ", relative res = " << relResU; + if (aitkenRelax) { Info << ", aitken = " << aitkenTheta; @@ -167,25 +167,24 @@ int main(int argc, char *argv[]) Info<< ", inner iters = " << solverPerfU.nIterations() << endl; } } - while - ( - iCorr++ == 0 - || - (//solverPerfU.initialResidual() > convergenceTolerance - relResU > convergenceToleranceU - && - iCorr < nCorr) - ); + while + ( + iCorr++ == 0 + || ( + relResU > convergenceToleranceU + && iCorr < nCorr + ) + ); - Info<< "Solved for " << U.name() - << " using " << solverPerfU.solverName() - << " in " << iCorr << " iterations" - << ", initial res = " << initialResidual - << ", final res = " << solverPerfU.initialResidual() - << ", final rel res = " << relResU << nl - << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << ", ClockTime = " << runTime.elapsedClockTime() << " s" - << endl; + Info<< "Solved for " << U.name() + << " using " << solverPerfU.solverName() + << " in " << iCorr << " iterations" + << ", initial res = " << initialResidual + << ", final res = " << solverPerfU.initialResidual() + << ", final rel res = " << relResU << nl + << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << ", ClockTime = " << runTime.elapsedClockTime() << " s" + << endl; # include "calculateEpsilonSigma.H" # include "writeFields.H" diff --git a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/0/T b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/0/T index a693bb903..4824e3cc0 100644 --- a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/0/T +++ b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/0/T @@ -32,27 +32,23 @@ boundaryField inside { - type fixedValue; - value uniform 100; + type fixedValue; + value uniform 100; } - outside { - type fixedValue; - value uniform 100; + type fixedValue; + value uniform 100; } - front { - type empty; - //type symmetryPlane; + type empty; } - back { - type empty; - //type symmetryPlane; + type empty; } } + // ************************************************************************* // diff --git a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/0/U b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/0/U index cbe770106..dd1957b17 100644 --- a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/0/U +++ b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/0/U @@ -29,32 +29,31 @@ boundaryField { type symmetryPlane; } - inside { - type solidTraction; - traction uniform ( 0 0 0 ); - pressure uniform 50e6; - value uniform (0 0 0); + type solidTraction; + traction uniform ( 0 0 0 ); + pressure uniform 50e6; + DT k; + value uniform (0 0 0); } - outside { type solidTraction; traction uniform ( 0 0 0 ); pressure uniform 0.1e6; + DT k; value uniform (0 0 0); } - front { - type empty; + type empty; } - back { - type empty; + type empty; } } + // ************************************************************************* // diff --git a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/Allrun b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/Allrun index 1eb6aec58..394b0dcf8 100755 --- a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/Allrun +++ b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/Allrun @@ -9,4 +9,4 @@ runApplication blockMesh runApplication $application (cd analyticalHotCylinder && runApplication wmake) -runApplication analyticalHotCylinder \ No newline at end of file +runApplication analyticalHotCylinder diff --git a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/polyMesh/blockMeshDict b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/polyMesh/blockMeshDict index 5cd413a66..e0274395f 100644 --- a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/polyMesh/blockMeshDict +++ b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/polyMesh/blockMeshDict @@ -19,15 +19,14 @@ convertToMeters 1; vertices ( - (0 0.5 0) - (0.5 0 0) - (0.7 0 0) - (0 0.7 0) - (0 0.5 0.1) - (0.5 0 0.1) - (0.7 0 0.1) - (0 0.7 0.1) - + (0 0.5 0) + (0.5 0 0) + (0.7 0 0) + (0 0.7 0) + (0 0.5 0.1) + (0.5 0 0.1) + (0.7 0 0.1) + (0 0.7 0.1) ); blocks @@ -45,34 +44,30 @@ edges patches ( - + symmetryPlane left + ( + (4 7 3 0) + ) + symmetryPlane bottom + ( + (1 2 6 5) + ) + patch inside + ( + (0 1 5 4) + ) + patch outside + ( + (7 6 2 3) + ) empty back ( - (3 2 1 0) + (3 2 1 0) ) empty front ( - (4 5 6 7) - ) - - symmetryPlane left - ( - (4 7 3 0) - ) - - symmetryPlane bottom - ( - (1 2 6 5) - ) - - patch inside - ( - (0 1 5 4) - ) - patch outside - ( - (7 6 2 3) - ) + (4 5 6 7) + ) ); mergePatchPairs diff --git a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/polyMesh/boundary b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/polyMesh/boundary index 498479cec..44af09850 100644 --- a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/polyMesh/boundary +++ b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.0 | +| \\ / O peration | Version: 3.0 | | \\ / A nd | Web: http://www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,41 +17,41 @@ FoamFile 6 ( - back - { - type empty; - nFaces 600; - startFace 1130; - } - front - { - type empty; - nFaces 600; - startFace 1730; - } left { type symmetryPlane; nFaces 10; - startFace 2330; + startFace 1130; } bottom { type symmetryPlane; nFaces 10; - startFace 2340; + startFace 1140; } inside { type patch; nFaces 60; - startFace 2350; + startFace 1150; } outside { type patch; nFaces 60; - startFace 2410; + startFace 1210; + } + back + { + type empty; + nFaces 600; + startFace 1270; + } + front + { + type empty; + nFaces 600; + startFace 1870; } ) diff --git a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/thermalProperties b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/thermalProperties index 41a212479..a9d516ba9 100644 --- a/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/thermalProperties +++ b/tutorials/solidMechanics/elasticThermalSolidFoam/hotCylinder/constant/thermalProperties @@ -16,11 +16,12 @@ FoamFile thermal { - type constant; - C C [0 2 -2 -1 0 0 0] 434; - k k [1 1 -3 -1 0 0 0] 250; - alpha alpha [0 0 0 -1 0 0 0] 2.3e-05; - T0 T0 [0 0 0 1 0 0 0] 0; + type constant; + C C [0 2 -2 -1 0 0 0] 434; + k k [1 1 -3 -1 0 0 0] 250; + alpha alpha [0 0 0 -1 0 0 0] 2.3e-05; + T0 T0 [0 0 0 1 0 0 0] 0; } + // ************************************************************************* // From dd8104299811ec2ebb1c5c1ca155dfae38166a4a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 10 Apr 2014 20:55:00 +0100 Subject: [PATCH 60/66] Update for segregated FEM matrix --- .../femStress/Traction/TractionPointPatchVectorField.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/solvers/solidMechanics/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C b/applications/solvers/solidMechanics/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C index a10dadc9d..e86c31a73 100644 --- a/applications/solvers/solidMechanics/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C +++ b/applications/solvers/solidMechanics/stressFemFoam/femStress/Traction/TractionPointPatchVectorField.C @@ -230,7 +230,7 @@ addBoundarySourceDiag const vectorField& pointNormals = this->patch().pointNormals(); const label nFaces = this->patch().nFaces(); - vectorField& b = matrix.b(); + vectorField& b = matrix.source(); for (label faceI = 0; faceI < nFaces; faceI++) { From 9db44eed51fc031dd6e676b759701b814d29c6c6 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 11 Apr 2014 15:47:17 +0100 Subject: [PATCH 61/66] Added option to write empty sets --- .../parallelProcessing/decomposeSets/decomposeSets.C | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/applications/utilities/parallelProcessing/decomposeSets/decomposeSets.C b/applications/utilities/parallelProcessing/decomposeSets/decomposeSets.C index 765a9788b..ed3eb01e8 100644 --- a/applications/utilities/parallelProcessing/decomposeSets/decomposeSets.C +++ b/applications/utilities/parallelProcessing/decomposeSets/decomposeSets.C @@ -43,11 +43,16 @@ int main(int argc, char *argv[]) argList::noParallel(); # include "addRegionOption.H" + // Add option to write empty sets + argList::validOptions.insert("writeEmptySets", ""); + # include "setRootCase.H" # include "createTime.H" Info<< "Time = " << runTime.timeName() << endl; + bool writeEmptySets = args.optionFound("writeEmptySets"); + // Determine the processor count directly label nProcs = 0; while (isDir(args.path()/(word("processor") + name(nProcs)))) @@ -133,7 +138,7 @@ int main(int argc, char *argv[]) } } - if (!procSet.empty()) + if (!procSet.empty() || writeEmptySets) { // Set created, write it Info<< "Writing point set " << set.name() @@ -179,7 +184,7 @@ int main(int argc, char *argv[]) } } - if (!procSet.empty()) + if (!procSet.empty() || writeEmptySets) { // Set created, write it Info<< "Writing face set " << set.name() @@ -223,7 +228,7 @@ int main(int argc, char *argv[]) } } - if (!procSet.empty()) + if (!procSet.empty() || writeEmptySets) { // Set created, write it Info<< "Writing cell set " << set.name() From 9e35f5c2c4b0636e4d711c1a98ff6527e390a4b2 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 11 Apr 2014 15:48:13 +0100 Subject: [PATCH 62/66] Removed size check: may interfere with parallel communication --- src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 1c10647b7..8f25b622c 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -738,7 +738,7 @@ Foam::tmp > Foam::fvMatrix::DD() const { const fvPatchField& ptf = psi_.boundaryField()[patchI]; - if (!ptf.coupled() && ptf.size()) + if (!ptf.coupled()) { addToInternalField ( From 1ed37f5e88029728d14b88cbb4931b5b66d2c0a5 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 11 Apr 2014 15:49:20 +0100 Subject: [PATCH 63/66] Formatting --- src/finiteVolume/fvMesh/wallDist/reflectionVectors.C | 3 +-- src/finiteVolume/fvMesh/wallDist/wallDist.C | 5 +++-- src/finiteVolume/fvMesh/wallDist/wallDistData.C | 3 ++- src/meshTools/cellDist/cellDistFuncs.H | 4 +++- src/meshTools/cellDist/patchWave/patchWave.C | 1 + src/meshTools/cellDist/patchWave/patchWave.H | 2 +- src/meshTools/cellDist/wallPoint/wallPoint.H | 8 +++++--- src/meshTools/cellDist/wallPoint/wallPointData.H | 2 +- src/meshTools/meshSearch/meshSearch.H | 8 ++++---- .../meshToMesh/calculateMeshToMeshAddressing.C | 10 ++++------ 10 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C b/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C index 39ce85dfd..b2a5a6d57 100644 --- a/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C +++ b/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C @@ -49,13 +49,12 @@ Foam::reflectionVectors::reflectionVectors(const Foam::fvMesh& mesh) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - void Foam::reflectionVectors::correct() { const fvMesh& mesh = n_.mesh(); const fvPatchList& patches = mesh.boundary(); - forAll(patches, patchi) + forAll (patches, patchi) { // find the nearest face for every cell if (patches[patchi].isWall()) diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist.C index cc51ec843..65fb89159 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDist.C @@ -69,7 +69,8 @@ void Foam::wallDist::correct() // AJ: make sure to pick up all patches that are specified as a wall const polyBoundaryMesh& bMesh = cellDistFuncs::mesh().boundaryMesh(); labelHashSet wallPatchIDs(bMesh.size()); - forAll(bMesh, patchI) + + forAll (bMesh, patchI) { if (bMesh[patchI].isWall()) { @@ -87,7 +88,7 @@ void Foam::wallDist::correct() transfer(wave.distance()); // Transfer values on patches into boundaryField of *this - forAll(boundaryField(), patchI) + forAll (boundaryField(), patchI) { if (!isA(boundaryField()[patchI])) { diff --git a/src/finiteVolume/fvMesh/wallDist/wallDistData.C b/src/finiteVolume/fvMesh/wallDist/wallDistData.C index 5315c75f3..3f6cb68de 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDistData.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDistData.C @@ -72,7 +72,8 @@ Foam::wallDistData::~wallDistData() template void Foam::wallDistData::correct() { - Info<< "wallDistData.correct() called" << endl; + Info<< "wallDistData.correct() called" << endl; + const polyMesh& mesh = cellDistFuncs::mesh(); // diff --git a/src/meshTools/cellDist/cellDistFuncs.H b/src/meshTools/cellDist/cellDistFuncs.H index 978c1d25f..ffe18704c 100644 --- a/src/meshTools/cellDist/cellDistFuncs.H +++ b/src/meshTools/cellDist/cellDistFuncs.H @@ -80,10 +80,12 @@ class cellDistFuncs //- Disallow default bitwise assignment void operator=(const cellDistFuncs&); + public: ClassName("cellDistFuncs"); + // Constructors //- Construct from mesh @@ -101,7 +103,7 @@ public: //- Get patchIDs of named patches labelHashSet getPatchIDs(const wordList&) const; - //- Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch') + //- Get patchIDs of/derived off certain type (e.g. processorPolyPatch) // Uses isA, not isType template labelHashSet getPatchIDs() const; diff --git a/src/meshTools/cellDist/patchWave/patchWave.C b/src/meshTools/cellDist/patchWave/patchWave.C index 219e21362..0c5367b83 100644 --- a/src/meshTools/cellDist/patchWave/patchWave.C +++ b/src/meshTools/cellDist/patchWave/patchWave.C @@ -126,6 +126,7 @@ Foam::label Foam::patchWave::getValues(const MeshWave& waveInfo) } } } + return nIllegal; } diff --git a/src/meshTools/cellDist/patchWave/patchWave.H b/src/meshTools/cellDist/patchWave/patchWave.H index 75501a7d9..235e86a37 100644 --- a/src/meshTools/cellDist/patchWave/patchWave.H +++ b/src/meshTools/cellDist/patchWave/patchWave.H @@ -109,6 +109,7 @@ public: bool correctWalls = true ); + // Destructor virtual ~patchWave(); @@ -145,7 +146,6 @@ public: { return patchDistance_; } - }; diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.H b/src/meshTools/cellDist/wallPoint/wallPoint.H index 9304bf545..dc86944f2 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.H +++ b/src/meshTools/cellDist/wallPoint/wallPoint.H @@ -71,6 +71,7 @@ class wallPoint //- normal distance (squared) from cellcenter to origin scalar distSqr_; + // Private Member Functions //- Evaluate distance to point. Update distSqr, origin from whomever @@ -88,7 +89,7 @@ public: // Static data members - //- initial point far away. + //- Initial point far away static point greatPoint; @@ -130,7 +131,8 @@ public: // still contains original (invalid) value. inline bool valid() const; - //- Check for identical geometrical data. Used for cyclics checking. + //- Check for identical geometrical data + // Used for cyclics checking inline bool sameGeometry ( const polyMesh&, @@ -138,7 +140,7 @@ public: const scalar ) const; - //- Convert any absolute coordinates into relative to (patch)face + //- Convert any absolute coordinates into relative to (patch) face // centre inline void leaveDomain ( diff --git a/src/meshTools/cellDist/wallPoint/wallPointData.H b/src/meshTools/cellDist/wallPoint/wallPointData.H index 9001478f8..007f41eba 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointData.H +++ b/src/meshTools/cellDist/wallPoint/wallPointData.H @@ -65,7 +65,7 @@ class wallPointData { // Private data - //- data at nearest wall center + //- Data at nearest wall center Type data_; diff --git a/src/meshTools/meshSearch/meshSearch.H b/src/meshTools/meshSearch/meshSearch.H index 110b8c84e..00017fc4c 100644 --- a/src/meshTools/meshSearch/meshSearch.H +++ b/src/meshTools/meshSearch/meshSearch.H @@ -135,7 +135,7 @@ class meshSearch ) const; //- Calculate offset vector in direction dir with as length a - // fraction of the cell size (of the cell straddling boundary face) + // fraction of the cell size of the cell straddling boundary face vector offset ( const point& bPoint, @@ -183,14 +183,14 @@ public: return mesh_; } - //- Get (demand driven) reference to octree holding all + //- Get demand driven reference to octree holding all // boundary faces const indexedOctree& boundaryTree() const; - //- Get (demand driven) reference to octree holding all cells + //- Get demand driven reference to octree holding all cells const indexedOctree& cellTree() const; - //- Get (demand driven) reference to octree holding all cell centres + //- Get demand driven reference to octree holding all cell centres const indexedOctree& cellCentreTree() const; diff --git a/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C b/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C index 760b37c0a..296fb963c 100644 --- a/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C +++ b/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C @@ -244,10 +244,9 @@ void meshToMesh::cellAddresses bool forceFind ) const { - label nCellsOutsideAddressing = 0; - // the implemented search method is a simple neighbour array search. + // The implemented search method is a simple neighbour array search. // It starts from a cell zero, searches its neighbours and finds one // which is nearer to the target point than the current position. // The location of the "current position" is reset to that cell and @@ -264,7 +263,6 @@ void meshToMesh::cellAddresses forAll (points, toI) { - scalar localTol = cellCentreDistanceTol; bool isBoundary = false; @@ -272,7 +270,7 @@ void meshToMesh::cellAddresses // pick up target position const vector& p = points[toI]; - // set the sqr-distance + // Set the sqr-distance scalar distSqr = magSqr(p - centresFrom[curCell]); bool closer; @@ -281,7 +279,7 @@ void meshToMesh::cellAddresses { closer = false; - // set the current list of neighbouring cells + // Set the current list of neighbouring cells const labelList& neighbours = cc[curCell]; forAll (neighbours, nI) @@ -289,7 +287,7 @@ void meshToMesh::cellAddresses scalar curDistSqr = magSqr(p - centresFrom[neighbours[nI]]); - // search through all the neighbours. + // Search through all the neighbours. // If the cell is closer, reset current cell and distance if (curDistSqr < (1 - SMALL)*distSqr) { From 78877f093028b2a8cde999b01b6527def532160f Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Fri, 2 May 2014 16:43:01 +0200 Subject: [PATCH 64/66] FEAT: foamMeshToElmer & fluentMeshToElmer utilities --- .../conversion/fluent3DMeshToElmer/Make/files | 3 + .../fluent3DMeshToElmer/Make/options | 9 + .../fluent3DMeshToElmer/fluent3DMeshToElmer.L | 1392 +++++++++++++++++ .../conversion/foamMeshToElmer/Make/files | 3 + .../conversion/foamMeshToElmer/Make/options | 6 + .../foamMeshToElmer/foamMeshToElmer.C | 122 ++ .../conversion/foamMeshToElmer/getTimeIndex.H | 51 + src/conversion/Make/files | 1 + .../meshWriter/elmer/ElmerMeshWriter.C | 560 +++++++ .../meshWriter/elmer/ElmerMeshWriter.H | 93 ++ 10 files changed, 2240 insertions(+) create mode 100644 applications/utilities/mesh/conversion/fluent3DMeshToElmer/Make/files create mode 100644 applications/utilities/mesh/conversion/fluent3DMeshToElmer/Make/options create mode 100644 applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L create mode 100644 applications/utilities/mesh/conversion/foamMeshToElmer/Make/files create mode 100644 applications/utilities/mesh/conversion/foamMeshToElmer/Make/options create mode 100644 applications/utilities/mesh/conversion/foamMeshToElmer/foamMeshToElmer.C create mode 100644 applications/utilities/mesh/conversion/foamMeshToElmer/getTimeIndex.H create mode 100644 src/conversion/meshWriter/elmer/ElmerMeshWriter.C create mode 100644 src/conversion/meshWriter/elmer/ElmerMeshWriter.H diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToElmer/Make/files b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/Make/files new file mode 100644 index 000000000..e5892c56d --- /dev/null +++ b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/Make/files @@ -0,0 +1,3 @@ +fluent3DMeshToElmer.L + +EXE = $(FOAM_APPBIN)/fluent3DMeshToElmer diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToElmer/Make/options b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/Make/options new file mode 100644 index 000000000..4803cbfb1 --- /dev/null +++ b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/Make/options @@ -0,0 +1,9 @@ +EXE_INC = \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/conversion/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude + +EXE_LIBS = \ + -lmeshTools \ + -lconversion \ + -ldynamicMesh diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L new file mode 100644 index 000000000..02a76d7e5 --- /dev/null +++ b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L @@ -0,0 +1,1392 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | + \\ / A nd | For copyright notice see file Copyright + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with foam-extend. If not, see . + +Application + fluent3DMeshToFoam + +Description + Converts a Fluent mesh to FOAM format. + +\*---------------------------------------------------------------------------*/ + +%{ +#undef yyFlexLexer + + /* ------------------------------------------------------------------------ *\ + ------ local definitions + \* ------------------------------------------------------------------------ */ + +#include "argList.H" +#include "objectRegistry.H" +#include "Time.H" +#include "polyMesh.H" +#include "directTopoChange.H" +#include "polyMeshZipUpCells.H" +#include "wallPolyPatch.H" +#include "symmetryPolyPatch.H" +#include "cyclicPolyPatch.H" +#include "Swap.H" +#include "IFstream.H" +#include "wordIOList.H" +#include "readHexLabel.H" +#include "ElmerMeshWriter.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Line number +label lineNo = 1; + +// Scale factor used to scale points (optional command line argument) +scalar scaleFactor = 1.0; + +label dimensionOfGrid = 0; +label nPoints = 0; +label nFaces = 0; +label nCells = 0; + +bool hangingNodes = false; + +pointField points(0); +faceList faces(0); +labelList owner(0); +labelList neighbour(0); + +// Group type and name +Map groupType(100); +Map groupName(100); + +// Point groups +DynamicList