From ad98934e90c4b3e1e71eabf90af6b1a96367c1fa Mon Sep 17 00:00:00 2001 From: sergio Date: Thu, 25 Jan 2018 08:46:48 -0800 Subject: [PATCH 1/9] ENH: Changing fanFvPatchField operation for non-dimensional mode. The non-dimensional table takes non-dimensional U as entry, not flow rate --- .../fields/fvPatchFields/derived/fan/fanFvPatchFields.C | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C index 3570d327b9..7e7e78f355 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,11 +51,10 @@ void Foam::fanFvPatchField::calcFanJump() if (nonDimensional_) { - // Create an adimensional volumetric flow rate + // Create an adimensional velocity Un = 120.0*Un/pow3(constant::mathematical::pi) - * patch().magSf() - / pow3(dm_)/rpm_; + / dm_/rpm_; } } From 7ec44a88f173737d6469400f57f855b2d7dc6062 Mon Sep 17 00:00:00 2001 From: sergio Date: Thu, 25 Jan 2018 10:04:30 -0800 Subject: [PATCH 2/9] ENH: Updating the header documentation for fanFvPatchField --- .../fields/fvPatchFields/derived/fan/fanFvPatchField.H | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H index 975da7ab2e..ed95c018b3 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,12 +37,12 @@ Description The switch nonDimensional can be used for a non-dimensional table. It needs inputs rpm and dm of the fan. It should be used with uniformJump true. - The nonDimensional flux for the table is calculate as : + The nonDimensional U for the table is calculate as : - phi = 4.0*mDot/(rho*sqr(PI)*dm^3*omega) + phi = 120*Un/(PI^3*dm*rpm) where: dm is the mean diameter. - omega is rad/sec. + rpm is the RPM of the fan. The nonDimensinal pressure : From ac3a8bc3cb906eefe10b613edd9f8f6a9931b3bd Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 23 Feb 2018 09:04:16 +0000 Subject: [PATCH 3/9] BUG: simpleCoalParcelFoam - corrected dimensions of Qdot. Fixes #742 --- .../solvers/lagrangian/simpleCoalParcelFoam/createFields.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H index ae5129fbc2..983ecf2597 100644 --- a/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H @@ -114,7 +114,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); #include "createMRF.H" From 4d4c5910eddbd67d51467e468e9ee1b0702da2b9 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 23 Feb 2018 12:00:14 +0000 Subject: [PATCH 4/9] ENH: lagrangian injection - exposed minimum number of particles per parcel. See #728 The minimum number of particles per parcel can now be set in the injection model input, e.g.: model1 { type ...; massTotal ...; parcelBasisType ...; minParticlesPerParcel 1; <-- new optional entry SOI ...; ... Uses a value of 1 by default if the entry is not present. The value of 1 is generally recommended and beneficial for coupled cases where small time steps can lead to the injection of too many parcels and subsequently greatly over-predict the particle source contributions (momentum, heat, mass transfer etc) --- .../InjectionModel/InjectionModel/InjectionModel.C | 11 +++++++++-- .../InjectionModel/InjectionModel/InjectionModel.H | 14 +++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 37dd01da99..48286f170d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -275,6 +275,7 @@ Foam::InjectionModel::InjectionModel(CloudType& owner) nParticleFixed_(0.0), time0_(0.0), timeStep0_(this->template getModelProperty("timeStep0")), + minParticlesPerParcel_(1), delayedVolume_(0.0), injectorID_(-1) {} @@ -304,6 +305,11 @@ Foam::InjectionModel::InjectionModel nParticleFixed_(0.0), time0_(owner.db().time().value()), timeStep0_(this->template getModelProperty("timeStep0")), + minParticlesPerParcel_ + ( + this->coeffDict().template + lookupOrDefault("minParticlesPerParcel", 1) + ), delayedVolume_(0.0), injectorID_(this->coeffDict().lookupOrDefault("injectorID", -1)) { @@ -382,6 +388,7 @@ Foam::InjectionModel::InjectionModel nParticleFixed_(im.nParticleFixed_), time0_(im.time0_), timeStep0_(im.timeStep0_), + minParticlesPerParcel_(im.minParticlesPerParcel_), delayedVolume_(im.delayedVolume_), injectorID_(im.injectorID_) {} @@ -517,7 +524,7 @@ void Foam::InjectionModel::inject pPtr->rho() ); - if (pPtr->nParticle() >= 1.0) + if (pPtr->nParticle() >= minParticlesPerParcel_) { parcelsAdded++; massAdded += pPtr->nParticle()*pPtr->mass(); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index f235314642..952fa334c5 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -81,7 +81,7 @@ public: // Enumerations //- Parcel basis representation options - // i.e constant number of particles OR constant mass per parcel + //- i.e constant number of particles OR constant mass per parcel enum parcelBasis { pbNumber, @@ -100,7 +100,7 @@ protected: scalar SOI_; //- Total volume of particles introduced by this injector [m^3] - // - scaled to ensure massTotal is achieved + //- Note: scaled to ensure massTotal is achieved scalar volumeTotal_; //- Total mass to inject [kg] @@ -128,7 +128,7 @@ protected: parcelBasis parcelBasis_; //- nParticle to assign to parcels when the 'fixed' basis - // is selected + //- is selected scalar nParticleFixed_; //- Continuous phase time at start of injection time step [s] @@ -137,8 +137,12 @@ protected: //- Time at start of injection time step [s] scalar timeStep0_; + //- Minimum number of particles used to represent each parcel + //- default = 1 + scalar minParticlesPerParcel_; + //- Volume that should have been injected, but would lead to - // less than 1 particle per parcel + //- less than minParticlesPerParcel_ particle per parcel scalar delayedVolume_; //- Optional injector ID From 94afd9e9b2f7a8a09edc40ca0dfa96af50eb671f Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 23 Feb 2018 15:11:24 +0100 Subject: [PATCH 5/9] BUG: isoAdvection using 'vof2IsoTol' instead of 'isoFaceTol' (closes #740) --- .../solvers/isoAdvection/isoAdvection/isoAdvection.C | 4 ++-- .../solvers/isoAdvection/isoAdvection/isoAdvection.H | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C index 85ebdf94b6..e039b0b572 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C @@ -80,7 +80,7 @@ Foam::isoAdvection::isoAdvection // Tolerances and solution controls nAlphaBounds_(dict_.lookupOrDefault