diff --git a/applications/test/dataEntry/Make/files b/applications/test/dataEntry/Make/files index c514002f99e31cf9c1bad83a287c8b4e75ec16a1..a88ccad3bc9971d63b3c4a10bb5cc2b90741d4fd 100644 --- a/applications/test/dataEntry/Make/files +++ b/applications/test/dataEntry/Make/files @@ -1,3 +1,6 @@ Test-DataEntry.C +interpolationWeights.C +splineInterpolationWeights.C +linearInterpolationWeights.C EXE = $(FOAM_USER_APPBIN)/Test-DataEntry diff --git a/applications/test/dataEntry/Make/options b/applications/test/dataEntry/Make/options index a071d9557c9a05f70dd5fd00bb3b0d548e04e859..72cae9f645a286fae72b7657472cae89db7190a1 100644 --- a/applications/test/dataEntry/Make/options +++ b/applications/test/dataEntry/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -DFULLDEBUG -g -O0 \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ diff --git a/applications/test/dataEntry/Test-DataEntry.C b/applications/test/dataEntry/Test-DataEntry.C index 92761b1d019024c2a60672a09a967f16e3fa4074..a47a29be2433f7f9acb7c29e3a34aeb056c34e09 100644 --- a/applications/test/dataEntry/Test-DataEntry.C +++ b/applications/test/dataEntry/Test-DataEntry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,6 +32,8 @@ Description #include "fvCFD.H" #include "DataEntry.H" #include "IOdictionary.H" +#include "linearInterpolationWeights.H" +#include "splineInterpolationWeights.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,6 +43,62 @@ int main(int argc, char *argv[]) # include "createTime.H" # include "createMesh.H" +{ + scalarField samples(4); + samples[0] = 0; + samples[1] = 1; + samples[2] = 2; + samples[3] = 3; + scalarField values(4); + values = 1.0; + //values[0] = 0.0; + //values[1] = 1.0; + + //linearInterpolationWeights interpolator + splineInterpolationWeights interpolator + ( + samples, + interpolationWeights::WARN + ); + labelList indices; + scalarField weights; + + interpolator.integrationWeights(1.1, 1.2, indices, weights); + Pout<< "indices:" << indices << endl; + Pout<< "weights:" << weights << endl; + + scalar baseSum = interpolator.weightedSum + ( + weights, + UIndirectList<scalar>(values, indices) + ); + Pout<< "baseSum=" << baseSum << nl << nl << endl; + + +// interpolator.integrationWeights(-0.01, 0, indices, weights); +// scalar partialSum = interpolator.weightedSum +// ( +// weights, +// UIndirectList<scalar>(values, indices) +// ); +// Pout<< "partialSum=" << partialSum << nl << nl << endl; +// +// +// interpolator.integrationWeights(-0.01, 1, indices, weights); +// //Pout<< "samples:" << samples << endl; +// //Pout<< "indices:" << indices << endl; +// //Pout<< "weights:" << weights << endl; +// scalar sum = interpolator.weightedSum +// ( +// weights, +// UIndirectList<scalar>(values, indices) +// ); +// Pout<< "integrand=" << sum << nl << nl << endl; + + + return 1; +} + IOdictionary dataEntryProperties ( IOobject diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index 05dcb07286c462198652d72983057bb6122eecdb..8d7927c42bce77e4fd84fb1c92a71c16a4468ba5 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -239,7 +239,8 @@ snapControls // Leave out altogether to disable. nFeatureSnapIter 10; - //- Detect (geometric) features by sampling the surface (default=false) + //- Detect (geometric only) features by sampling the surface + // (default=false). implicitFeatureSnap false; //- Use castellatedMeshControls::features (default = true) diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatchDict b/applications/utilities/mesh/manipulation/createPatch/createPatchDict index f731f78df975d825fb55384d244234cb00156f37..62e6cf619c0d046f372d4ac05c27736b021b1730 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatchDict +++ b/applications/utilities/mesh/manipulation/createPatch/createPatchDict @@ -92,8 +92,10 @@ patches // Optional: explicitly set transformation tensor. // Used when matching and synchronising points. transform rotational; - rotationAxis ( 0 0 1 ); - rotationCentre ( 0.3 0 0 ); + rotationAxis (1 0 0); + rotationCentre (0 0 0); + // transform translational; + // separationVector (1 0 0); } // How to construct: either from 'patches' or 'set' diff --git a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C index 00c97614de68eea0c2e52c67958a52e02794793b..052cd9121006667120556a91bb305e4e9644e124 100644 --- a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C +++ b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C @@ -107,6 +107,7 @@ void writeWeights(const polyMesh& mesh) int main(int argc, char *argv[]) { +# include "addRegionOption.H" argList::addBoolOption ( "checkAMI", @@ -115,7 +116,7 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" -# include "createDynamicFvMesh.H" +# include "createNamedDynamicFvMesh.H" const bool checkAMI = args.optionFound("checkAMI"); diff --git a/applications/utilities/mesh/manipulation/topoSet/topoSetDict b/applications/utilities/mesh/manipulation/topoSet/topoSetDict index 7a2049c6869ddb64dd82de507d1beac4ba6a5e86..31fa348e979b2e66b93d0a96394aaaf99b549234 100644 --- a/applications/utilities/mesh/manipulation/topoSet/topoSetDict +++ b/applications/utilities/mesh/manipulation/topoSet/topoSetDict @@ -359,6 +359,20 @@ FoamFile // cellSet c0; // name of cellSet of slave side // } // +// +// pointZoneSet +// ~~~~~~~~~~~~ +// (mirrors operations on a pointSet into a pointZone) +// +// // Select based on pointSet +// source setToPointZone; +// sourceInfo +// { +// set p0; // name of pointSet +// } +// +// +// actions ( diff --git a/etc/controlDict b/etc/controlDict index 816febf3ec21d08e664f41df84387f71cdd376b4..caf1e22933c01ed70186292923b921efad22ff83 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -965,4 +965,34 @@ DimensionedConstants } +DimensionSets +{ + unitSet SI; // USCS + + SICoeffs + { + // Basic units + kg kg [ 1 0 0 0 0 0 0 ] 1.0; + m m [ 0 1 0 0 0 0 0 ] 1.0; + s s [ 0 0 1 0 0 0 0 ] 1.0; + K K [ 0 0 0 1 0 0 0 ] 1.0; + mol mol [ 0 0 0 0 1 0 0 ] 1.0; + A A [ 0 0 0 0 0 1 0 ] 1.0; + Cd Cd [ 0 0 0 0 0 0 1 ] 1.0; + + // Derived units + Pa Pa [ kg^1 m^-2 ] 1.0; + + // Scaled units + mm mm [ kg^1 m^-2 ] 1e-3; + + + // Set of units used for printing. Can be any basic or derived + // but not scaled (only supported for dimensionedScalar, etc) + printUnits (kg m s K mol A Cd); + } +} + + + // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.C b/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.C index 78c6a4d7c5ab440d08e7acb304c96ad9ce97f7c6..953328f031209945d02ba39ae33eb4eb0eca5151 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.C +++ b/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,8 @@ License template<class Type> Foam::CompatibilityConstant<Type>::CompatibilityConstant ( - const word& entryName, const dictionary& dict + const word& entryName, + const dictionary& dict ) : DataEntry<Type>(entryName), @@ -69,6 +70,7 @@ Foam::CompatibilityConstant<Type>::CompatibilityConstant dimensions_(cnst.dimensions_) {} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class Type> diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H b/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H index 63d7b293e379fecc1e62c7eb8a4145a59027ea1b..e89234cfa93b87492edbdefa57c4ef307d252d63 100644 --- a/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H +++ b/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H @@ -27,13 +27,13 @@ Class Description Templated table container data entry. Items are stored in a list of Tuple2's. First column is always stored as scalar entries. Data is read - in the form, e.g. for an entry \<entryName\> that is (scalar, vector): + in Tuple2 form, e.g. for an entry \<entryName\> that is (scalar, vector): \verbatim - <entryName> table [0 1 0 0 0] //dimension set optional + <entryName> table ( - 0.0 (1 2 3) - 1.0 (4 5 6) + (0.0 (1 2 3)) + (1.0 (4 5 6)) ); \endverbatim diff --git a/src/dynamicFvMesh/include/createNamedDynamicFvMesh.H b/src/dynamicFvMesh/include/createNamedDynamicFvMesh.H new file mode 100644 index 0000000000000000000000000000000000000000..8ffc1490f58aea336f1f936c0c3b836b91f198b9 --- /dev/null +++ b/src/dynamicFvMesh/include/createNamedDynamicFvMesh.H @@ -0,0 +1,32 @@ + Foam::word regionName; + + if (args.optionReadIfPresent("region", regionName)) + { + Foam::Info + << "Create mesh " << regionName << " for time = " + << runTime.timeName() << Foam::nl << Foam::endl; + } + else + { + regionName = Foam::fvMesh::defaultRegion; + Foam::Info + << "Create mesh for time = " + << runTime.timeName() << Foam::nl << Foam::endl; + } + + + autoPtr<dynamicFvMesh> meshPtr + ( + dynamicFvMesh::New + ( + IOobject + ( + regionName, + runTime.timeName(), + runTime, + IOobject::MUST_READ + ) + ) + ); + + dynamicFvMesh& mesh = meshPtr(); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C index bbd50fa4dee61bf21fdd116f4a26ee4dc1d59818..9b72859c9d9dea1e138910b9c0d196e3c403c4de 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C @@ -40,8 +40,9 @@ flowRateInletVelocityFvPatchVectorField : fixedValueFvPatchField<vector>(p, iF), flowRate_(), - phiName_("phi"), - rhoName_("rho") + volumetric_(false), + rhoName_("rho"), + rhoInlet_(0.0) {} @@ -56,8 +57,9 @@ flowRateInletVelocityFvPatchVectorField : fixedValueFvPatchField<vector>(ptf, p, iF, mapper), flowRate_(ptf.flowRate_().clone().ptr()), - phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_) + volumetric_(ptf.volumetric_), + rhoName_(ptf.rhoName_), + rhoInlet_(ptf.rhoInlet_) {} @@ -69,11 +71,52 @@ flowRateInletVelocityFvPatchVectorField const dictionary& dict ) : - fixedValueFvPatchField<vector>(p, iF, dict), - flowRate_(DataEntry<scalar>::New("flowRate", dict)), - phiName_(dict.lookupOrDefault<word>("phi", "phi")), - rhoName_(dict.lookupOrDefault<word>("rho", "rho")) -{} + fixedValueFvPatchField<vector>(p, iF), + rhoInlet_(0.0) +{ + if (dict.found("volumetricFlowRate")) + { + volumetric_ = true; + flowRate_ = DataEntry<scalar>::New("volumetricFlowRate", dict); + rhoName_ = "rho"; + } + else if (dict.found("massFlowRate")) + { + volumetric_ = false; + flowRate_ = DataEntry<scalar>::New("massFlowRate", dict); + rhoName_ = word(dict.lookupOrDefault<word>("rho", "rho")); + } + else + { + FatalIOErrorIn + ( + "flowRateInletVelocityFvPatchVectorField::" + "flowRateInletVelocityFvPatchVectorField" + "(const fvPatch&, const DimensionedField<vector, volMesh>&," + " const dictionary&)", + dict + ) << "Please supply either 'volumetricFlowRate' or" + << " 'massFlowRate' and 'rho'" << exit(FatalIOError); + } + + // Value field require if mass based + if (dict.found("value")) + { + fvPatchField<vector>::operator= + ( + vectorField("value", dict, p.size()) + ); + } + else if (volumetric_) + { + evaluate(Pstream::blocking); + } + else + { + rhoInlet_ = readScalar(dict.lookup("rhoInlet")); + updateCoeffs(rhoInlet_); + } +} Foam::flowRateInletVelocityFvPatchVectorField:: @@ -84,8 +127,9 @@ flowRateInletVelocityFvPatchVectorField : fixedValueFvPatchField<vector>(ptf), flowRate_(ptf.flowRate_().clone().ptr()), - phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_) + volumetric_(ptf.volumetric_), + rhoName_(ptf.rhoName_), + rhoInlet_(ptf.rhoInlet_) {} @@ -98,14 +142,18 @@ flowRateInletVelocityFvPatchVectorField : fixedValueFvPatchField<vector>(ptf, iF), flowRate_(ptf.flowRate_().clone().ptr()), - phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_) + volumetric_(ptf.volumetric_), + rhoName_(ptf.rhoName_), + rhoInlet_(ptf.rhoInlet_) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs() +void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs +( + const scalar uniformRho +) { if (updated()) { @@ -119,40 +167,45 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs() tmp<vectorField> n = patch().nf(); - const surfaceScalarField& phi = - db().lookupObject<surfaceScalarField>(phiName_); - - if (phi.dimensions() == dimVelocity*dimArea) + if (volumetric_ || rhoName_ == "none") { // volumetric flow-rate operator==(n*avgU); } - else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) + else { - if (rhoName_ == "none") - { - // volumetric flow-rate if density not given - operator==(n*avgU); - } - else - { - // mass flow-rate - const fvPatchField<scalar>& rhop = - patch().lookupPatchField<volScalarField, scalar>(rhoName_); - - operator==(n*avgU/rhop); - } + // mass flow-rate + operator==(n*avgU/uniformRho); + } +} + + +void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs() +{ + if (updated()) + { + return; + } + + const scalar t = db().time().timeOutputValue(); + + // a simpler way of doing this would be nice + const scalar avgU = -flowRate_->value(t)/gSum(patch().magSf()); + + tmp<vectorField> n = patch().nf(); + + if (volumetric_ || rhoName_ == "none") + { + // volumetric flow-rate or density not given + operator==(n*avgU); } else { - FatalErrorIn - ( - "flowRateInletVelocityFvPatchVectorField::updateCoeffs()" - ) << "dimensions of " << phiName_ << " are incorrect" << nl - << " on patch " << this->patch().name() - << " of field " << this->dimensionedInternalField().name() - << " in file " << this->dimensionedInternalField().objectPath() - << nl << exit(FatalError); + // mass flow-rate + const fvPatchField<scalar>& rhop = + patch().lookupPatchField<volScalarField, scalar>(rhoName_); + + operator==(n*avgU/rhop); } fixedValueFvPatchField<vector>::updateCoeffs(); @@ -163,8 +216,11 @@ void Foam::flowRateInletVelocityFvPatchVectorField::write(Ostream& os) const { fvPatchField<vector>::write(os); flowRate_->writeData(os); - writeEntryIfDifferent<word>(os, "phi", "phi", phiName_); - writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_); + if (!volumetric_) + { + writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_); + os.writeKeyword("rhoInlet") << rhoInlet_ << token::END_STATEMENT << nl; + } writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H index a4b48c762985683f97f69192740423473d0ac503..192e14b7d1ba5024ca91e358f51e6cb2202a3782 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H @@ -28,21 +28,25 @@ Description Describes a volumetric/mass flow normal vector boundary condition by its magnitude as an integral over its area. - The basis of the patch (volumetric or mass) is determined by the - dimensions of the flux, phi. - - If the flux is mass-based - - the current density is used to correct the velocity - - volumetric flow rate can be applied by setting the 'rho' entry to 'none' + Either specify 'volumetricFlowRate' or 'massFlowRate' (requires additional + 'rho' entry). Example of the boundary condition specification: \verbatim inlet { - type flowRateInletVelocity; - flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s] - rho rho; // none | rho [m3/s or kg/s] - value uniform (0 0 0); // placeholder + type flowRateInletVelocity; + volumetricFlowRate 0.2; // Volumetric [m3/s] + } + \endverbatim + + \verbatim + inlet + { + type flowRateInletVelocity; + volumetricFlowRate 0.2; // mass flow rate [kg/s] + rho rho; // rho [m3/s or kg/s] + value uniform (0 0 0); // placeholder } \endverbatim @@ -79,12 +83,15 @@ class flowRateInletVelocityFvPatchVectorField //- Inlet integral flow rate autoPtr<DataEntry<scalar> > flowRate_; - //- Name of the flux transporting the field - word phiName_; + //- Is volumetric? + bool volumetric_; //- Name of the density field used to normalize the mass flux word rhoName_; + //- Rho initialisation value (for start; if value not supplied) + scalar rhoInlet_; + public: @@ -157,6 +164,10 @@ public: // Member functions + //- Update the coefficients associated with the patch field given + // uniform density field + void updateCoeffs(const scalar uniformRho); + //- Update the coefficients associated with the patch field virtual void updateCoeffs(); diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C index 04edda45eeadd168ccb2579c6700cc8051cfbd21..2b5e23e9a9339fa3d4b65b9ba00462d78fec4ce2 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C @@ -81,8 +81,14 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver diffusivityPtr_ ( motionDiffusivity::New(fvMesh_, coeffDict().lookup("diffusivity")) - ) -{} + ), + solveOnPoints0_(coeffDict().lookupOrDefault("solveOnPoints0", false)) +{ + if (solveOnPoints0_) + { + Info<< type() << " : solving on points0" << endl; + } +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -123,11 +129,18 @@ void Foam::displacementSBRStressFvMotionSolver::solve() diffusivityPtr_->correct(); pointDisplacement_.boundaryField().updateCoeffs(); + pointField oldPoints; + if (solveOnPoints0_) + { + oldPoints = fvMesh_.points(); + movePoints(points0()); + } + surfaceScalarField Df(diffusivityPtr_->operator()()); volTensorField gradCd(fvc::grad(cellDisplacement_)); - Foam::solve + tmp<fvMatrix<vector> > laplacianDf ( fvm::laplacian ( @@ -135,7 +148,16 @@ void Foam::displacementSBRStressFvMotionSolver::solve() cellDisplacement_, "laplacian(diffusivity,cellDisplacement)" ) + ); + +// if (solveOnPoints0_) +// { +// movePoints(oldPoints); +// } + Foam::solve + ( + laplacianDf + fvc::div ( Df @@ -173,6 +195,12 @@ void Foam::displacementSBRStressFvMotionSolver::solve() ) */ ); + + if (solveOnPoints0_) + { + movePoints(points0()); + } + } diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.H b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.H index db98e1a7ccd946e95a99f64e433fa29a1206f929..4d68cfc421849c2973ff61d87ed20063b0fb8f01 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.H +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.H @@ -53,7 +53,6 @@ class motionDiffusivity; class displacementSBRStressFvMotionSolver : -// public displacementFvMotionSolver public displacementMotionSolver, public fvMotionSolverCore { @@ -65,6 +64,8 @@ class displacementSBRStressFvMotionSolver //- Diffusivity used to control the motion autoPtr<motionDiffusivity> diffusivityPtr_; + //- Solve on base mesh + Switch solveOnPoints0_; // Private Member Functions diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverShrink.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverShrink.C index 58725470e1363a641c00da979c5b0c9f2c39887f..db246ba1f2b40c4fdabfd16bafd7253c5c5b2474 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverShrink.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverShrink.C @@ -99,76 +99,6 @@ void Foam::autoLayerDriver::sumWeights // Smooth field on moving patch -//void Foam::autoLayerDriver::smoothField -//( -// const motionSmoother& meshMover, -// const PackedBoolList& isMasterEdge, -// const labelList& meshEdges, -// const scalarField& fieldMin, -// const label nSmoothDisp, -// scalarField& field -//) const -//{ -// const indirectPrimitivePatch& pp = meshMover.patch(); -// const edgeList& edges = pp.edges(); -// const labelList& meshPoints = pp.meshPoints(); -// -// scalarField invSumWeight(pp.nPoints()); -// sumWeights -// ( -// isMasterEdge, -// meshEdges, -// meshPoints, -// edges, -// invSumWeight -// ); -// -// // Get smoothly varying patch field. -// Info<< "shrinkMeshDistance : Smoothing field ..." << endl; -// -// for (label iter = 0; iter < nSmoothDisp; iter++) -// { -// scalarField average(pp.nPoints()); -// averageNeighbours -// ( -// meshMover.mesh(), -// isMasterEdge, -// meshEdges, -// meshPoints, -// pp.edges(), -// invSumWeight, -// field, -// average -// ); -// -// // Transfer to field -// forAll(field, pointI) -// { -// //full smoothing neighbours + point value -// average[pointI] = 0.5*(field[pointI]+average[pointI]); -// -// // perform monotonic smoothing -// if -// ( -// average[pointI] < field[pointI] -// && average[pointI] >= fieldMin[pointI] -// ) -// { -// field[pointI] = average[pointI]; -// } -// } -// -// // Do residual calculation every so often. -// if ((iter % 10) == 0) -// { -// Info<< " Iteration " << iter << " residual " -// << gSum(mag(field-average)) -// /returnReduce(average.size(), sumOp<label>()) -// << endl; -// } -// } -//} -//XXXXXXXXX void Foam::autoLayerDriver::smoothField ( const motionSmoother& meshMover, @@ -196,15 +126,9 @@ void Foam::autoLayerDriver::smoothField // Get smoothly varying patch field. Info<< "shrinkMeshDistance : Smoothing field ..." << endl; - - const scalar lambda = 0.33; - const scalar mu = -0.34; - - for (label iter = 0; iter < 90; iter++) + for (label iter = 0; iter < nSmoothDisp; iter++) { scalarField average(pp.nPoints()); - - // Calculate average of field averageNeighbours ( meshMover.mesh(), @@ -217,37 +141,23 @@ void Foam::autoLayerDriver::smoothField average ); - forAll(field, i) + // Transfer to field + forAll(field, pointI) { - if (field[i] >= fieldMin[i]) - { - field[i] = (1-lambda)*field[i]+lambda*average[i]; - } - } - - - // Calculate average of field - averageNeighbours - ( - meshMover.mesh(), - isMasterEdge, - meshEdges, - meshPoints, - pp.edges(), - invSumWeight, - field, - average - ); + //full smoothing neighbours + point value + average[pointI] = 0.5*(field[pointI]+average[pointI]); - forAll(field, i) - { - if (field[i] >= fieldMin[i]) + // perform monotonic smoothing + if + ( + average[pointI] < field[pointI] + && average[pointI] >= fieldMin[pointI] + ) { - field[i] = (1-mu)*field[i]+mu*average[i]; + field[pointI] = average[pointI]; } } - // Do residual calculation every so often. if ((iter % 10) == 0) { @@ -259,6 +169,96 @@ void Foam::autoLayerDriver::smoothField } } //XXXXXXXXX +//void Foam::autoLayerDriver::smoothField +//( +// const motionSmoother& meshMover, +// const PackedBoolList& isMasterEdge, +// const labelList& meshEdges, +// const scalarField& fieldMin, +// const label nSmoothDisp, +// scalarField& field +//) const +//{ +// const indirectPrimitivePatch& pp = meshMover.patch(); +// const edgeList& edges = pp.edges(); +// const labelList& meshPoints = pp.meshPoints(); +// +// scalarField invSumWeight(pp.nPoints()); +// sumWeights +// ( +// isMasterEdge, +// meshEdges, +// meshPoints, +// edges, +// invSumWeight +// ); +// +// // Get smoothly varying patch field. +// Info<< "shrinkMeshDistance : (lambda-mu) Smoothing field ..." << endl; +// +// +// const scalar lambda = 0.33; +// const scalar mu = -0.34; +// +// for (label iter = 0; iter < 90; iter++) +// { +// scalarField average(pp.nPoints()); +// +// // Calculate average of field +// averageNeighbours +// ( +// meshMover.mesh(), +// isMasterEdge, +// meshEdges, +// meshPoints, +// pp.edges(), +// invSumWeight, +// field, +// average +// ); +// +// forAll(field, i) +// { +// if (field[i] >= fieldMin[i]) +// { +// field[i] = (1-lambda)*field[i]+lambda*average[i]; +// } +// } +// +// +// // Calculate average of field +// averageNeighbours +// ( +// meshMover.mesh(), +// isMasterEdge, +// meshEdges, +// meshPoints, +// pp.edges(), +// invSumWeight, +// field, +// average +// ); +// +// forAll(field, i) +// { +// if (field[i] >= fieldMin[i]) +// { +// field[i] = (1-mu)*field[i]+mu*average[i]; +// } +// } +// +// +// // Do residual calculation every so often. +// if ((iter % 10) == 0) +// { +// Info<< " Iteration " << iter << " residual " +// << gSum(mag(field-average)) +// /returnReduce(average.size(), sumOp<label>()) +// << endl; +// } +// } +//} +//XXXXXXXXX // Smooth normals on moving patch. void Foam::autoLayerDriver::smoothPatchNormals diff --git a/src/meshTools/sets/faceSources/regionToFace/patchEdgeFaceRegionI.H b/src/meshTools/sets/faceSources/regionToFace/patchEdgeFaceRegionI.H index 60a6d13eb3f2797a2884162008f6841f697f4093..eea60716a74a6a44c8d26b9a24d96413fb16c279 100644 --- a/src/meshTools/sets/faceSources/regionToFace/patchEdgeFaceRegionI.H +++ b/src/meshTools/sets/faceSources/regionToFace/patchEdgeFaceRegionI.H @@ -45,9 +45,6 @@ inline bool Foam::patchEdgeFaceRegion::update if (w2.region_ == -2 || region_ == -2) { - -Pout<< "update : " << *this << " w2:" << w2 << " return FALSE" << endl; - // Blocked edge/face return false; } @@ -55,27 +52,18 @@ Pout<< "update : " << *this << " w2:" << w2 << " return FALSE" << endl; if (!valid(td)) { // current not yet set so use any value - label oldRegion = region_; operator=(w2); -Pout<< "update : " << *this << " was:" << oldRegion - << " w2:" << w2 << " return TRUE" << endl; return true; } else { if (w2.region_ < region_) { - label oldRegion = region_; operator=(w2); -Pout<< "update : " << *this << " was:" << oldRegion - << " w2:" << w2 << " return TRUE" << endl; - return true; return true; } else { -Pout<< "update : " << *this - << " w2:" << w2 << " return FALSE" << endl; return false; } } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/U b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/U index 69ad6faa274315f25b2e1da51f4011e96a8cfc75..f5e2ba0301de694602c496a6070faad3b4426951 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/U +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/U @@ -37,7 +37,7 @@ boundaryField burner { type flowRateInletVelocity; - flowRate constant 0.001294; //60kW C3H8 + massFlowRate constant 0.001294; //60kW C3H8 value uniform (0 0 0); } diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U index 84b8f75f3cfe486af95eb409be5724fed1af8f31..713bdebe4a1ae6141aed1c1b8764f065fc4f5663 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U @@ -43,7 +43,7 @@ boundaryField inlet { type flowRateInletVelocity; - flowRate constant 0.1; + massFlowRate constant 0.1; value uniform (0 0 0); } outlet diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/U b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/U index 84b8f75f3cfe486af95eb409be5724fed1af8f31..1105ba84b0d3d45703447c25e8255a293531b6c5 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/0/U +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/0/U @@ -43,8 +43,8 @@ boundaryField inlet { type flowRateInletVelocity; - flowRate constant 0.1; - value uniform (0 0 0); + massFlowRate constant 0.1; + rhoInlet 1; // estimate for initial rho } outlet { diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/controlDict b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/controlDict index bbcbeb2543fde4ea39ad5df1cb6f14005cc74202..1b3d162cd41d736399004b4623328ba5c7fc0903 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/controlDict +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/controlDict @@ -17,7 +17,7 @@ FoamFile application rhoPimplecFoam; -startFrom startTime; +startFrom latestTime; //startTime; startTime 0; diff --git a/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/0/U b/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/0/U index c9822054aff3223147af983d91e4ef4d4c646e44..e9b532f37361e311feb19f07d7173d8ed7d6b847 100644 --- a/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/0/U +++ b/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/0/U @@ -43,7 +43,7 @@ boundaryField inlet { type flowRateInletVelocity; - flowRate constant 0.1; + massFlowRate constant 0.1; value uniform (0 0 0); } outlet diff --git a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/0/U b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/0/U index b66f23d6cb6b26067ac01026aa738c1153365861..20e25d12a8c318b8b0532714ad2919ed4068fe7c 100644 --- a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/0/U +++ b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/0/U @@ -43,7 +43,7 @@ boundaryField inlet { type flowRateInletVelocity; - flowRate constant 0.1; + massFlowRate constant 0.1; value uniform (0 0 0); } outlet diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/0/U b/tutorials/compressible/rhoSimplecFoam/squareBend/0/U index d5bd0a74cf75eac8797c6d9337e2ea656734ba4d..22ce6f4d0338b88579c590cae4228da54ad8822a 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/0/U +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/0/U @@ -28,8 +28,8 @@ boundaryField inlet { type flowRateInletVelocity; - flowRate constant 0.5; - value uniform (0 0 0); + massFlowRate constant 0.5; + rhoInlet 0.5; // Guess for rho } outlet { diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/system/controlDict b/tutorials/compressible/rhoSimplecFoam/squareBend/system/controlDict index b8a661c3d66889abae636a1bfae504ec9c63f8cf..05897adb0fccd83c0715e0e92f6594b474bc05ea 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/system/controlDict +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/system/controlDict @@ -17,7 +17,7 @@ FoamFile application rhoSimplecFoam; -startFrom startTime; +startFrom latestTime; //startTime; startTime 0; diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/polyMesh/blockMeshDict index 114418555a959266d404b7c04de18528e234020b..707a53ea74743869a8d8285474f90e9001917390 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/polyMesh/blockMeshDict +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/polyMesh/blockMeshDict @@ -42,7 +42,7 @@ boundary ( maxY { - type empty; + type symmetryPlane; faces ( (3 7 6 2) @@ -51,7 +51,7 @@ boundary minX { - type empty; + type symmetryPlane; faces ( (0 4 7 3) @@ -60,7 +60,7 @@ boundary maxX { - type empty; + type symmetryPlane; faces ( (2 6 5 1) @@ -69,7 +69,7 @@ boundary minY { - type empty; + type symmetryPlane; faces ( (1 5 4 0) @@ -87,7 +87,7 @@ boundary maxZ { - type empty; + type symmetryPlane; faces ( (4 5 6 7) diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/polyMesh/boundary b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/polyMesh/boundary index f989a6aae10ed01c32f984b80d0aca36a5c6d97c..911d0d6aa08c94a0730eaf1572915154319abb1d 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/polyMesh/boundary +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/constant/polyMesh/boundary @@ -19,25 +19,29 @@ FoamFile ( maxY { - type empty; + type symmetryPlane; + inGroups 1(symmetryPlane); nFaces 400; startFace 22800; } minX { - type empty; + type symmetryPlane; + inGroups 1(symmetryPlane); nFaces 400; startFace 23200; } maxX { - type empty; + type symmetryPlane; + inGroups 1(symmetryPlane); nFaces 400; startFace 23600; } minY { - type empty; + type symmetryPlane; + inGroups 1(symmetryPlane); nFaces 400; startFace 24000; } @@ -49,7 +53,8 @@ FoamFile } maxZ { - type empty; + type symmetryPlane; + inGroups 1(symmetryPlane); nFaces 400; startFace 24800; } diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict index 0bbb485782f79129497068ed0643a8c7d1047a4e..003d8a6db6333b0d56e2ff3b6167c0eed996fcba 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict @@ -35,6 +35,18 @@ geometry radius 4; } +// // Define floor just so we have feature edges behave correctly +// floor +// { +// type searchablePlane; +// planeType pointAndNormal; +// pointAndNormalDict +// { +// basePoint (0 0 0); +// normalVector (0 0 1); +// } +// } + box1 { type searchableBox; @@ -187,6 +199,11 @@ castellatedMeshControls // Surface-wise min and max refinement level level (1 1); } +// floor +// { +// // Surface-wise min and max refinement level +// level (1 1); +// } } // Resolve sharp angles on fridges @@ -235,12 +252,15 @@ snapControls { //- Number of patch smoothing iterations before finding correspondence // to surface - nSmoothPatch 3; +// nSmoothPatch 3; +//nSmoothPatch 0; //! Only since blockMesh aligned with surfaces it is + // actually beneficial to run with 0 smoothing. +nSmoothPatch 1; //- Relative distance for points to be attracted by surface feature point // or edge. True distance is this factor times local // maximum edge length. - tolerance 4.0; + tolerance 2.0; //- Number of mesh displacement relaxation iterations. nSolveIter 30; @@ -248,6 +268,19 @@ snapControls //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 5; + + + // Feature snapping + + //- Number of feature edge snapping iterations. + // Leave out altogether to disable. + nFeatureSnapIter 10; + + //- Detect (geometric) features by sampling the surface (default=false) + implicitFeatureSnap true; + + //- Use castellatedMeshControls::features (default = true) + explicitFeatureSnap false; } @@ -281,7 +314,7 @@ addLayersControls // Relative to undistorted size of cell outside layer. // is the thickness of the layer furthest away from the wall. // See relativeSizes parameter. - finalLayerThickness 0.5; + finalLayerThickness 1; //- Minimum thickness of cell layer. If for any reason layer // cannot be above minThickness do not add layer. @@ -342,52 +375,7 @@ addLayersControls // where to undo. meshQualityControls { - //- Maximum non-orthogonality allowed. Set to 180 to disable. - maxNonOrtho 65; - - //- Max skewness allowed. Set to <0 to disable. - maxBoundarySkewness 20; - maxInternalSkewness 4; - - //- Max concaveness allowed. Is angle (in degrees) below which concavity - // is allowed. 0 is straight face, <0 would be convex face. - // Set to 180 to disable. - maxConcave 80; - - //- Minimum pyramid volume. Is absolute volume of cell pyramid. - // Set to a sensible fraction of the smallest cell volume expected. - // Set to very negative number (e.g. -1E30) to disable. - minVol 1e-13; - - //- Minimum quality of the tet formed by the face-centre - // and variable base point minimum decomposition triangles and - // the cell centre. Set to very negative number (e.g. -1E30) to - // disable. - // <0 = inside out tet, - // 0 = flat tet - // 1 = regular tet - minTetQuality 1e-30; - - //- Minimum face area. Set to <0 to disable. - minArea -1; - - //- Minimum face twist. Set to <-1 to disable. dot product of face normal - //- and face centre triangles normal - minTwist 0.05; - - //- minimum normalised cell determinant - //- 1 = hex, <= 0 = folded or flattened illegal cell - minDeterminant 0.001; - - //- minFaceWeight (0 -> 0.5) - minFaceWeight 0.05; - - //- minVolRatio (0 -> 1) - minVolRatio 0.01; - - //must be >0 for Fluent compatibility - minTriangleTwist -1; - + #include "meshQualityDict" // Advanced @@ -405,7 +393,7 @@ meshQualityControls // 1 : write intermediate meshes // 2 : write volScalarField with cellLevel for postprocessing // 4 : write current intersections as .obj files -debug 0; +debug 7; // Merge tolerance. Is fraction of overall bounding box of initial mesh. diff --git a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/constant/polyMesh/boundary b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/constant/polyMesh/boundary index 292f25b806357d9df75c7731f74dee0ec0aa3a40..188a0f0c58b018d912058f8471d3a283847f7b01 100644 --- a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/constant/polyMesh/boundary +++ b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/constant/polyMesh/boundary @@ -32,12 +32,14 @@ FoamFile front { type empty; + inGroups 1(empty); nFaces 3072; startFace 6336; } back { type empty; + inGroups 1(empty); nFaces 3072; startFace 9408; } diff --git a/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict b/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict index 165a600c7b4a929aaa62ad1750bfbb9d279c2e65..5d093d39cf3d645f57b7d550b7e95eef298e7908 100644 --- a/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict @@ -46,6 +46,7 @@ boundary ( (3 7 6 2) ); + inGroups (groupWall); } fixedWalls { @@ -56,6 +57,7 @@ boundary (2 6 5 1) (1 5 4 0) ); + inGroups (groupWall); } frontAndBack { diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes index 8e7a2d1b932e00b44ec337977957cf6152a6b5a4..9106eed2736a5595cb332edc1fcb2d8395f46833 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/fvSchemes @@ -39,7 +39,7 @@ divSchemes laplacianSchemes { - default Gauss linear corrected; + default Gauss linear limited 0.33; } interpolationSchemes @@ -49,7 +49,7 @@ interpolationSchemes snGradSchemes { - default corrected; + default limited 0.33; } fluxRequired diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict index fd59ef09a0868db7cd5e8d515d5f1bf382708ed0..a630750b7dcb0b04f91f757072ef8c91d2985e11 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/decomposeParDict @@ -17,7 +17,7 @@ FoamFile numberOfSubdomains 8; -method hierarchical; +method hierarchical; //ptscotch; simpleCoeffs { diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/0/U b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/0/U index b66f23d6cb6b26067ac01026aa738c1153365861..ad11b09e1e850ffc6943363fb5dfe9128be79ec2 100644 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/0/U +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/0/U @@ -43,8 +43,7 @@ boundaryField inlet { type flowRateInletVelocity; - flowRate constant 0.1; - value uniform (0 0 0); + volumetricFlowRate constant 0.1; } outlet { diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/controlDict b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/controlDict index 4fb10f0a0927b5825c6e6ddfc945248c88aa8408..95917db13638f19d8d406a4e1ef2eff97812adff 100644 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/controlDict +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/system/controlDict @@ -17,7 +17,7 @@ FoamFile application porousSimpleFoam; -startFrom startTime; +startFrom latestTime; //startTime; startTime 0; diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict b/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict index 7ca125be5bdff367771bea3d0823fcf42d460679..6a1045207ab39d5866efd80862bcd789e1d819ae 100644 --- a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict +++ b/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict @@ -58,7 +58,6 @@ functions type forces; functionObjectLibs ("libforces.so"); outputControl outputTime; - outputInterval 1; patches (floatingObject); pName p; UName U; @@ -74,7 +73,7 @@ functions functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl timeStep; - timeInteval 1; + outputInterval 1; log true; valueOutput false; source faceZone; diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/system/controlDict b/tutorials/incompressible/simpleFoam/turbineSiting/system/controlDict index c8159c45a6c63ec9f94b749d87ce5176c8981520..1b295b32a3a15f9f877f47265161b49058aa0017 100644 --- a/tutorials/incompressible/simpleFoam/turbineSiting/system/controlDict +++ b/tutorials/incompressible/simpleFoam/turbineSiting/system/controlDict @@ -14,6 +14,8 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +libs ("libincompressibleRASModels.so"); + application simpleFoam; startFrom latestTime; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/U b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/U index 352d6b50277375ebbd80840c8e5422c6f53647df..7f8c434997d68a5388638800a7005537a215005e 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/U +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0.org/U @@ -32,13 +32,13 @@ boundaryField inletCentral { type flowRateInletVelocity; - flowRate constant 0.00379; + massFlowRate constant 0.00379; value uniform (0 14.68 0); } inletSides { type flowRateInletVelocity; - flowRate constant 0.00832; + massFlowRate constant 0.00832; value uniform (0 17.79 0); } outlet diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/U b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/U index 352d6b50277375ebbd80840c8e5422c6f53647df..7f8c434997d68a5388638800a7005537a215005e 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/U +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/0/U @@ -32,13 +32,13 @@ boundaryField inletCentral { type flowRateInletVelocity; - flowRate constant 0.00379; + massFlowRate constant 0.00379; value uniform (0 14.68 0); } inletSides { type flowRateInletVelocity; - flowRate constant 0.00832; + massFlowRate constant 0.00832; value uniform (0 17.79 0); } outlet diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0.org/U b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0.org/U index 352d6b50277375ebbd80840c8e5422c6f53647df..7f8c434997d68a5388638800a7005537a215005e 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0.org/U +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0.org/U @@ -32,13 +32,13 @@ boundaryField inletCentral { type flowRateInletVelocity; - flowRate constant 0.00379; + massFlowRate constant 0.00379; value uniform (0 14.68 0); } inletSides { type flowRateInletVelocity; - flowRate constant 0.00832; + massFlowRate constant 0.00832; value uniform (0 17.79 0); } outlet diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U index 352d6b50277375ebbd80840c8e5422c6f53647df..7f8c434997d68a5388638800a7005537a215005e 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U @@ -32,13 +32,13 @@ boundaryField inletCentral { type flowRateInletVelocity; - flowRate constant 0.00379; + massFlowRate constant 0.00379; value uniform (0 14.68 0); } inletSides { type flowRateInletVelocity; - flowRate constant 0.00832; + massFlowRate constant 0.00832; value uniform (0 17.79 0); } outlet diff --git a/tutorials/mesh/cvMesh/simpleShapes/constant/triSurface/domain.stl b/tutorials/mesh/cvMesh/simpleShapes/constant/triSurface/domain.stl index 5650ed200133c64ccaf37ccf55701500b6acfbac..b51c05291445e5202b86eec6cea4878abd6639e5 100644 --- a/tutorials/mesh/cvMesh/simpleShapes/constant/triSurface/domain.stl +++ b/tutorials/mesh/cvMesh/simpleShapes/constant/triSurface/domain.stl @@ -83,4 +83,4 @@ solid ascii vertex 1.3 -0.9 1 endloop endfacet -endsolid +end solid diff --git a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/dynamicMeshDict b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/dynamicMeshDict index 4aaa9e488c04de64b979f32dcabdd83f3b760577..c15afe3c1c4a25243b344dc94bec83a35ec0a802 100644 --- a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/dynamicMeshDict +++ b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/dynamicMeshDict @@ -25,6 +25,7 @@ solver displacementSBRStress; //displacementLaplacian; displacementSBRStressCoeffs { + solveOnPoints0 true; // diffusivity uniform; // diffusivity directional (1 200 0); // diffusivity motionDirectional (1 1000 0); diff --git a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/polyMesh/blockMeshDict b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/polyMesh/blockMeshDict index 15fdd9744390dd22d12ce2d18f4b5837f80605cc..e87f696658a95d9bbaa0694f7b44d5d370641dfe 100644 --- a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/polyMesh/blockMeshDict +++ b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/polyMesh/blockMeshDict @@ -31,7 +31,8 @@ vertices blocks ( - hex (0 1 2 3 4 5 6 7) (20 60 60) simpleGrading (10.0 1 1) +// hex (0 1 2 3 4 5 6 7) (20 60 60) simpleGrading (10.0 1 1) + hex (0 1 2 3 4 5 6 7) (6 6 6) simpleGrading (10.0 1 1) ); edges diff --git a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/polyMesh/boundary b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/polyMesh/boundary index fb8b054841e99ea0151658bd21af2f291887b98b..f088cdc54314e944ec525b7e2365e0acacb396e8 100644 --- a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/polyMesh/boundary +++ b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/polyMesh/boundary @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format binary; + format ascii; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; @@ -20,38 +20,38 @@ FoamFile maxX { type patch; - nFaces 1200; - startFace 210000; + nFaces 36; + startFace 540; } minZ { type patch; - nFaces 3600; - startFace 211200; + nFaces 36; + startFace 576; } maxZ { type patch; - nFaces 3600; - startFace 214800; + nFaces 36; + startFace 612; } minX { type patch; - nFaces 1200; - startFace 218400; + nFaces 36; + startFace 648; } minY { type patch; - nFaces 1200; - startFace 219600; + nFaces 36; + startFace 684; } maxY { type patch; - nFaces 1200; - startFace 220800; + nFaces 36; + startFace 720; } ) diff --git a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/controlDict b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/controlDict index e551ed0c7f98ca19f8d2f76021ccc8135a6185e9..0b45565823742477be5c90406c3e21ef57c7c9b1 100644 --- a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/controlDict +++ b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/controlDict @@ -17,23 +17,23 @@ FoamFile application moveDynamicMesh; -startFrom startTime; +startFrom latestTime; //startTime; startTime 0; stopAt endTime; -endTime 25; +endTime 30; deltaT 1; writeControl timeStep; -writeInterval 5; +writeInterval 1; purgeWrite 0; -writeFormat binary; +writeFormat ascii;//binary; writePrecision 6; diff --git a/tutorials/mesh/snappyHexMesh/flange/system/controlDict b/tutorials/mesh/snappyHexMesh/flange/system/controlDict index e20d3954ed497844b1b8e77dd5d6a41b9380058a..928fd07ac479209076ea3d6d136978e2ba1545fe 100644 --- a/tutorials/mesh/snappyHexMesh/flange/system/controlDict +++ b/tutorials/mesh/snappyHexMesh/flange/system/controlDict @@ -17,7 +17,7 @@ FoamFile application icoFoam; -startFrom startTime; +startFrom latestTime; startTime 0; diff --git a/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict b/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict index 66499680bde7bf4ae915624bbf562fb0351925b2..0111006ee3bd9f28caff7189dbd3634b3df6867e 100644 --- a/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict +++ b/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict @@ -16,7 +16,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run -castellatedMesh true; +castellatedMesh false; snap true; addLayers false; @@ -85,10 +85,10 @@ castellatedMeshControls // This is a featureEdgeMesh, read from constant/triSurface for now. features ( - { - file "flange.eMesh"; - level 0; - } +// { +// file "flange.eMesh"; +// level 0; +// } ); @@ -175,9 +175,17 @@ snapControls // before upon reaching a correct mesh. nRelaxIter 5; - //- Highly experimental and wip: number of feature edge snapping - // iterations. Leave out altogether to disable. - nFeatureSnapIter 10; + // Feature snapping + + //- Number of feature edge snapping iterations. + // Leave out altogether to disable. + nFeatureSnapIter 10; + + //- Detect (geometric) features by sampling the surface + implicitFeatureSnap true; + + //- Use castellatedMeshControls::features + explicitFeatureSnap false; } diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/controlDict index d8fc5ae321a08e61282d64e1a844ceae86fef8e0..c939e692fda66968c4d616fcd9eaa83ca87ac8eb 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/controlDict +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/controlDict @@ -59,7 +59,6 @@ functions type probes; functionObjectLibs ("libsampling.so"); outputControl outputTime; - outputInterval 1; probeLocations ( ( 0 9.95 19.77 ) @@ -76,9 +75,7 @@ functions type surfaces; functionObjectLibs ("libsampling.so"); outputControl outputTime; - outputInterval 10; surfaceFormat raw; - interpolationScheme isThisNeeded; fields ( p diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/controlDict index 99a8a340cf0f3a0e79410faad1391b01d4ed9838..a63975e3fb781f9b1699a6b40c83494f87b974c3 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/controlDict +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/controlDict @@ -58,7 +58,6 @@ functions type probes; functionObjectLibs ("libsampling.so"); outputControl outputTime; - outputInterval 1; probeLocations ( ( 0 9.95 19.77 ) @@ -75,9 +74,7 @@ functions type surfaces; functionObjectLibs ("libsampling.so"); outputControl outputTime; - outputInterval 10; surfaceFormat raw; - interpolationScheme isThisNeeded; fields ( p diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/0/U b/tutorials/multiphase/interFoam/ras/waterChannel/0/U index 526fadc34444c886d69c5e2bf11feaa56f9ff8bf..5a7c8f1661d1b4454e1ffd90c1e6b89ea41f6e94 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/0/U +++ b/tutorials/multiphase/interFoam/ras/waterChannel/0/U @@ -23,8 +23,7 @@ boundaryField inlet { type flowRateInletVelocity; - flowRate constant 50; - value uniform (0 0 0); + volumetricFlowRate constant 50; } walls diff --git a/wmake/rules/linux64Gcc/c b/wmake/rules/linux64Gcc/c index f4114be3143d1210ffea500a2b361008910abed0..acd1521c470108f0f823ece440aaac107fb06eda 100644 --- a/wmake/rules/linux64Gcc/c +++ b/wmake/rules/linux64Gcc/c @@ -6,7 +6,7 @@ cc = gcc -m64 include $(RULES)/c$(WM_COMPILE_OPTION) -cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC +cFLAGS = -g $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ diff --git a/wmake/rules/linux64Gcc/c++ b/wmake/rules/linux64Gcc/c++ index 3dfb03336039da5c3f40cf53934d0fc18ca09599..8e7e715e4e2054c66b6277c304440abffdc14a52 100644 --- a/wmake/rules/linux64Gcc/c++ +++ b/wmake/rules/linux64Gcc/c++ @@ -8,7 +8,7 @@ include $(RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 -c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC +c++FLAGS = -g $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ cxxtoo = $(Ctoo)