From fe8545958a06602aaa67aa854a8a375b611c79cd Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 24 Jan 2011 17:32:54 +0000 Subject: [PATCH 01/11] ENH: mapDistribute: extra printing --- .../meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C index 54d8690dee..25e7727c8e 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C @@ -222,7 +222,7 @@ void Foam::mapDistribute::printLayout(Ostream& os) const localSize = maxIndex[Pstream::myProcNo()]+1; } - os << "Layout:" << endl + os << "Layout: (constructSize:" << constructSize_ << ")" << endl << "local (processor " << Pstream::myProcNo() << "):" << endl << " start : 0" << endl << " size : " << localSize << endl; From 0ecf34e2f2640951fa533008fdf65ff4769bbbb1 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 24 Jan 2011 17:33:19 +0000 Subject: [PATCH 02/11] BUG: volPointInterpolate.C: incorrect index --- .../interpolation/volPointInterpolation/volPointInterpolate.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index d2841c9c54..5e7194dca8 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -120,7 +120,7 @@ void volPointInterpolation::pushUntransformedData const labelList& slavePoints = slaves[i]; // Copy master data to slave slots - forAll(slaves, j) + forAll(slavePoints, j) { elems[slavePoints[j]] = elems[i]; } From be54c0266867ed70f58ff72a4e608f8d92f56caf Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 24 Jan 2011 17:34:01 +0000 Subject: [PATCH 03/11] STYLE: twoPhaseMixture: corrected comment --- .../incompressibleTwoPhaseMixture/twoPhaseMixture.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H index 13a7c47f88..732225f5e6 100644 --- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H +++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -146,7 +146,7 @@ public: return nu_; } - //- Return the face-interpolated dynamic laminar viscosity + //- Return the face-interpolated kinematic laminar viscosity tmp nuf() const; //- Correct the laminar viscosity From daf429d879bb0e40a1b6525d6fc393ad370b2de2 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 24 Jan 2011 17:59:00 +0000 Subject: [PATCH 04/11] BUG: mapDistributeTemplates.C : truncating before transformation applied --- .../mapPolyMesh/mapDistribute/mapDistributeTemplates.C | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C index 68e6cb7acb..f72b83dd45 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C @@ -966,8 +966,6 @@ void Foam::mapDistribute::reverseDistribute const bool dummyTransform ) const { - fld.setSize(constructSize); - if (dummyTransform) { applyDummyInverseTransforms(fld); @@ -1024,8 +1022,6 @@ void Foam::mapDistribute::reverseDistribute const bool dummyTransform ) const { - fld.setSize(constructSize); - if (dummyTransform) { applyDummyInverseTransforms(fld); From 4877156db8d43db2e0e8e30fd8bcf05f1fb76be1 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 25 Jan 2011 12:16:52 +0000 Subject: [PATCH 05/11] COMP: Allwmake : allow build-type argument to pass through into wmake --- src/Pstream/Allwmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake index cc3329e384..ec3b07a859 100755 --- a/src/Pstream/Allwmake +++ b/src/Pstream/Allwmake @@ -2,7 +2,10 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso dummy +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption dummy case "$WM_MPLIB" in *MPI*) @@ -11,7 +14,7 @@ case "$WM_MPLIB" in echo "Note: ignore spurious warnings about missing mpicxx.h headers" set -x # force compilation into qualified directory - WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake libso mpi + WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake $makeOption mpi ;; #GAMMA) From 0b625c20616b0fec2d41fba75769c595f87e9013 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 25 Jan 2011 14:52:42 +0000 Subject: [PATCH 06/11] ENH: Re-worked cloud i-o for inactive cloud --- .../Templates/KinematicCloud/KinematicCloud.C | 164 ++++++++++-------- .../Templates/KinematicCloud/KinematicCloud.H | 6 + .../Templates/ReactingCloud/ReactingCloud.C | 50 ++++-- .../Templates/ReactingCloud/ReactingCloud.H | 8 +- .../ReactingMultiphaseCloud.C | 48 +++-- .../ReactingMultiphaseCloud.H | 8 +- .../Templates/ThermoCloud/ThermoCloud.C | 56 +++--- .../Templates/ThermoCloud/ThermoCloud.H | 8 +- .../KinematicParcel/KinematicParcel.H | 20 ++- .../KinematicParcel/KinematicParcelI.H | 31 ++-- .../ReactingMultiphaseParcel.H | 8 +- .../ReactingMultiphaseParcelI.H | 35 ++-- .../Templates/ReactingParcel/ReactingParcel.H | 12 +- .../ReactingParcel/ReactingParcelI.H | 25 ++- .../Templates/ThermoParcel/ThermoParcel.H | 18 +- .../Templates/ThermoParcel/ThermoParcelI.H | 31 ++-- .../particleForces/particleForces.C | 50 +++--- .../particleForces/particleForces.H | 5 +- 18 files changed, 370 insertions(+), 213 deletions(-) diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index bec5531f4d..fc589f5388 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -74,7 +74,7 @@ Foam::KinematicCloud::cloudSolution::cloudSolution coupled_(false), cellValueSourceCorrection_(false), maxTrackTime_(0.0), - resetSourcesOnStartup_(false) + resetSourcesOnStartup_(true) { if (active_) { @@ -188,6 +188,84 @@ bool Foam::KinematicCloud::cloudSolution::output() const // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // +template +void Foam::KinematicCloud::setModels() +{ + collisionModel_.reset + ( + CollisionModel >::New + ( + subModelProperties_, + *this + ).ptr() + ); + + dispersionModel_.reset + ( + DispersionModel >::New + ( + subModelProperties_, + *this + ).ptr() + ); + + dragModel_.reset + ( + DragModel >::New + ( + subModelProperties_, + *this + ).ptr() + ); + + injectionModel_.reset + ( + InjectionModel >::New + ( + subModelProperties_, + *this + ).ptr() + ); + + patchInteractionModel_.reset + ( + PatchInteractionModel >::New + ( + subModelProperties_, + *this + ).ptr() + ); + + postProcessingModel_.reset + ( + PostProcessingModel >::New + ( + subModelProperties_, + *this + ).ptr() + ); + + surfaceFilmModel_.reset + ( + SurfaceFilmModel >::New + ( + subModelProperties_, + *this, + g_ + ).ptr() + ); + + UIntegrator_.reset + ( + vectorIntegrationScheme::New + ( + "U", + solution_.integrationSchemes() + ).ptr() + ); +} + + template void Foam::KinematicCloud::solve ( @@ -450,8 +528,8 @@ Foam::KinematicCloud::KinematicCloud ) ), solution_(mesh_, particleProperties_.subDict("solution")), - constProps_(particleProperties_), - subModelProperties_(particleProperties_.subDict("subModels")), + constProps_(particleProperties_, solution_.active()), + subModelProperties_(particleProperties_.subOrEmptyDict("subModels")), rndGen_ ( label(0), @@ -462,72 +540,15 @@ Foam::KinematicCloud::KinematicCloud U_(U), mu_(mu), g_(g), - forces_(mesh_, particleProperties_, g_.value()), - collisionModel_ - ( - CollisionModel >::New - ( - subModelProperties_, - *this - ) - ), - dispersionModel_ - ( - DispersionModel >::New - ( - subModelProperties_, - *this - ) - ), - dragModel_ - ( - DragModel >::New - ( - subModelProperties_, - *this - ) - ), - injectionModel_ - ( - InjectionModel >::New - ( - subModelProperties_, - *this - ) - ), - patchInteractionModel_ - ( - PatchInteractionModel >::New - ( - subModelProperties_, - *this - ) - ), - postProcessingModel_ - ( - PostProcessingModel >::New - ( - subModelProperties_, - *this - ) - ), - surfaceFilmModel_ - ( - SurfaceFilmModel >::New - ( - subModelProperties_, - *this, - g - ) - ), - UIntegrator_ - ( - vectorIntegrationScheme::New - ( - "U", - solution_.integrationSchemes() - ) - ), + forces_(mesh_, particleProperties_, g_.value(), solution_.active()), + collisionModel_(NULL), + dispersionModel_(NULL), + dragModel_(NULL), + injectionModel_(NULL), + patchInteractionModel_(NULL), + postProcessingModel_(NULL), + surfaceFilmModel_(NULL), + UIntegrator_(NULL), UTrans_ ( new DimensionedField @@ -561,6 +582,11 @@ Foam::KinematicCloud::KinematicCloud ) ) { + if (solution_.active()) + { + setModels(); + } + if (readFields) { ParcelType::readFields(*this); diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index 69042c2705..dace4a6522 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -364,6 +364,12 @@ protected: autoPtr > UCoeff_; + // Initialisation + + //- Set cloud sub-models + void setModels(); + + // Cloud evolution functions //- Solve the cloud - calls all evolution functions diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index 6d32ddcd24..a8bb92cb5a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,6 +30,29 @@ License // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // +template +void Foam::ReactingCloud::setModels() +{ + compositionModel_.reset + ( + CompositionModel >::New + ( + this->subModelProperties(), + *this + ).ptr() + ); + + phaseChangeModel_.reset + ( + PhaseChangeModel >::New + ( + this->subModelProperties(), + *this + ).ptr() + ); +} + + template void Foam::ReactingCloud::checkSuppliedComposition ( @@ -85,26 +108,17 @@ Foam::ReactingCloud::ReactingCloud ThermoCloud(cloudName, rho, U, g, thermo, false), reactingCloud(), cloudCopyPtr_(NULL), - constProps_(this->particleProperties()), - compositionModel_ - ( - CompositionModel >::New - ( - this->subModelProperties(), - *this - ) - ), - phaseChangeModel_ - ( - PhaseChangeModel >::New - ( - this->subModelProperties(), - *this - ) - ), + constProps_(this->particleProperties(), this->solution().active()), + compositionModel_(NULL), + phaseChangeModel_(NULL), rhoTrans_(thermo.carrier().species().size()), dMassPhaseChange_(0.0) { + if (this->solution().active()) + { + setModels(); + } + // Set storage for mass source fields and initialise to zero forAll(rhoTrans_, i) { diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H index 92529eddf1..1ffbff55de 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,6 +128,12 @@ protected: ); + // Initialisation + + //- Set cloud sub-models + void setModels(); + + // Cloud evolution functions //- Reset state of cloud diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C index fc33d58434..a52babd0ef 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C @@ -30,6 +30,29 @@ License // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // +template +void Foam::ReactingMultiphaseCloud::setModels() +{ + devolatilisationModel_.reset + ( + DevolatilisationModel >::New + ( + this->subModelProperties(), + *this + ).ptr() + ); + + surfaceReactionModel_.reset + ( + SurfaceReactionModel >::New + ( + this->subModelProperties(), + *this + ).ptr() + ); +} + + template void Foam::ReactingMultiphaseCloud::cloudReset ( @@ -62,26 +85,17 @@ Foam::ReactingMultiphaseCloud::ReactingMultiphaseCloud ReactingCloud(cloudName, rho, U, g, thermo, false), reactingMultiphaseCloud(), cloudCopyPtr_(NULL), - constProps_(this->particleProperties()), - devolatilisationModel_ - ( - DevolatilisationModel >::New - ( - this->subModelProperties(), - *this - ) - ), - surfaceReactionModel_ - ( - SurfaceReactionModel >::New - ( - this->subModelProperties(), - *this - ) - ), + constProps_(this->particleProperties(), this->solution().active()), + devolatilisationModel_(NULL), + surfaceReactionModel_(NULL), dMassDevolatilisation_(0.0), dMassSurfaceReaction_(0.0) { + if (this->solution().active()) + { + setModels(); + } + if (readFields) { ParcelType::readFields(*this); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H index 8226112fd7..2c71a6b475 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -119,6 +119,12 @@ protected: // Protected Member Functions + // Initialisation + + //- Set cloud sub-models + void setModels(); + + // Cloud evolution functions //- Reset state of cloud diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index d11d1fb1f4..ae26e7999d 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,6 +30,31 @@ License // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // +template +void Foam::ThermoCloud::setModels() +{ + heatTransferModel_.reset + ( + HeatTransferModel >::New + ( + this->subModelProperties(), + *this + ).ptr() + ); + + TIntegrator_.reset + ( + scalarIntegrationScheme::New + ( + "T", + this->solution().integrationSchemes() + ).ptr() + ); + + this->subModelProperties().lookup("radiation") >> radiation_; +} + + template void Foam::ThermoCloud::cloudReset(ThermoCloud& c) { @@ -66,27 +91,13 @@ Foam::ThermoCloud::ThermoCloud ), thermoCloud(), cloudCopyPtr_(NULL), - constProps_(this->particleProperties()), + constProps_(this->particleProperties(), this->solution().active()), thermo_(thermo), T_(thermo.thermo().T()), p_(thermo.thermo().p()), - heatTransferModel_ - ( - HeatTransferModel >::New - ( - this->subModelProperties(), - *this - ) - ), - TIntegrator_ - ( - scalarIntegrationScheme::New - ( - "T", - this->solution().integrationSchemes() - ) - ), - radiation_(this->subModelProperties().lookup("radiation")), + heatTransferModel_(NULL), + TIntegrator_(NULL), + radiation_(false), hsTrans_ ( new DimensionedField @@ -121,6 +132,11 @@ Foam::ThermoCloud::ThermoCloud ) { + if (this->solution().active()) + { + setModels(); + } + if (readFields) { ParcelType::readFields(*this); @@ -143,7 +159,7 @@ Foam::ThermoCloud::ThermoCloud KinematicCloud(c, name), thermoCloud(), cloudCopyPtr_(NULL), - constProps_(c.particleProperties_), + constProps_(c.constProps_), thermo_(c.thermo_), T_(c.T()), p_(c.p()), diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H index d3a72fcb41..b2dc16dd67 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,6 +128,12 @@ protected: // Protected Member Functions + // Initialisation + + //- Set cloud sub-models + void setModels(); + + // Cloud evolution functions //- Reset state of cloud diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index 1517ec6805..003e07ee46 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,22 +98,22 @@ public: //- Parcel type id - used for post-processing to flag the type // of parcels issued by this cloud - const label parcelTypeId_; + label parcelTypeId_; //- Minimum density [kg/m3] - const scalar rhoMin_; + scalar rhoMin_; //- Particle density [kg/m3] (constant) - const scalar rho0_; + scalar rho0_; //- Minimum particle mass [kg] - const scalar minParticleMass_; + scalar minParticleMass_; //- Young's modulus [N/m2] - const scalar youngsModulus_; + scalar youngsModulus_; //- Poisson's ratio - const scalar poissonsRatio_; + scalar poissonsRatio_; public: @@ -127,7 +127,11 @@ public: constantProperties(const constantProperties& cp); //- Constructor from dictionary - constantProperties(const dictionary& parentDict); + constantProperties + ( + const dictionary& parentDict, + const bool readFields = true + ); // Member functions diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H index 80ae588646..bdf143cbe5 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,17 +62,28 @@ inline Foam::KinematicParcel::constantProperties::constantProperties template inline Foam::KinematicParcel::constantProperties::constantProperties ( - const dictionary& parentDict + const dictionary& parentDict, + const bool readFields ) : - dict_(parentDict.subDict("constantProperties")), - parcelTypeId_(readLabel(dict_.lookup("parcelTypeId"))), - rhoMin_(readScalar(dict_.lookup("rhoMin"))), - rho0_(readScalar(dict_.lookup("rho0"))), - minParticleMass_(readScalar(dict_.lookup("minParticleMass"))), - youngsModulus_(readScalar(dict_.lookup("youngsModulus"))), - poissonsRatio_(readScalar(dict_.lookup("poissonsRatio"))) -{} + dict_(parentDict.subOrEmptyDict("constantProperties")), + parcelTypeId_(-1), + rhoMin_(0.0), + rho0_(0.0), + minParticleMass_(0.0), + youngsModulus_(0.0), + poissonsRatio_(0.0) +{ + if (readFields) + { + dict_.lookup("parcelTypeId") >> parcelTypeId_; + dict_.lookup("rhoMin") >> rhoMin_; + dict_.lookup("rho0") >> rho0_; + dict_.lookup("minParticleMass") >> minParticleMass_; + dict_.lookup("youngsModulus") >> youngsModulus_; + dict_.lookup("poissonsRatio") >> poissonsRatio_; + } +} template diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H index 04e57d0a7a..f495bc3d5a 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H @@ -82,7 +82,7 @@ public: // Private data //- Latent heat of devolatilisation [J/kg] - const scalar LDevol_; + scalar LDevol_; //- Fraction of enthalpy retained by parcel due to surface // reactions @@ -100,7 +100,11 @@ public: constantProperties(const constantProperties& cp); //- Constructor from dictionary - constantProperties(const dictionary& parentDict); + constantProperties + ( + const dictionary& parentDict, + const bool readFields = true + ); // Access diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H index 0eb2f4aa7f..cc574ef5a3 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,24 +54,31 @@ template inline Foam::ReactingMultiphaseParcel::constantProperties:: constantProperties ( - const dictionary& parentDict + const dictionary& parentDict, + const bool readFields ) : - ReactingParcel::constantProperties(parentDict), - LDevol_(readScalar(this->dict().lookup("LDevol"))), - hRetentionCoeff_(readScalar(this->dict().lookup("hRetentionCoeff"))) + ReactingParcel::constantProperties(parentDict, readFields), + LDevol_(0.0), + hRetentionCoeff_(0.0) { - if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1)) + if (readFields) { - FatalErrorIn - ( - "ReactingMultiphaseParcel::constantProperties::" - "constantProperties" - ) << "hRetentionCoeff must be in the range 0 to 1" << nl - << exit(FatalError) << endl; - } + this->dict().lookup("LDevol") >> LDevol_; + this->dict().lookup("hRetentionCoeff") >> hRetentionCoeff_; - hRetentionCoeff_ = max(1e-06, hRetentionCoeff_); + if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1)) + { + FatalErrorIn + ( + "ReactingMultiphaseParcel::constantProperties::" + "constantProperties" + ) << "hRetentionCoeff must be in the range 0 to 1" << nl + << exit(FatalError) << endl; + } + + hRetentionCoeff_ = max(1e-06, hRetentionCoeff_); + } } diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H index 70d0601ff0..3b1769bb40 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H @@ -77,16 +77,16 @@ public: // Private data //- Minimum pressure [Pa] - const scalar pMin_; + scalar pMin_; //- Constant volume flag - e.g. during mass transfer Switch constantVolume_; //- Vaporisation temperature [K] - const scalar Tvap_; + scalar Tvap_; //- Boiling point [K] - const scalar Tbp_; + scalar Tbp_; public: @@ -100,7 +100,11 @@ public: constantProperties(const constantProperties& cp); //- Constructor from dictionary - constantProperties(const dictionary& parentDict); + constantProperties + ( + const dictionary& parentDict, + const bool readFields = true + ); // Access diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H index c6c94ac118..e941681892 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,15 +54,24 @@ inline Foam::ReactingParcel::constantProperties::constantProperties template inline Foam::ReactingParcel::constantProperties::constantProperties ( - const dictionary& parentDict + const dictionary& parentDict, + const bool readFields ) : - ThermoParcel::constantProperties(parentDict), - pMin_(readScalar(this->dict().lookup("pMin"))), - constantVolume_(this->dict().lookup("constantVolume")), - Tvap_(readScalar(this->dict().lookup("Tvap"))), - Tbp_(readScalar(this->dict().lookup("Tbp"))) -{} + ThermoParcel::constantProperties(parentDict, readFields), + pMin_(0.0), + constantVolume_(false), + Tvap_(0.0), + Tbp_(0.0) +{ + if (readFields) + { + this->dict().lookup("pMin") >> pMin_; + this->dict().lookup("constantVolume") >> constantVolume_; + this->dict().lookup("Tvap") >> Tvap_; + this->dict().lookup("Tbp") >> Tbp_; + } +} template diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H index 7163f06c4b..e455c1773e 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H @@ -77,22 +77,22 @@ public: // Private data //- Particle initial temperature [K] - const scalar T0_; + scalar T0_; //- Minimum temperature [K] - const scalar TMin_; + scalar TMin_; //- Particle specific heat capacity [J/(kg.K)] - const scalar Cp0_; + scalar Cp0_; //- Particle emissivity [] (radiation) - const scalar epsilon0_; + scalar epsilon0_; //- Particle scattering factor [] (radiation) - const scalar f0_; + scalar f0_; //- Default carrier Prandtl number [] - const scalar Pr_; + scalar Pr_; public: @@ -106,7 +106,11 @@ public: constantProperties(const constantProperties& cp); //- Constructor from dictionary - constantProperties(const dictionary& parentDict); + constantProperties + ( + const dictionary& parentDict, + const bool readFields = true + ); // Member functions diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H index f39165c5cd..ada4b93a10 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,17 +57,28 @@ inline Foam::ThermoParcel::constantProperties::constantProperties template inline Foam::ThermoParcel::constantProperties::constantProperties ( - const dictionary& parentDict + const dictionary& parentDict, + const bool readFields ) : - KinematicParcel::constantProperties(parentDict), - T0_(readScalar(this->dict().lookup("T0"))), - TMin_(readScalar(this->dict().lookup("TMin"))), - Cp0_(readScalar(this->dict().lookup("Cp0"))), - epsilon0_(readScalar(this->dict().lookup("epsilon0"))), - f0_(readScalar(this->dict().lookup("f0"))), - Pr_(readScalar(this->dict().lookup("Pr"))) -{} + KinematicParcel::constantProperties(parentDict, readFields), + T0_(0.0), + TMin_(0.0), + Cp0_(0.0), + epsilon0_(0.0), + f0_(0.0), + Pr_(0.0) +{ + if (readFields) + { + this->dict().lookup("T0") >> T0_; + this->dict().lookup("TMin") >> TMin_; + this->dict().lookup("Cp0") >> Cp0_; + this->dict().lookup("epsilon0") >> epsilon0_; + this->dict().lookup("f0") >> f0_; + this->dict().lookup("Pr") >> Pr_; + } +} template diff --git a/src/lagrangian/intermediate/particleForces/particleForces.C b/src/lagrangian/intermediate/particleForces/particleForces.C index be189ba3e1..124b21c2e1 100644 --- a/src/lagrangian/intermediate/particleForces/particleForces.C +++ b/src/lagrangian/intermediate/particleForces/particleForces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -74,32 +74,41 @@ Foam::particleForces::particleForces ( const fvMesh& mesh, const dictionary& dict, - const vector& g + const vector& g, + const bool readFields ) : mesh_(mesh), - dict_(dict.subDict("particleForces")), + dict_(dict.subOrEmptyDict("particleForces")), g_(g), gradUPtr_(NULL), HdotGradHInterPtr_(NULL), - gravity_(dict_.lookup("gravity")), - virtualMass_(dict_.lookup("virtualMass")), + gravity_(false), + virtualMass_(false), Cvm_(0.0), - pressureGradient_(dict_.lookup("pressureGradient")), - paramagnetic_(dict_.lookup("paramagnetic")), + pressureGradient_(false), + paramagnetic_(false), magneticSusceptibility_(0.0), refFrame_(rfInertial), UName_(dict_.lookupOrDefault("UName", "U")), HdotGradHName_(dict_.lookupOrDefault("HdotGradHName", "HdotGradH")) { - if (virtualMass_) + if (readFields) { - dict_.lookup("Cvm") >> Cvm_; - } + dict_.lookup("gravity") >> gravity_; + dict_.lookup("virtualMass") >> virtualMass_; + dict_.lookup("pressureGradient") >> pressureGradient_; + dict_.lookup("paramagnetic") >> paramagnetic_; - if (paramagnetic_) - { - dict_.lookup("magneticSusceptibility") >> magneticSusceptibility_; + if (virtualMass_) + { + dict_.lookup("Cvm") >> Cvm_; + } + + if (paramagnetic_) + { + dict_.lookup("magneticSusceptibility") >> magneticSusceptibility_; + } } if (dict_.found("referenceFrame")) @@ -116,9 +125,10 @@ Foam::particleForces::particleForces ( "Foam::particleForces::particleForces" "(" - "const fvMesh& mesh," - "const dictionary& dict," - "const vector& g" + "const fvMesh&, " + "const dictionary&, " + "const vector&, " + "const bool" ")" ) << "Unknown referenceFrame, options are inertial and SRF." @@ -235,10 +245,8 @@ void Foam::particleForces::cacheFields if (paramagnetic_) { - const volVectorField& HdotGradH = mesh_.lookupObject - ( - HdotGradHName_ - ); + const volVectorField& HdotGradH = + mesh_.lookupObject(HdotGradHName_); HdotGradHInterPtr_ = interpolation::New ( @@ -329,7 +337,7 @@ Foam::vector Foam::particleForces::calcNonCoupled // *magneticSusceptibility_/(magneticSusceptibility_ + 3) // *HdotGradH[cellI]; - // which is divided by mass ((4/3)*pi*r^3*rho) to produce + // which is divided by mass (pi*d^3*rho/6) to produce // acceleration } diff --git a/src/lagrangian/intermediate/particleForces/particleForces.H b/src/lagrangian/intermediate/particleForces/particleForces.H index 5c537ff540..feb5ea8ee4 100644 --- a/src/lagrangian/intermediate/particleForces/particleForces.H +++ b/src/lagrangian/intermediate/particleForces/particleForces.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,7 +134,8 @@ public: ( const fvMesh& mesh, const dictionary& dict, - const vector& g + const vector& g, + const bool readFields = true ); //- Construct copy From f0b2a63e65e516d135424602a652c2bf7d81484a Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 25 Jan 2011 14:53:29 +0000 Subject: [PATCH 07/11] ENH: film tutorial updates --- .../evaporationTest/Allrun.pre | 2 +- .../constant/reactingCloud1Properties | 64 ------------------ .../system/extrudeToRegionMeshDict | 38 +++++++++++ .../reactingParcelFilmFoam/panel/Allrun.pre | 2 +- .../panel/constant/reactingCloud1Properties | 66 +------------------ .../panel/system/extrudeToRegionMeshDict | 38 +++++++++++ 6 files changed, 79 insertions(+), 131 deletions(-) create mode 100644 tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/system/extrudeToRegionMeshDict create mode 100644 tutorials/lagrangian/reactingParcelFilmFoam/panel/system/extrudeToRegionMeshDict diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/Allrun.pre index a3c9718bf6..a6e2612512 100755 --- a/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/Allrun.pre +++ b/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/Allrun.pre @@ -11,5 +11,5 @@ mv log.setSet log.wallFilmRegion.setSet runApplication setsToZones -noFlipMap mv log.setsToZones log.setsToZones.primaryRegion -runApplication extrudeToRegionMesh wallFilmRegion '(wallFilmFaces)' 0.01 -overwrite +runApplication extrudeToRegionMesh -overwrite diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/constant/reactingCloud1Properties index 6279e46c30..1f9b1416c0 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/constant/reactingCloud1Properties @@ -18,70 +18,6 @@ FoamFile solution { active false; - - integrationSchemes - { - U Euler; - T Analytical; - } -} - -constantProperties -{ - parcelTypeId 1; - - rhoMin 1e-15; - TMin 200; - pMin 1000; - minParticleMass 1e-15; - - rho0 1000; - T0 300; - Cp0 4187; - - epsilon0 1; - f0 0.5; - - Pr 0.7; - Tvap 273; - Tbp 373; - youngsModulus 0; - poissonsRatio 0; - - constantVolume false; -} - -particleForces -{ - gravity on; - virtualMass off; - pressureGradient off; - paramagnetic off; -} - -subModels -{ - InjectionModel none; - - DragModel none; - - DispersionModel none; - - PatchInteractionModel none; - - CollisionModel none; - - HeatTransferModel none; - - CompositionModel none; - - PhaseChangeModel none; - - PostProcessingModel none; - - SurfaceFilmModel none; - - radiation off; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/system/extrudeToRegionMeshDict b/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/system/extrudeToRegionMeshDict new file mode 100644 index 0000000000..ab1cc2e2de --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/system/extrudeToRegionMeshDict @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object extrudeToRegionMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +region wallFilmRegion; + +faceZones (wallFilmFaces); + +adaptMesh true; + +oneD false; + +extrudeModel linearNormal; + +nLayers 1; + +expansionRatio 1; + +linearNormalCoeffs +{ + thickness 0.01; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/panel/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/panel/Allrun.pre index 74726aadb0..9a69e3b490 100755 --- a/tutorials/lagrangian/reactingParcelFilmFoam/panel/Allrun.pre +++ b/tutorials/lagrangian/reactingParcelFilmFoam/panel/Allrun.pre @@ -6,7 +6,7 @@ runApplication blockMesh runApplication setSet -batch wallFilmRegion.setSet mv log.setSet log.wallFilmRegion.setSet -runApplication extrudeToRegionMesh wallFilmRegion '(wallFilmFaces)' 0.01 -overwrite +runApplication extrudeToRegionMesh -overwrite runApplication setSet -region wallFilmRegion -batch createWallFilmRegionPatches.setSet mv log.setSet log.createWallFilmRegionPatches.setSet diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/panel/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/panel/constant/reactingCloud1Properties index 78ac17426f..1f9b1416c0 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/panel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/panel/constant/reactingCloud1Properties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.com | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -18,70 +18,6 @@ FoamFile solution { active false; - - integrationSchemes - { - U Euler; - T Analytical; - } -} - -constantProperties -{ - parcelTypeId 1; - - rhoMin 1e-15; - TMin 200; - pMin 1000; - minParticleMass 1e-15; - - rho0 1000; - T0 300; - Cp0 4187; - - youngsModulus 1e9; - poissonsRatio 0.35; - - epsilon0 1; - f0 0.5; - Pr 0.7; - Tvap 273; - Tbp 373; - - constantVolume false; -} - -particleForces -{ - gravity on; - virtualMass off; - pressureGradient off; - paramagnetic off; -} - -subModels -{ - InjectionModel none; - - DragModel none; - - DispersionModel none; - - PatchInteractionModel none; - - HeatTransferModel none; - - CompositionModel none; - - PhaseChangeModel none; - - PostProcessingModel none; - - CollisionModel none; - - SurfaceFilmModel none; - - radiation off; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/panel/system/extrudeToRegionMeshDict b/tutorials/lagrangian/reactingParcelFilmFoam/panel/system/extrudeToRegionMeshDict new file mode 100644 index 0000000000..ab1cc2e2de --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFilmFoam/panel/system/extrudeToRegionMeshDict @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object extrudeToRegionMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +region wallFilmRegion; + +faceZones (wallFilmFaces); + +adaptMesh true; + +oneD false; + +extrudeModel linearNormal; + +nLayers 1; + +expansionRatio 1; + +linearNormalCoeffs +{ + thickness 0.01; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + From d404293a6fa848037f4315160844dc811f10feba Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 25 Jan 2011 14:56:38 +0000 Subject: [PATCH 08/11] ENH: Updated copyrights --- .../Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C | 2 +- .../ReactingMultiphaseParcel/ReactingMultiphaseParcel.H | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C index a52babd0ef..06dc0c339b 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H index f495bc3d5a..04b6525f66 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License From e1fd499c30dd53ec8ba3b9706d26cdcbb04a5bdb Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 26 Jan 2011 12:15:46 +0000 Subject: [PATCH 09/11] ENH: sampledTriSurfaceMesh : only sample non-coupled faces --- .../sampledTriSurfaceMesh.C | 64 ++++++++++++++++++- .../sampledTriSurfaceMesh.H | 37 +++++++++-- 2 files changed, 95 insertions(+), 6 deletions(-) diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C index 859db2f9af..3e3d56c6ed 100644 --- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C +++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C @@ -76,6 +76,63 @@ namespace Foam } +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +const Foam::indexedOctree& +Foam::sampledTriSurfaceMesh::nonCoupledboundaryTree() const +{ + // Variant of meshSearch::boundaryTree() that only does non-coupled + // boundary faces. + + if (!boundaryTreePtr_.valid()) + { + // all non-coupled boundary faces (not just walls) + const polyBoundaryMesh& patches = mesh().boundaryMesh(); + + labelList bndFaces(mesh().nFaces()-mesh().nInternalFaces()); + label bndI = 0; + forAll(patches, patchI) + { + const polyPatch& pp = patches[patchI]; + if (!pp.coupled()) + { + forAll(pp, i) + { + bndFaces[bndI++] = pp.start()+i; + } + } + } + bndFaces.setSize(bndI); + + + treeBoundBox overallBb(mesh().points()); + Random rndGen(123456); + overallBb = overallBb.extend(rndGen, 1E-4); + overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + + boundaryTreePtr_.reset + ( + new indexedOctree + ( + treeDataFace // all information needed to search faces + ( + false, // do not cache bb + mesh(), + bndFaces // boundary faces only + ), + overallBb, // overall search domain + 8, // maxLevel + 10, // leafsize + 3.0 // duplicity + ) + ); + } + + return boundaryTreePtr_(); +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh @@ -159,6 +216,8 @@ bool Foam::sampledTriSurfaceMesh::expire() sampledSurface::clearGeom(); MeshStorage::clear(); + + boundaryTreePtr_.clear(); sampleElements_.clear(); samplePoints_.clear(); @@ -224,7 +283,10 @@ bool Foam::sampledTriSurfaceMesh::update() { // Search for nearest boundaryFace - const indexedOctree& bTree = meshSearcher.boundaryTree(); + ////- Search on all (including coupled) boundary faces + //const indexedOctree& bTree = meshSearcher.boundaryTree() + //- Search on all non-coupled boundary faces + const indexedOctree& bTree = nonCoupledboundaryTree(); forAll(fc, triI) { diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H index 20426e576b..c54bf28dc0 100644 --- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H +++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H @@ -28,12 +28,31 @@ Description A sampledSurface from a triSurfaceMesh. It samples on the points/triangles of the triSurface. - It samples using the cell nearest to the triangle centre so does - not check the cell the centre is actually in ... + - it either samples cells or (non-coupled) boundary faces - In parallel every processor just operates on the part of the surface - where the face centres are inside the mesh. It is then up to the - caller to stitch the partial surfaces together. + - 4 different modes: + - source=cells, interpolate=false: + finds per triangle centre the nearest cell centre and uses its value + - source=cells, interpolate=true + finds per triangle centre the nearest cell centre. + Per surface point checks if this nearest cell is the one containing + point; otherwise projects the point onto the nearest point on + the boundary of the cell (to make sure interpolateCellPoint + gets a valid location) + + - source=boundaryFaces, interpolate=false: + finds per triangle centre the nearest point on the boundary + (uncoupled faces only) and uses the value (or 0 if the nearest + is on an empty boundary) + - source=boundaryFaces, interpolate=true: + finds per triangle centre the nearest point on the boundary + (uncoupled faces only). + Per surface point projects the point onto this boundary face + (to make sure interpolateCellPoint gets a valid location) + + - since it finds a nearest per triangle each triangle is guaranteed + to be on one processor only. So after stitching (by sampledSurfaces) + the original surface should be complete. SourceFiles sampledTriSurfaceMesh.C @@ -52,6 +71,8 @@ SourceFiles namespace Foam { +class treeDataFace; + /*---------------------------------------------------------------------------*\ Class sampledTriSurfaceMesh Declaration \*---------------------------------------------------------------------------*/ @@ -88,6 +109,9 @@ private: //- Track if the surface needs an update mutable bool needsUpdate_; + //- Search tree for all non-coupled boundary faces + mutable autoPtr > boundaryTreePtr_; + //- From local surface triangle to mesh cell/face. labelList sampleElements_; @@ -97,6 +121,9 @@ private: // Private Member Functions + //- Get tree of all non-coupled boundary faces + const indexedOctree& nonCoupledboundaryTree() const; + //- sample field on faces template tmp > sampleField From 8ee6502188493999e13ac1331d3f0519f4aee746 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 26 Jan 2011 16:57:31 +0000 Subject: [PATCH 10/11] STYLE: TimeIO : extraneous include file --- src/OpenFOAM/db/Time/TimeIO.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index 8bcb95df9a..da542524b7 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "Time.H" -#include "PstreamReduceOps.H" +#include "Pstream.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // From c9d6212006ecac078a9eb7845f82d8926929f5bf Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 26 Jan 2011 16:59:13 +0000 Subject: [PATCH 11/11] ENH: Allwmake : allow easy building of static libraries --- src/Allwmake | 63 ++++++++++---------- src/Pstream/Allwmake | 2 +- src/conversion/Allwmake | 5 +- src/dummyThirdParty/Allwmake | 11 ++-- src/fvAgglomerationMethods/Allwmake | 5 +- src/lagrangian/Allwmake | 17 +++--- src/lagrangian/molecularDynamics/Allwmake | 9 ++- src/mesh/Allwmake | 7 ++- src/parallel/Allwmake | 9 ++- src/parallel/decompose/Allwmake | 9 ++- src/parallel/reconstruct/Allwmake | 5 +- src/postProcessing/Allwmake | 9 ++- src/postProcessing/functionObjects/Allwmake | 15 +++-- src/thermophysicalModels/Allwmake | 37 ++++++------ src/transportModels/Allwmake | 11 ++-- src/turbulenceModels/Allwmake | 6 +- src/turbulenceModels/LES/Allwmake | 7 ++- src/turbulenceModels/compressible/Allwmake | 9 ++- src/turbulenceModels/incompressible/Allwmake | 9 ++- 19 files changed, 148 insertions(+), 97 deletions(-) diff --git a/src/Allwmake b/src/Allwmake index f3c4420474..4dbc726a21 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -1,6 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + wmakeCheckPwd "$WM_PROJECT_DIR/src" || { echo "Error: Current directory is not \$WM_PROJECT_DIR/src" echo " The environment variables are inconsistent with the installation." @@ -21,53 +24,53 @@ wmakePrintBuild -check || /bin/rm -f OpenFOAM/Make/$WM_OPTIONS/global.? 2>/dev/n wmakeLnInclude OpenFOAM wmakeLnInclude OSspecific/$WM_OSTYPE -Pstream/Allwmake +Pstream/Allwmake $* OSspecific/$WM_OSTYPE/Allwmake -wmake libso OpenFOAM +wmake $makeOption OpenFOAM -wmake libso fileFormats -wmake libso triSurface -wmake libso meshTools -wmake libso edgeMesh -wmake libso surfMesh +wmake $makeOption fileFormats +wmake $makeOption triSurface +wmake $makeOption meshTools +wmake $makeOption edgeMesh +wmake $makeOption surfMesh # Decomposition methods needed by dummyThirdParty parallel/decompose/AllwmakeLnInclude # dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools -dummyThirdParty/Allwmake +dummyThirdParty/Allwmake $* -wmake libso lagrangian/basic -wmake libso finiteVolume -wmake libso genericPatchFields +wmake $makeOption lagrangian/basic +wmake $makeOption finiteVolume +wmake $makeOption genericPatchFields # Build the proper scotchDecomp, metisDecomp etc. -parallel/Allwmake +parallel/Allwmake $* -wmake libso conversion +wmake $makeOption conversion -wmake libso sampling +wmake $makeOption sampling -wmake libso dynamicMesh -wmake libso dynamicFvMesh -wmake libso topoChangerFvMesh +wmake $makeOption dynamicMesh +wmake $makeOption dynamicFvMesh +wmake $makeOption topoChangerFvMesh -wmake libso ODE -wmake libso randomProcesses +wmake $makeOption ODE +wmake $makeOption randomProcesses -thermophysicalModels/Allwmake -transportModels/Allwmake -turbulenceModels/Allwmake -wmake libso surfaceFilmModels -lagrangian/Allwmake -postProcessing/Allwmake -mesh/Allwmake +thermophysicalModels/Allwmake $* +transportModels/Allwmake $* +turbulenceModels/Allwmake $* +wmake $makeOption surfaceFilmModels +lagrangian/Allwmake $* +postProcessing/Allwmake $* +mesh/Allwmake $* -wmake libso errorEstimation +wmake $makeOption errorEstimation -fvAgglomerationMethods/Allwmake +fvAgglomerationMethods/Allwmake $* -wmake libso fvMotionSolver -wmake libso engine +wmake $makeOption fvMotionSolver +wmake $makeOption engine # ----------------------------------------------------------------- end-of-file diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake index ec3b07a859..7a2f2cd308 100755 --- a/src/Pstream/Allwmake +++ b/src/Pstream/Allwmake @@ -18,7 +18,7 @@ case "$WM_MPLIB" in ;; #GAMMA) -# wmake libso gamma +# wmake $makeOption gamma # ;; esac diff --git a/src/conversion/Allwmake b/src/conversion/Allwmake index a7168eeab1..cf1e61d47d 100755 --- a/src/conversion/Allwmake +++ b/src/conversion/Allwmake @@ -2,6 +2,9 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption # ----------------------------------------------------------------- end-of-file diff --git a/src/dummyThirdParty/Allwmake b/src/dummyThirdParty/Allwmake index c584d92194..afd49cd5d9 100755 --- a/src/dummyThirdParty/Allwmake +++ b/src/dummyThirdParty/Allwmake @@ -2,10 +2,13 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso scotchDecomp -wmake libso ptscotchDecomp -wmake libso metisDecomp -wmake libso MGridGen +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption scotchDecomp +wmake $makeOption ptscotchDecomp +wmake $makeOption metisDecomp +wmake $makeOption MGridGen # ----------------------------------------------------------------- end-of-file diff --git a/src/fvAgglomerationMethods/Allwmake b/src/fvAgglomerationMethods/Allwmake index 17118db818..27f2fea53a 100755 --- a/src/fvAgglomerationMethods/Allwmake +++ b/src/fvAgglomerationMethods/Allwmake @@ -2,6 +2,9 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso MGridGenGamgAgglomeration +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption MGridGenGamgAgglomeration # ----------------------------------------------------------------- end-of-file diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake index 92993c516f..26fd814f63 100755 --- a/src/lagrangian/Allwmake +++ b/src/lagrangian/Allwmake @@ -2,13 +2,16 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso basic -wmake libso solidParticle -wmake libso intermediate -wmake libso dieselSpray -wmake libso dsmc -wmake libso coalCombustion +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 -molecularDynamics/Allwmake +wmake $makeOption basic +wmake $makeOption solidParticle +wmake $makeOption intermediate +wmake $makeOption dieselSpray +wmake $makeOption dsmc +wmake $makeOption coalCombustion + +molecularDynamics/Allwmake $* # ----------------------------------------------------------------- end-of-file diff --git a/src/lagrangian/molecularDynamics/Allwmake b/src/lagrangian/molecularDynamics/Allwmake index 3f5d397e72..131ec5d458 100755 --- a/src/lagrangian/molecularDynamics/Allwmake +++ b/src/lagrangian/molecularDynamics/Allwmake @@ -2,8 +2,11 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso potential -wmake libso molecularMeasurements -wmake libso molecule +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption potential +wmake $makeOption molecularMeasurements +wmake $makeOption molecule # ----------------------------------------------------------------- end-of-file diff --git a/src/mesh/Allwmake b/src/mesh/Allwmake index f967335db3..57df2d57bf 100755 --- a/src/mesh/Allwmake +++ b/src/mesh/Allwmake @@ -2,7 +2,10 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso autoMesh -wmake libso blockMesh +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption autoMesh +wmake $makeOption blockMesh # ----------------------------------------------------------------- end-of-file diff --git a/src/parallel/Allwmake b/src/parallel/Allwmake index 08ca4923f2..92d80e20a8 100755 --- a/src/parallel/Allwmake +++ b/src/parallel/Allwmake @@ -2,9 +2,12 @@ cd ${0%/*} || exit 1 # run from this directory set -x -decompose/Allwmake -reconstruct/Allwmake -wmake libso distributed +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +decompose/Allwmake $* +reconstruct/Allwmake $* +wmake $makeOption distributed # ----------------------------------------------------------------- end-of-file diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake index 51c23325cc..93835f6a24 100755 --- a/src/parallel/decompose/Allwmake +++ b/src/parallel/decompose/Allwmake @@ -1,6 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + # get SCOTCH_VERSION, SCOTCH_ARCH_PATH settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc` if [ -f "$settings" ] @@ -16,17 +19,17 @@ set -x wmakeLnInclude decompositionMethods -wmake libso scotchDecomp +wmake $makeOption scotchDecomp if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ] then ( WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB - wmake libso ptscotchDecomp + wmake $makeOption ptscotchDecomp ) fi -wmake libso decompositionMethods +wmake $makeOption decompositionMethods # ----------------------------------------------------------------- end-of-file diff --git a/src/parallel/reconstruct/Allwmake b/src/parallel/reconstruct/Allwmake index c4badc5067..453d88f50b 100755 --- a/src/parallel/reconstruct/Allwmake +++ b/src/parallel/reconstruct/Allwmake @@ -2,7 +2,10 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso reconstruct +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption reconstruct # ----------------------------------------------------------------- end-of-file diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake index 169c9c833f..d543c26fe1 100755 --- a/src/postProcessing/Allwmake +++ b/src/postProcessing/Allwmake @@ -2,9 +2,12 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libo postCalc -wmake libso foamCalcFunctions +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 -functionObjects/Allwmake +wmake libo postCalc +wmake $makeOption foamCalcFunctions + +functionObjects/Allwmake $* # ----------------------------------------------------------------- end-of-file diff --git a/src/postProcessing/functionObjects/Allwmake b/src/postProcessing/functionObjects/Allwmake index d8cbe09eb9..14bdd330e1 100755 --- a/src/postProcessing/functionObjects/Allwmake +++ b/src/postProcessing/functionObjects/Allwmake @@ -2,11 +2,14 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso field -wmake libso forces -wmake libso IO -wmake libso utilities -wmake libso jobControl -wmake libso systemCall +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption field +wmake $makeOption forces +wmake $makeOption IO +wmake $makeOption utilities +wmake $makeOption jobControl +wmake $makeOption systemCall # ----------------------------------------------------------------- end-of-file diff --git a/src/thermophysicalModels/Allwmake b/src/thermophysicalModels/Allwmake index 7b1b586b56..e622e3c15b 100755 --- a/src/thermophysicalModels/Allwmake +++ b/src/thermophysicalModels/Allwmake @@ -2,27 +2,30 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso specie -wmake libso solid -wmake libso thermophysicalFunctions -wmake libso liquids -wmake libso liquidMixture -wmake libso pointSolids -wmake libso pointSolidMixture +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 -wmake libso basic -wmake libso reactionThermo -wmake libso laminarFlameSpeed -wmake libso chemistryModel -wmake libso pdfs -wmake libso radiation -wmake libso barotropicCompressibilityModel -wmake libso thermalPorousZone +wmake $makeOption specie +wmake $makeOption solid +wmake $makeOption thermophysicalFunctions +wmake $makeOption liquids +wmake $makeOption liquidMixture +wmake $makeOption pointSolids +wmake $makeOption pointSolidMixture -wmake libso SLGThermo +wmake $makeOption basic +wmake $makeOption reactionThermo +wmake $makeOption laminarFlameSpeed +wmake $makeOption chemistryModel +wmake $makeOption pdfs +wmake $makeOption radiation +wmake $makeOption barotropicCompressibilityModel +wmake $makeOption thermalPorousZone + +wmake $makeOption SLGThermo # Should be combined with solids&solidMixture -wmake libso basicSolidThermo +wmake $makeOption basicSolidThermo # ----------------------------------------------------------------- end-of-file diff --git a/src/transportModels/Allwmake b/src/transportModels/Allwmake index 138f265357..703920418d 100755 --- a/src/transportModels/Allwmake +++ b/src/transportModels/Allwmake @@ -2,9 +2,12 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso incompressible -wmake libso interfaceProperties -wmake libso twoPhaseInterfaceProperties -# wmake libso compressible +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption incompressible +wmake $makeOption interfaceProperties +wmake $makeOption twoPhaseInterfaceProperties +# wmake $makeOption compressible # ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/Allwmake b/src/turbulenceModels/Allwmake index 80dc9dc1ee..e78f0c30dd 100755 --- a/src/turbulenceModels/Allwmake +++ b/src/turbulenceModels/Allwmake @@ -2,8 +2,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x -LES/Allwmake -incompressible/Allwmake -compressible/Allwmake +LES/Allwmake $* +incompressible/Allwmake $* +compressible/Allwmake $* # ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/LES/Allwmake b/src/turbulenceModels/LES/Allwmake index 00f3bf3ada..107251b422 100755 --- a/src/turbulenceModels/LES/Allwmake +++ b/src/turbulenceModels/LES/Allwmake @@ -2,9 +2,12 @@ cd ${0%/*} || exit 1 # run from this directory set -x +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + wmakeLnInclude ../incompressible/LES -wmake libso LESfilters -wmake libso LESdeltas +wmake $makeOption LESfilters +wmake $makeOption LESdeltas # ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/compressible/Allwmake b/src/turbulenceModels/compressible/Allwmake index ddff417018..a16b5f9c81 100755 --- a/src/turbulenceModels/compressible/Allwmake +++ b/src/turbulenceModels/compressible/Allwmake @@ -2,8 +2,11 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso turbulenceModel -wmake libso RAS -wmake libso LES +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption turbulenceModel +wmake $makeOption RAS +wmake $makeOption LES # ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/incompressible/Allwmake b/src/turbulenceModels/incompressible/Allwmake index ddff417018..a16b5f9c81 100755 --- a/src/turbulenceModels/incompressible/Allwmake +++ b/src/turbulenceModels/incompressible/Allwmake @@ -2,8 +2,11 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso turbulenceModel -wmake libso RAS -wmake libso LES +makeOption=libso +[ $# -ge 1 ] && makeOption=$1 + +wmake $makeOption turbulenceModel +wmake $makeOption RAS +wmake $makeOption LES # ----------------------------------------------------------------- end-of-file