diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.C index 27b91a854ad3813fcb07fd51e2fc1539d248a0b5..2f0da244cfeab9fb0ddc46bfb565ff6fa85c92ee 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.C @@ -80,6 +80,7 @@ Foam::actuationDiskSource::actuationDiskSource ) : basicSource(name, modelType, dict, mesh), + fieldName_(coeffs_.lookup("fieldName")), diskDir_(coeffs_.lookup("diskDir")), Cp_(readScalar(coeffs_.lookup("Cp"))), Ct_(readScalar(coeffs_.lookup("Ct"))), @@ -155,7 +156,7 @@ void Foam::actuationDiskSource::addSup void Foam::actuationDiskSource::writeData(Ostream& os) const { os << indent << name_ << endl; - coeffs_.write(os); + dict_.write(os); } diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.H b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.H index 1be5babe3ff7d756f28d3314a5bc5324757864c1..b0e983e11edde182b65f63b20dae809904faab3f 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.H @@ -26,16 +26,30 @@ Class Foam::actuationDiskSource Description - Actuation disk zone definition. + Actuation disk source + Constant values for momentum source for actuation disk - T = 2*rho*A*sqr(Uo)*a*(1-a) - U1 = (1 -a)Uo + T = 2*rho*A*sqr(Uo)*a*(1-a) + U1 = (1 -a)Uo + where: - A: disk area - Uo: upstream velocity - a: 1 - Cp/Ct - U1: velocity at the disk + A: disk area + Uo: upstream velocity + a: 1 - Cp/Ct + U1: velocity at the disk + + Sources described by: + + actuationDiskSourceCoeffs + { + fieldName U; // name of field to apply source + diskDir (-1 0 0); // disk direction + Cp 0.1; // power coefficient + Ct 0.5; // thrust coefficient + diskArea 5.0; // disk area + } + SourceFiles actuationDiskSource.C @@ -46,14 +60,6 @@ SourceFiles #ifndef actuationDiskSource_H #define actuationDiskSource_H -#include "IOdictionary.H" -#include "coordinateSystem.H" -#include "coordinateSystems.H" -#include "wordList.H" -#include "labelList.H" -#include "DimensionedField.H" -#include "volFieldsFwd.H" -#include "fvMatricesFwd.H" #include "basicSource.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/IObasicSourceList.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/IObasicSourceList.C index 0c8695edca3d2eacf9c11345873b553e08897583..cac80c3d3e6da5e3c3e2c33d8551425ccc16ed3f 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/IObasicSourceList.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/IObasicSourceList.C @@ -24,6 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "IObasicSourceList.H" +#include "fvMesh.H" +#include "Time.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.C index 4f975249fe2fd48f5a6824b6fcee946239a43405..5dad6191036492b2491a722168cb7b0bb7ddbc87 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.C @@ -25,19 +25,16 @@ License #include "basicSource.H" #include "fvMesh.H" -#include "volFields.H" +#include "fvMatrices.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { defineTypeNameAndDebug(basicSource, 0); defineRunTimeSelectionTable(basicSource, dictionary); - - // * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * // - template<> const char* NamedEnum < basicSource::selectionModeType, @@ -116,12 +113,9 @@ void Foam::basicSource::setCellSet() label globalCellI = returnReduce(cellI, maxOp<label>()); if (globalCellI < 0) { - WarningIn - ( - "basicSource::setCellIds()" - ) - << "Unable to find owner cell for point " << points_[i] - << endl; + WarningIn("basicSource::setCellIds()") + << "Unable to find owner cell for point " << points_[i] + << endl; } @@ -194,24 +188,25 @@ Foam::basicSource::basicSource ( const word& name, const word& modelType, - const dictionary& coeffs, + const dictionary& dict, const fvMesh& mesh ) : name_(name), mesh_(mesh), - coeffs_(coeffs), - active_(readBool(coeffs_.lookup("active"))), - timeStart_(readScalar(coeffs_.lookup("timeStart"))), - duration_(readScalar(coeffs_.lookup("duration"))), + dict_(dict), + coeffs_(dict.subDict(modelType + "Coeffs")), + active_(readBool(dict_.lookup("active"))), + timeStart_(readScalar(dict_.lookup("timeStart"))), + duration_(readScalar(dict_.lookup("duration"))), selectionMode_ ( - selectionModeTypeNames_.read(coeffs_.lookup("selectionMode")) + selectionModeTypeNames_.read(dict_.lookup("selectionMode")) ), cellSetName_("none"), V_(0.0) { - setSelection(coeffs_); + setSelection(dict_); setCellSet(); } diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.H b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.H index 52148c3ceb6161d8e928248932bda644d591e018..563f997629a518d7bb91f00b7ba98974f3b60123 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.H @@ -25,52 +25,14 @@ Class Foam::basicSource Description - Basic source abtract class + Field source abtract base class. Provides a base set of controls, e.g. - Sources described by: + type scalarExplicitSource // source type + active on; // on/off switch + timeStart 0.0; // start time + duration 1000.0; // duration + selectionMode cellSet; // cellSet // points //cellZone - source1 - { - type actuationDiskSource; // explicitSource - active on; // on/off switch - timeStart 0.0; // start time - duration 1000.0; // duration - selectionMode cellSet; // cellSet // points //cellZone - cellSet c0; // cellSet name - - actuationDiskSourceCoeffs - { - diskDir (-1 0 0); // orientation of the disk - Cp 0.53; // Cp - Ct 0.58; // Ct - diskArea 40; // disk area - } - } - - source2 - { - type explicitSource; - active on; - timeStart 0.0; - duration 1000.0; - selectionMode points; - cellSet c0; - - points // list of points when selectionMode = points - ( - (-0.088 0.007 -0.02) - (-0.028 0.007 -0.02) - ); - explicitSourceCoeffs - { - volumeMode specific; //absolute - fieldData //field data - { - k 30.7; - epsilon 1.5; - } - } - } SourceFiles basicSource.C @@ -81,10 +43,8 @@ SourceFiles #ifndef basicSource_H #define basicSource_H -#include "fvMatrices.H" +#include "fvMatricesFwd.H" #include "cellSet.H" -#include "volFieldsFwd.H" -#include "DimensionedField.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -96,7 +56,7 @@ namespace Foam class fvMesh; /*---------------------------------------------------------------------------*\ - Class basicSource Declaration + Class basicSource Declaration \*---------------------------------------------------------------------------*/ class basicSource @@ -128,7 +88,10 @@ protected: //- Reference to the mesh database const fvMesh& mesh_; - //- Dictionary containing the data of the source + //- Top level source dictionary + dictionary dict_; + + //- Dictionary containing source coefficients dictionary coeffs_; //- Source active flag diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceIO.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceIO.C index caec8b58cf78769260e7f08816fe352a2f77826c..054de61219c133a81722c694bf41f4845915f3c1 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceIO.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceIO.C @@ -80,6 +80,9 @@ bool Foam::basicSource::read(const dictionary& dict) active_ = readBool(dict.lookup("active")); timeStart_ = readScalar(dict.lookup("timeStart")); duration_ = readScalar(dict.lookup("duration")); + + coeffs_ = dict.subDict(type() + "Coeffs"); + return true; } diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValue.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValue.C index a175a3bc3d959df30cd86f59b187927dce249b48..3a3c372d174060dc3ab6271a9ae1f71f21d6222e 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValue.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValue.C @@ -25,7 +25,8 @@ License #include "ExplicitSetValue.H" #include "fvMesh.H" -#include "volFields.H" +#include "fvMatrices.H" +#include "DimensionedField.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValue.H b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValue.H index bc7219ba4c2bb3122ca05d952541e6b290a2fa48..7c78084fc8f43ae49bc6c022ecc2e63588b8a750 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValue.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValue.H @@ -29,14 +29,15 @@ Description Sources described by: - explicitSetValueCoeffs - { - fieldData // field data - usage for multiple fields + <Type>ExplicitSetValueCoeffs { - k 30.7; - epsilon 1.5; + fieldData + { + k 30.7; + epsilon 1.5; + } } - } + SourceFiles explicitSetValue.C diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValueIO.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValueIO.C index 357d94beba9dfe3a48b979a5ab85636f31470acc..7fd1d4559264f757e3c88d05c080946d11909ff2 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValueIO.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSetValue/ExplicitSetValueIO.C @@ -31,7 +31,7 @@ template<class Type> void Foam::ExplicitSetValue<Type>::writeData(Ostream& os) const { os << indent << name_ << endl; - coeffs_.write(os); + dict_.write(os); } diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSource/ExplicitSource.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSource/ExplicitSource.C index 63c5349a6e9761f90e842fe011e632c3be25b157..1e9c15fbc7c94815868d8c314a2bdf6eb144ae41 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSource/ExplicitSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSource/ExplicitSource.C @@ -25,8 +25,8 @@ License #include "ExplicitSource.H" #include "fvMesh.H" -#include "volFields.H" -#include "dimensionedType.H" +#include "fvMatrices.H" +#include "DimensionedField.H" // * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSource/ExplicitSource.H b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSource/ExplicitSource.H index bdb20a43d1b81a5d11d13450035636e901bd7335..5c1d3daa2fa52d90c1d5d5317d5ddbbdeed76389 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSource/ExplicitSource.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/explicitSource/ExplicitSource.H @@ -25,32 +25,24 @@ Class Foam::ExplicitSource Description - Time activated explicit source. + Explicit source Sources described by: - { - active true; // on/off switch - timeStart 0.2; // start time - duration 2.0; // duration - selectionMode points; // cellSet/cellZone/all - volumeMode absolute; // specific - - fieldData // field data - usage for multiple fields - ( - (H2O 0.005) - ); - - fieldData 0.005; // field data - usage for single field + <Type>ExplicitSourceCoeffs + { + volumeMode absolute; // specific + fieldData + { + k 30.7; + epsilon 1.5; + } + } - points // list of points when selectionMode = points - ( - (2.75 0.5 0) - ); + If volumeMode = + - absolute: values are given as <quantity> + - specific: values are given as <quantity>/m3 - cellSet c0; // cellSet name when selectionMode=cellSet - cellZone c0; // cellZone name when selectionMode=cellZone - } SourceFiles ExplicitSource.C @@ -61,8 +53,6 @@ SourceFiles #define ExplicitSource_H #include "Tuple2.H" -#include "volFieldsFwd.H" -#include "DimensionedField.H" #include "basicSource.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -87,7 +77,7 @@ Ostream& operator<< ); /*---------------------------------------------------------------------------*\ - Class ExplicitSource Declaration + Class ExplicitSource Declaration \*---------------------------------------------------------------------------*/ template<class Type> diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.C index d6b708f6c60148a3232d3119ce567b90496eb315..79f2751e7b37037258a19267e48c81656d8ce008 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.C @@ -24,25 +24,29 @@ License \*---------------------------------------------------------------------------*/ #include "pressureGradientExplicitSource.H" -#include "volFields.H" +#include "fvMatrices.H" +#include "DimensionedField.H" #include "IFstream.H" #include "addToRunTimeSelectionTable.H" +// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // + namespace Foam { - defineTypeNameAndDebug(pressureGradientExplicitSourceNew, 0); + defineTypeNameAndDebug(pressureGradientExplicitSource, 0); addToRunTimeSelectionTable ( basicSource, - pressureGradientExplicitSourceNew, + pressureGradientExplicitSource, dictionary ); } + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::pressureGradientExplicitSourceNew::writeGradP() const +void Foam::pressureGradientExplicitSource::writeGradP() const { // Only write on output time if (mesh_.time().outputTime()) @@ -65,7 +69,7 @@ void Foam::pressureGradientExplicitSourceNew::writeGradP() const } -void Foam::pressureGradientExplicitSourceNew::update() +void Foam::pressureGradientExplicitSource::update() { volVectorField& U = const_cast<volVectorField&> ( @@ -117,7 +121,7 @@ void Foam::pressureGradientExplicitSourceNew::update() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::pressureGradientExplicitSourceNew::pressureGradientExplicitSourceNew +Foam::pressureGradientExplicitSource::pressureGradientExplicitSource ( const word& sourceName, const word& modelType, @@ -151,7 +155,7 @@ Foam::pressureGradientExplicitSourceNew::pressureGradientExplicitSourceNew // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::label Foam::pressureGradientExplicitSourceNew::applyToField +Foam::label Foam::pressureGradientExplicitSource::applyToField ( const word& fieldName ) const @@ -167,7 +171,7 @@ Foam::label Foam::pressureGradientExplicitSourceNew::applyToField } -void Foam::pressureGradientExplicitSourceNew::addSup +void Foam::pressureGradientExplicitSource::addSup ( fvMatrix<vector>& eqn, const label diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H index 9a1a933f4bbd5ebdb50200f46977a495f47b80d6..c01ba9290de4c04aaf47350b952f74468754d49e 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H @@ -22,20 +22,31 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::pressureGradientExplicitSourceNew + Foam::pressureGradientExplicitSource Description - Creates a cell set pressure gradient source + Creates a pressure gradient source Note: Currently only handles kinematic pressure + Sources described by: + + pressureGradientExplicitSourceCoeffs + { + UName U; // Name of velocity field + Ubar (10.0 0 0); // Desired average velocity + gradPini gradPini [0 2 -2 0 0]; // initial pressure gradient + flowDir (1 0 0); // flow direction + } + + SourceFiles - pressureGradientExplicitSourceNew.C + pressureGradientExplicitSource.C \*---------------------------------------------------------------------------*/ -#ifndef pressureGradientExplicitSourceNew_H -#define pressureGradientExplicitSourceNew_H +#ifndef pressureGradientExplicitSource_H +#define pressureGradientExplicitSource_H #include "autoPtr.H" #include "topoSetSource.H" @@ -50,10 +61,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class pressureGradientExplicitSourceNew Declaration + Class pressureGradientExplicitSource Declaration \*---------------------------------------------------------------------------*/ -class pressureGradientExplicitSourceNew +class pressureGradientExplicitSource : public basicSource { @@ -84,10 +95,10 @@ class pressureGradientExplicitSourceNew void update(); //- Disallow default bitwise copy construct - pressureGradientExplicitSourceNew(const pressureGradientExplicitSourceNew&); + pressureGradientExplicitSource(const pressureGradientExplicitSource&); //- Disallow default bitwise assignment - void operator=(const pressureGradientExplicitSourceNew&); + void operator=(const pressureGradientExplicitSource&); public: @@ -99,7 +110,7 @@ public: // Constructors //- Construct from explicit source name and mesh - pressureGradientExplicitSourceNew + pressureGradientExplicitSource ( const word& sourceName, const word& modelType, diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSourceIO.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSourceIO.C index 1a69befd487bc343c84aad0d8536aff3a71b1566..b6d1b2d1cf2ba38daf88a33e30d56bee1602f83c 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSourceIO.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSourceIO.C @@ -27,11 +27,11 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::pressureGradientExplicitSourceNew::writeData(Ostream& os) const +void Foam::pressureGradientExplicitSource::writeData(Ostream& os) const { notImplemented ( - "void Foam::pressureGradientExplicitSourceNew::writeData" + "void Foam::pressureGradientExplicitSource::writeData" "(" "Ostream&" ") const" @@ -39,11 +39,11 @@ void Foam::pressureGradientExplicitSourceNew::writeData(Ostream& os) const } -bool Foam::pressureGradientExplicitSourceNew::read(const dictionary& dict) +bool Foam::pressureGradientExplicitSource::read(const dictionary& dict) { notImplemented ( - "bool Foam::pressureGradientExplicitSourceNew::read" + "bool Foam::pressureGradientExplicitSource::read" "(" "const dictionary&" ") const" diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/radialActuationDiskSource/radialActuationDiskSource.H b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/radialActuationDiskSource/radialActuationDiskSource.H index 4ed5aacb0aeb9275ce63020559e8f1f8664e5d08..4c464bcfd36754571d947eca2af534ca456a8969 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/radialActuationDiskSource/radialActuationDiskSource.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/radialActuationDiskSource/radialActuationDiskSource.H @@ -29,17 +29,31 @@ Description Actuation disk zone definition. Constant values for momentum source for actuation disk - T = 2*rho*A*sqr(Uo)*a*(1-a) - U1 = (1 -a)Uo + T = 2*rho*A*sqr(Uo)*a*(1-a) + U1 = (1 -a)Uo + where: - A: disk area - Uo: upstream velocity - a: 1 - Cp/Ct - U1: velocity at the disk + A: disk area + Uo: upstream velocity + a: 1 - Cp/Ct + U1: velocity at the disk The thrust is distributed by a radial function: - thrust(r) = T*(C0 + C1*r^2 + C2*r^4) + + thrust(r) = T*(C0 + C1*r^2 + C2*r^4) + + Sources described by: + + actuationDiskSourceCoeffs + { + fieldName U; // name of field to apply source + diskDir (-1 0 0); // disk direction + Cp 0.1; // power coefficient + Ct 0.5; // thrust coefficient + diskArea 5.0; // disk area + coeffs (0.1 0.5 0.01); // radial distribution coefficients + } SourceFiles @@ -51,10 +65,8 @@ SourceFiles #ifndef radialActuationDiskSource_H #define radialActuationDiskSource_H -#include "DimensionedField.H" -#include "volFieldsFwd.H" -#include "FixedList.H" #include "actuationDiskSource.H" +#include "FixedList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/profileModel/profileModelList.H b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/profileModel/profileModelList.H index 74326dced4b74ed907493363c2f066c831c212cc..0a6c12528844dc52ae2d7d0d9377f18b164fbfde 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/profileModel/profileModelList.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/profileModel/profileModelList.H @@ -28,7 +28,7 @@ Description Base class for profile models SourceFiles - profileModel.C + profileModelList.C \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.C index 2931149412a8236f2734096821b80ad5ff4b3b1d..4e9dccd4401e1b7fcd66f772e45834dec23f6822 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.C @@ -28,6 +28,7 @@ License #include "mathematicalConstants.H" #include "unitConversion.H" #include "geometricOneField.H" +#include "fvMatrices.H" using namespace Foam::constant; @@ -361,13 +362,13 @@ Foam::rotorDiskSource::rotorDiskSource ( const word& name, const word& modelType, - const dictionary& coeffs, + const dictionary& dict, const fvMesh& mesh ) : - basicSource(name, modelType, coeffs, mesh), - fieldName_(coeffs.lookup("fieldName")), + basicSource(name, modelType, dict, mesh), + fieldName_(coeffs_.lookup("fieldName")), rhoName_("none"), omega_(0.0), nBlades_(0), @@ -385,7 +386,7 @@ Foam::rotorDiskSource::rotorDiskSource coordSys_(false), rMax_(0.0) { - read(coeffs); + read(dict); } @@ -445,7 +446,7 @@ void Foam::rotorDiskSource::addSup(fvMatrix<vector>& eqn) void Foam::rotorDiskSource::writeData(Ostream& os) const { os << indent << name_ << endl; - coeffs_.write(os); + dict_.write(os); } diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.H b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.H index e610b15d7f11c42c7959f044fa19128bf6aed02a..dabdcfaee70019addd671ae370eadda7868b55a6 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.H @@ -25,11 +25,61 @@ Class Foam::rotorDiskSource Description - Cell-zone based momemtum source + Cell based momemtum source Source approximates the mean effects of rotor forces on a cylindrical region within the domain + Sources described by: + + rotorDiskSourceCoeffs + { + fieldName U; // name of field on which to apply source + rhoName rho; // density field if compressible case + nBlades 3; // number of blades + tip effect 0.96; // normalised radius above which lift = 0 + + inletFlowType local; // inlet flow type specification + + geometryMode auto; // geometry specification + + refDirection (-1 0 0); // reference direction + + flapCoeffs + { + beta0 0; // coning angle [deg] + beta1 0; // lateral flapping coeff + beta2 0; // longitudinal flapping coeff + } + trimCoeffs + { + alphac 15; // collective pitch angle [deg] + A 0; // lateral cyclic coeff + B 0; // longitudinal cyclic coeff + } + blade + { + ... + } + profiles + { + ... + } + } + + Where: + + geometryMode = + auto : determine rototor co-ord system from cells + specified : specified co-ord system + + inletFlowType = + fixed : specified velocity + surfaceNormal : specified normal velocity (positive towards rotor) + local : use local flow conditions + + + SourceFiles rotorDiskSource.C rotorDiskSourceTemplates.C @@ -44,6 +94,8 @@ SourceFiles #include "NamedEnum.H" #include "bladeModel.H" #include "profileModelList.H" +#include "volFieldsFwd.H" +#include "dimensionSet.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSourceTemplates.C b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSourceTemplates.C index fda54c4eb7dca7e6ee80d4e4624a2ed8ca38acc1..4427ecec52930a0e50c3d22a6ab454d6e3c1e0dd 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSourceTemplates.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/rotorDiskSource/rotorDiskSourceTemplates.C @@ -27,6 +27,7 @@ License #include "addToRunTimeSelectionTable.H" #include "mathematicalConstants.H" #include "unitConversion.H" +#include "volFields.H" using namespace Foam::constant;