diff --git a/src/fvModels/Make/files b/src/fvModels/Make/files index c678ff51e2..a1698216a7 100644 --- a/src/fvModels/Make/files +++ b/src/fvModels/Make/files @@ -19,9 +19,6 @@ derived/solidificationMeltingSource/solidificationMeltingSource.C derived/sixDoFAccelerationSource/sixDoFAccelerationSource.C derived/buoyancyForce/buoyancyForce.C derived/buoyancyEnergy/buoyancyEnergy.C -derived/damping/damping/damping.C -derived/damping/isotropicDamping/isotropicDamping.C -derived/damping/verticalDamping/verticalDamping.C derived/phaseLimitStabilisation/phaseLimitStabilisation.C derived/accelerationSource/accelerationSource.C derived/volumeFractionSource/volumeFractionSource.C diff --git a/src/waves/Make/files b/src/waves/Make/files index 7905f16b5e..b999601919 100644 --- a/src/waves/Make/files +++ b/src/waves/Make/files @@ -13,4 +13,9 @@ derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C derivedFvPatchFields/waveInletOutlet/waveInletOutletFvPatchFields.C derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C +fvModels/forcing/forcing.C +fvModels/isotropicDamping/isotropicDamping.C +fvModels/verticalDamping/verticalDamping.C +fvModels/waveForcing/waveForcing.C + LIB = $(FOAM_LIBBIN)/libwaves diff --git a/src/fvModels/derived/damping/damping/damping.C b/src/waves/fvModels/forcing/forcing.C similarity index 92% rename from src/fvModels/derived/damping/damping/damping.C rename to src/waves/fvModels/forcing/forcing.C index 80ab93452e..7c85681aef 100644 --- a/src/fvModels/derived/damping/damping/damping.C +++ b/src/waves/fvModels/forcing/forcing.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "damping.H" +#include "forcing.H" #include "fvMatrix.H" #include "zeroGradientFvPatchField.H" @@ -33,17 +33,15 @@ namespace Foam { namespace fv { - defineTypeNameAndDebug(damping, 0); + defineTypeNameAndDebug(forcing, 0); } } // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // -void Foam::fv::damping::readCoeffs() +void Foam::fv::forcing::readCoeffs() { - UName_ = coeffs().lookupOrDefault("U", "U"); - lambda_ = dimensionedScalar ( @@ -112,13 +110,13 @@ void Foam::fv::damping::readCoeffs() << "The scaling specification is incomplete. \"scale\", " << "\"origin\" and \"direction\" (or \"origins\" and " << "\"directions\"), must all be specified in order to scale " - << "the damping. The damping will be applied uniformly across " + << "the forcing. The forcing will be applied uniformly across " << "the cell set." << endl << endl; } } -Foam::tmp Foam::fv::damping::forceCoeff() const +Foam::tmp Foam::fv::forcing::forceCoeff() const { tmp tforceCoeff ( @@ -171,7 +169,7 @@ Foam::tmp Foam::fv::damping::forceCoeff() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::fv::damping::damping +Foam::fv::forcing::forcing ( const word& name, const word& modelType, @@ -180,7 +178,6 @@ Foam::fv::damping::damping ) : fvModel(name, modelType, dict, mesh), - UName_(word::null), lambda_("lambda", dimless/dimTime, NaN), scale_(nullptr), origins_(), @@ -192,13 +189,7 @@ Foam::fv::damping::damping // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::wordList Foam::fv::damping::addSupFields() const -{ - return wordList(1, UName_); -} - - -bool Foam::fv::damping::read(const dictionary& dict) +bool Foam::fv::forcing::read(const dictionary& dict) { if (fvModel::read(dict)) { diff --git a/src/fvModels/derived/damping/damping/damping.H b/src/waves/fvModels/forcing/forcing.H similarity index 83% rename from src/fvModels/derived/damping/damping/damping.H rename to src/waves/fvModels/forcing/forcing.H index b7aa61036d..9f47498db9 100644 --- a/src/fvModels/derived/damping/damping/damping.H +++ b/src/waves/fvModels/forcing/forcing.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,22 +22,22 @@ License along with OpenFOAM. If not, see . Class - Foam::fv::damping + Foam::fv::forcing Description - Base fvModel for damping functions. + Base fvModel for forcing functions. See also Foam::fv::isotropicDamping Foam::fv::verticalDamping SourceFiles - damping.C + forcing.C \*---------------------------------------------------------------------------*/ -#ifndef damping_H -#define damping_H +#ifndef forcing_H +#define forcing_H #include "fvModel.H" #include "Function1.H" @@ -51,10 +51,10 @@ namespace fv { /*---------------------------------------------------------------------------*\ - Class damping Declaration + Class forcing Declaration \*---------------------------------------------------------------------------*/ -class damping +class forcing : public fvModel { @@ -62,9 +62,6 @@ protected: // Protected Data - //- Name of the velocity field - word UName_; - //- Damping coefficient [1/s] dimensionedScalar lambda_; @@ -90,13 +87,13 @@ protected: public: //- Runtime type information - TypeName("damping"); + TypeName("forcing"); // Constructors //- Construct from components - damping + forcing ( const word& name, const word& modelType, @@ -106,19 +103,12 @@ public: //- Destructor - virtual ~damping() + virtual ~forcing() {} // Member Functions - // Checks - - //- Return the list of fields for which the fvModel adds source term - // to the transport equation - virtual wordList addSupFields() const; - - // IO //- Read dictionary diff --git a/src/fvModels/derived/damping/isotropicDamping/isotropicDamping.C b/src/waves/fvModels/isotropicDamping/isotropicDamping.C similarity index 93% rename from src/fvModels/derived/damping/isotropicDamping/isotropicDamping.C rename to src/waves/fvModels/isotropicDamping/isotropicDamping.C index fe9470496a..ba4dd738e0 100644 --- a/src/fvModels/derived/damping/isotropicDamping/isotropicDamping.C +++ b/src/waves/fvModels/isotropicDamping/isotropicDamping.C @@ -75,7 +75,8 @@ Foam::fv::isotropicDamping::isotropicDamping const fvMesh& mesh ) : - damping(name, modelType, dict, mesh), + forcing(name, modelType, dict, mesh), + UName_(coeffs().lookupOrDefault("U", "U")), value_("value", dimVelocity, vector::uniform(NaN)) { readCoeffs(); @@ -84,6 +85,12 @@ Foam::fv::isotropicDamping::isotropicDamping // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +Foam::wordList Foam::fv::isotropicDamping::addSupFields() const +{ + return wordList(1, UName_); +} + + void Foam::fv::isotropicDamping::addSup ( fvMatrix& eqn, @@ -137,7 +144,7 @@ void Foam::fv::isotropicDamping::distribute(const polyDistributionMap&) bool Foam::fv::isotropicDamping::read(const dictionary& dict) { - if (damping::read(dict)) + if (forcing::read(dict)) { readCoeffs(); return true; diff --git a/src/fvModels/derived/damping/isotropicDamping/isotropicDamping.H b/src/waves/fvModels/isotropicDamping/isotropicDamping.H similarity index 87% rename from src/fvModels/derived/damping/isotropicDamping/isotropicDamping.H rename to src/waves/fvModels/isotropicDamping/isotropicDamping.H index db3eb8bcd5..9224201960 100644 --- a/src/fvModels/derived/damping/isotropicDamping/isotropicDamping.H +++ b/src/waves/fvModels/isotropicDamping/isotropicDamping.H @@ -25,15 +25,15 @@ Class Foam::fv::isotropicDamping Description - This fvModel applies an implicit damping force to all components of the + This fvModel applies an implicit forcing force to all components of the vector field to relax the field towards a specified uniform value. Its intended purpose is to damp the motions of an interface in the region approaching an outlet so that no reflections are generated. - The damping force coefficient \f$\lambda\f$ should be set based on the - desired level of damping and the residence time of a perturbation through - the damping zone. For example, if waves moving at 2 [m/s] are travelling - through a damping zone 8 [m] in length, then the residence time is 4 [s]. If + The forcing force coefficient \f$\lambda\f$ should be set based on the + desired level of forcing and the residence time of a perturbation through + the forcing zone. For example, if waves moving at 2 [m/s] are travelling + through a forcing zone 8 [m] in length, then the residence time is 4 [s]. If it is deemed necessary to damp for 5 time-scales, then \f$\lambda\f$ should be set to equal 5/(4 [s]) = 1.2 [1/s]. @@ -44,6 +44,8 @@ Usage { type isotropicDamping; + libs ("libwaves.so"); + // Define the line along which to apply the graduation origin (1200 0 0); direction (1 0 0); @@ -66,7 +68,7 @@ Usage \endverbatim See also - Foam::fv::damping + Foam::fv::forcing Foam::fv::verticalDamping SourceFiles @@ -77,7 +79,7 @@ SourceFiles #ifndef isotropicDamping_H #define isotropicDamping_H -#include "damping.H" +#include "forcing.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -92,10 +94,13 @@ namespace fv class isotropicDamping : - public damping + public forcing { // Private Data + //- Name of the velocity field + word UName_; + //- Reference value dimensionedVector value_; @@ -138,7 +143,14 @@ public: // Member Functions - // Add explicit and implicit contributions + // Checks + + //- Return the list of fields for which the fvModel adds source term + // to the transport equation + virtual wordList addSupFields() const; + + + // Add explicit and implicit contributions //- Source term to momentum equation virtual void addSup diff --git a/src/fvModels/derived/damping/verticalDamping/verticalDamping.C b/src/waves/fvModels/verticalDamping/verticalDamping.C similarity index 94% rename from src/fvModels/derived/damping/verticalDamping/verticalDamping.C rename to src/waves/fvModels/verticalDamping/verticalDamping.C index aab440b35e..e7b048ca16 100644 --- a/src/fvModels/derived/damping/verticalDamping/verticalDamping.C +++ b/src/waves/fvModels/verticalDamping/verticalDamping.C @@ -67,12 +67,19 @@ Foam::fv::verticalDamping::verticalDamping const fvMesh& mesh ) : - damping(name, modelType, dict, mesh) + forcing(name, modelType, dict, mesh), + UName_(coeffs().lookupOrDefault("U", "U")) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +Foam::wordList Foam::fv::verticalDamping::addSupFields() const +{ + return wordList(1, UName_); +} + + void Foam::fv::verticalDamping::addSup ( fvMatrix& eqn, diff --git a/src/fvModels/derived/damping/verticalDamping/verticalDamping.H b/src/waves/fvModels/verticalDamping/verticalDamping.H similarity index 90% rename from src/fvModels/derived/damping/verticalDamping/verticalDamping.H rename to src/waves/fvModels/verticalDamping/verticalDamping.H index 053d579934..11d88ffa90 100644 --- a/src/fvModels/derived/damping/verticalDamping/verticalDamping.H +++ b/src/waves/fvModels/verticalDamping/verticalDamping.H @@ -25,7 +25,7 @@ Class Foam::fv::verticalDamping Description - This fvModel applies an explicit damping force to components of the vector + This fvModel applies an explicit forcing force to components of the vector field in the direction of gravity. Its intended purpose is to damp the vertical motions of an interface in the region approaching an outlet so that no reflections are generated. @@ -44,8 +44,8 @@ Description \f] The coefficient \f$\lambda\f$ should be set based on the desired level of - damping and the residence time of a perturbation through the damping zone. - For example, if waves moving at 2 [m/s] are travelling through a damping + forcing and the residence time of a perturbation through the forcing zone. + For example, if waves moving at 2 [m/s] are travelling through a forcing zone 8 [m] in length, then the residence time is 4 [s]. If it is deemed necessary to damp for 5 time-scales, then \f$\lambda\f$ should be set to equal 5/(4 [s]) = 1.2 [1/s]. @@ -57,6 +57,8 @@ Usage { type verticalDamping; + libs ("libwaves.so"); + // Define the line along which to apply the graduation origin (1200 0 0); direction (1 0 0); @@ -80,7 +82,7 @@ Usage \endverbatim See also - Foam::fv::damping + Foam::fv::forcing Foam::fv::isotropicDamping SourceFiles @@ -91,7 +93,7 @@ SourceFiles #ifndef verticalDamping_H #define verticalDamping_H -#include "damping.H" +#include "forcing.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -106,8 +108,14 @@ namespace fv class verticalDamping : - public damping + public forcing { + // Private Data + + //- Name of the velocity field + word UName_; + + // Private Member Functions //- Source term to momentum equation @@ -143,7 +151,14 @@ public: // Member Functions - // Add explicit and implicit contributions + // Checks + + //- Return the list of fields for which the fvModel adds source term + // to the transport equation + virtual wordList addSupFields() const; + + + // Add explicit and implicit contributions //- Source term to momentum equation virtual void addSup diff --git a/src/waves/fvModels/waveForcing/waveForcing.C b/src/waves/fvModels/waveForcing/waveForcing.C new file mode 100644 index 0000000000..fbdc045475 --- /dev/null +++ b/src/waves/fvModels/waveForcing/waveForcing.C @@ -0,0 +1,158 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "waveForcing.H" +#include "levelSet.H" +#include "fvMatrix.H" +#include "fvmSup.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace fv +{ + defineTypeNameAndDebug(waveForcing, 0); + addToRunTimeSelectionTable(fvModel, waveForcing, dictionary); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::fv::waveForcing::waveForcing +( + const word& name, + const word& modelType, + const dictionary& dict, + const fvMesh& mesh +) +: + forcing(name, modelType, dict, mesh), + waves_(waveSuperposition::New(mesh)), + liquidPhaseName_(coeffs().lookup("liquidPhase")), + alphaName_(IOobject::groupName("alpha", liquidPhaseName_)), + UName_(coeffs().lookupOrDefault("U", "U")), + forceCoeff_(this->forceCoeff()) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::wordList Foam::fv::waveForcing::addSupFields() const +{ + return {alphaName_, UName_}; +} + + +void Foam::fv::waveForcing::addSup +( + fvMatrix& eqn, + const word& fieldName +) const +{ + if (fieldName == alphaName_) + { + eqn -= fvm::Sp(forceCoeff_(), eqn.psi()); + eqn += forceCoeff_()*alphaWaves_(); + } +} + + +void Foam::fv::waveForcing::addSup +( + const volScalarField& rho, + fvMatrix& eqn, + const word& fieldName +) const +{ + if (fieldName == UName_) + { + eqn -= fvm::Sp(rho*forceCoeff_(), eqn.psi()); + eqn += rho*forceCoeff_()*Uwaves_(); + } +} + + +bool Foam::fv::waveForcing::movePoints() +{ + forceCoeff_ = this->forceCoeff(); + return true; +} + + +void Foam::fv::waveForcing::topoChange(const polyTopoChangeMap&) +{ + forceCoeff_ = this->forceCoeff(); +} + + +void Foam::fv::waveForcing::mapMesh(const polyMeshMap& map) +{ + forceCoeff_ = this->forceCoeff(); +} + + +void Foam::fv::waveForcing::distribute(const polyDistributionMap&) +{ + forceCoeff_ = this->forceCoeff(); +} + + +void Foam::fv::waveForcing::correct() +{ + const scalar t = mesh().time().value(); + + // Cell centres and points + const pointField& ccs = mesh().cellCentres(); + const pointField& pts = mesh().points(); + + const scalarField h(waves_.height(t, ccs)); + const scalarField hp(waves_.height(t, pts)); + const vectorField uGas(waves_.UGas(t, ccs)); + const vectorField uGasp(waves_.UGas(t, pts)); + const vectorField uLiq(waves_.ULiquid(t, ccs)); + const vectorField uLiqp(waves_.ULiquid(t, pts)); + + alphaWaves_ = volScalarField::Internal::New + ( + "alphaWaves", + mesh(), + dimless, + levelSetFraction(mesh(), h, hp, false) + ); + + Uwaves_ = volVectorField::Internal::New + ( + "Uwaves", + mesh(), + dimVelocity, + levelSetAverage(mesh(), h, hp, uGas, uGasp, uLiq, uLiqp) + ); +} + + +// ************************************************************************* // diff --git a/src/waves/fvModels/waveForcing/waveForcing.H b/src/waves/fvModels/waveForcing/waveForcing.H new file mode 100644 index 0000000000..7f10b80937 --- /dev/null +++ b/src/waves/fvModels/waveForcing/waveForcing.H @@ -0,0 +1,201 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::fv::waveForcing + +Description + This fvModel applies forcing to the liquid phase-fraction field and all + components of the vector field to relax the fields towards those + calculated from the current wave distribution. + + The forcing force coefficient \f$\lambda\f$ should be set based on the + desired level of forcing and the residence time the waves through the + forcing zone. For example, if waves moving at 2 [m/s] are travelling + through a forcing zone 8 [m] in length, then the residence time is 4 [s]. If + it is deemed necessary to force for 5 time-scales, then \f$\lambda\f$ should + be set to equal 5/(4 [s]) = 1.2 [1/s]. + +Usage + Example usage: + \verbatim + waveForcing1 + { + type waveForcing; + + libs ("libwaves.so"); + + liquidPhase water; + + // Define the line along which to apply the graduation + origin (600 0 0); + direction (-1 0 0); + + // // Or, define multiple lines + // origins ((600 0 0) (600 -300 0) (600 300 0)); + // directions ((-1 0 0) (0 1 0) (0 -1 0)); + + scale + { + type halfCosineRamp; + start 0; + duration 300; + } + + lambda 0.5; // Forcing coefficient + } + \endverbatim + +See also + Foam::fv::forcing + +SourceFiles + waveForcing.C + +\*---------------------------------------------------------------------------*/ + +#ifndef waveForcing_H +#define waveForcing_H + +#include "forcing.H" +#include "waveSuperposition.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace fv +{ + +/*---------------------------------------------------------------------------*\ + Class waveForcing Declaration +\*---------------------------------------------------------------------------*/ + +class waveForcing +: + public forcing +{ + // Private Data + + //- Reference to the waves + const waveSuperposition& waves_; + + //- Name of the liquid phase + const word liquidPhaseName_; + + //- Name of the liquid phase-fraction field + const word alphaName_; + + //- Name of the velocity field + const word UName_; + + //- Phase-fraction field calculated from the current wave form + tmp alphaWaves_; + + //- Velocity field calculated from the current wave form + tmp Uwaves_; + + //- Forcing coefficient field + tmp forceCoeff_; + + +public: + + //- Runtime type information + TypeName("waveForcing"); + + + // Constructors + + //- Construct from components + waveForcing + ( + const word& name, + const word& modelType, + const dictionary& dict, + const fvMesh& mesh + ); + + + //- Destructor + virtual ~waveForcing() + {} + + + // Member Functions + + // Checks + + //- Return the list of fields for which the fvModel adds source term + // to the transport equation + virtual wordList addSupFields() const; + + + // Add explicit and implicit contributions + + //- Source term to VoF phase-fraction equation + virtual void addSup + ( + fvMatrix& eqn, + const word& fieldName + ) const; + + //- Source term to momentum equation + virtual void addSup + ( + const volScalarField& rho, + fvMatrix& eqn, + const word& fieldName + ) const; + + + // Mesh changes + + //- Update for mesh motion + virtual bool movePoints(); + + //- Update topology using the given map + virtual void topoChange(const polyTopoChangeMap&); + + //- Update from another mesh using the given map + virtual void mapMesh(const polyMeshMap&); + + //- Redistribute or update using the given distribution map + virtual void distribute(const polyDistributionMap&); + + + //- Correct the wave forcing coefficients + virtual void correct(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fv +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/0/U.orig b/tutorials/multiphase/interFoam/laminar/forcedWave/0/U.orig new file mode 100644 index 0000000000..df382e538d --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/0/U.orig @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (2 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + left + { + type fixedValue; + value $internalField; + } + right + { + type outletPhaseMeanVelocity; + UnMean 2; + alpha alpha.water; + } + top + { + type pressureInletOutletVelocity; + tangentialVelocity $internalField; + value $internalField; + } + bottom + { + type noSlip; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/0/alpha.water.orig b/tutorials/multiphase/interFoam/laminar/forcedWave/0/alpha.water.orig new file mode 100644 index 0000000000..11868190f6 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/0/alpha.water.orig @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + "(right|bottom)" + { + type zeroGradient; + } + left + { + type fixedValue; + value $internalField; + } + top + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/0/p_rgh b/tutorials/multiphase/interFoam/laminar/forcedWave/0/p_rgh new file mode 100644 index 0000000000..04f86930ad --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/0/p_rgh @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + "(left|right|bottom)" + { + type fixedFluxPressure; + value uniform 0; + } + + top + { + type prghTotalPressure; + p0 uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/Allrun b/tutorials/multiphase/interFoam/laminar/forcedWave/Allrun new file mode 100755 index 0000000000..5ca2b81104 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/Allrun @@ -0,0 +1,29 @@ +#!/bin/sh + +cd ${0%/*} || exit 1 + +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh + +runApplication extrudeMesh + +for i in 1 2 +do + runApplication -s $i topoSet -dict topoSetDict$i + runApplication -s $i refineMesh -dict refineMeshDictX -overwrite +done + +for i in 3 4 5 6 +do + runApplication -s $i topoSet -dict topoSetDict$i + runApplication -s $i refineMesh -dict refineMeshDictY -overwrite +done + +runApplication setFields + +runApplication decomposePar + +runParallel $(getApplication) + +runApplication reconstructPar diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/constant/fvModels b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/fvModels new file mode 100644 index 0000000000..c904f233b2 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/fvModels @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object fvModels; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +forcing +{ + type waveForcing; + + libs ("libwaves.so"); + + liquidPhase water; + + origin (600 0 0); + direction (-1 0 0); + + scale + { + type halfCosineRamp; + start 0; + duration 300; + } + + lambda 0.5; +} + +damping +{ + type isotropicDamping; + + libs ("libwaves.so"); + + origin (1200 0 0); + direction (1 0 0); + + scale + { + type halfCosineRamp; + start 0; + duration 600; + } + + lambda 0.5; + + value (2 0 0); +} + + +//************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/constant/fvModels.verticalDamping b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/fvModels.verticalDamping new file mode 100644 index 0000000000..d28aa7be0e --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/fvModels.verticalDamping @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object fvModels; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +option1 +{ + type verticalDamping; + + origin (1200 0 0); + direction (1 0 0); + scale + { + type halfCosineRamp; + start 0; + duration 600; + } + + lambda 0.5; +} + + +//************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/constant/g b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/g new file mode 100644 index 0000000000..770a56192e --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/constant/momentumTransport b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/momentumTransport new file mode 100644 index 0000000000..8278c989ec --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/momentumTransport @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object momentumTransport; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/constant/phaseProperties b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/phaseProperties new file mode 100644 index 0000000000..7794a33045 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/phaseProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object phaseProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +sigma 0; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/constant/physicalProperties.air b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/physicalProperties.air new file mode 100644 index 0000000000..fab7bde58b --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/physicalProperties.air @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object physicalProperties.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +viscosityModel constant; + +nu 1.48e-05; + +rho 1; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/constant/physicalProperties.water b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/physicalProperties.water new file mode 100644 index 0000000000..e9b9d7dc4e --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/physicalProperties.water @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object physicalProperties.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +viscosityModel constant; + +nu 1e-06; + +rho 1000; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/constant/waveProperties b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/waveProperties new file mode 100644 index 0000000000..245242628b --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/constant/waveProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object waveProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +origin (0 0 0); + +direction (1 0 0); + +waves +( + Airy + { + length 300; + amplitude 2.5; + phase 0; + angle 0; + } +); + +UMean (2 0 0); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/blockMeshDict b/tutorials/multiphase/interFoam/laminar/forcedWave/system/blockMeshDict new file mode 100644 index 0000000000..6b2879df5f --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/blockMeshDict @@ -0,0 +1,80 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0 -300 -10) + (1200 -300 -10) + (1200 300 -10) + (0 300 -10) + (0 -300 10) + (1200 -300 10) + (1200 300 10) + (0 300 10) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (67 40 1) simpleGrading (1 1 1) +); + +defaultPatch +{ + name frontAndBack; + type empty; +} + +boundary +( + left + { + type patch; + faces + ( + (0 4 7 3) + ); + } + right + { + type patch; + faces + ( + (2 6 5 1) + ); + } + bottom + { + type wall; + faces + ( + (0 1 5 4) + ); + } + top + { + type patch; + faces + ( + (2 3 7 6) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/controlDict b/tutorials/multiphase/interFoam/laminar/forcedWave/system/controlDict new file mode 100644 index 0000000000..6c7c603401 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/controlDict @@ -0,0 +1,66 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application interFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 200; + +deltaT 0.05; + +writeControl adjustableRunTime; + +writeInterval 1; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +maxCo 1; + +maxAlphaCo 1; + +maxDeltaT 1; + +functions +{ + interfaceHeight1 + { + type interfaceHeight; + libs ("libfieldFunctionObjects.so"); + locations ((300 0 0) (450 0 0) (600 0 0)); + alpha alpha.water; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/decomposeParDict b/tutorials/multiphase/interFoam/laminar/forcedWave/system/decomposeParDict new file mode 100644 index 0000000000..a82c6842d5 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/decomposeParDict @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 6; + +method simple; + +simpleCoeffs +{ + n (3 2 1); +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/extrudeMeshDict b/tutorials/multiphase/interFoam/laminar/forcedWave/system/extrudeMeshDict new file mode 100644 index 0000000000..3c347c04f9 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/extrudeMeshDict @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object extrudeMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +constructFrom mesh; + +sourceCase "."; + +sourcePatches (right); + +flipNormals false; + +nLayers 25; + +expansionRatio 1.09; + +extrudeModel linearNormal; + +linearNormalCoeffs +{ + thickness 1500; +} + +mergeFaces false; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/forcedWave/system/fvSchemes new file mode 100644 index 0000000000..6b8bf3303a --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/fvSchemes @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default CrankNicolson ocCoeff + { + type scale; + scale linearRamp; + duration 1.0; + value 0.9; + }; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(rhoPhi,U) Gauss linearUpwindV grad(U); + div(phi,alpha) Gauss interfaceCompression vanLeer 1; + + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/fvSolution b/tutorials/multiphase/interFoam/laminar/forcedWave/system/fvSolution new file mode 100644 index 0000000000..02b1ef3045 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/fvSolution @@ -0,0 +1,90 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.water.*" + { + nAlphaCorr 2; + nAlphaSubCycles 1; + + MULESCorr yes; + nLimiterIter 3; + alphaApplyPrevCorr yes; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + minIter 1; + } + + pcorr + { + solver GAMG; + smoother DIC; + tolerance 1e-4; + relTol 0.01; + } + + pcorrFinal + { + $pcorr; + relTol 0; + }; + + + p_rgh + { + solver GAMG; + smoother DIC; + tolerance 1e-7; + relTol 0.001; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + "U.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-7; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor yes; + nOuterCorrectors 1; + nCorrectors 3; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/refineMeshDictX b/tutorials/multiphase/interFoam/laminar/forcedWave/system/refineMeshDictX new file mode 100644 index 0000000000..f1e82dd6cf --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/refineMeshDictX @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object refineMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +set box; + +coordinateSystem global; + +globalCoeffs +{ + e1 (1 0 0); + e2 (0 1 0); +} + +directions +( + e1 +); + +useHexTopology true; + +geometricCut false; + +writeMesh false; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/refineMeshDictY b/tutorials/multiphase/interFoam/laminar/forcedWave/system/refineMeshDictY new file mode 100644 index 0000000000..3c2a2252be --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/refineMeshDictY @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object refineMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +set box; + +coordinateSystem global; + +globalCoeffs +{ + e1 (1 0 0); + e2 (0 1 0); +} + +directions +( + e2 +); + +useHexTopology true; + +geometricCut false; + +writeMesh false; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/setFieldsDict b/tutorials/multiphase/interFoam/laminar/forcedWave/system/setFieldsDict new file mode 100644 index 0000000000..14f5f6ca12 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/setFieldsDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 +); + +regions +( + boxToCell + { + box (-10000 -10000 -10000) (10000 0 10000); + + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } + + // Set patch values (using ==) + boxToFace + { + box (-10000 -10000 -10000) (10000 0 10000); + + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/setWavesDict b/tutorials/multiphase/interFoam/laminar/forcedWave/system/setWavesDict new file mode 100644 index 0000000000..2e9d075c38 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/setWavesDict @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object setWavesDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +alpha alpha.water; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict1 b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict1 new file mode 100644 index 0000000000..f82bfe35a4 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict1 @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name box; + type cellSet; + action new; + source boxToCell; + box (-1e6 -40 -1e6) (1300 40 1e6); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict2 b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict2 new file mode 100644 index 0000000000..9e8a817dc4 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict2 @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name box; + type cellSet; + action new; + source boxToCell; + box (-1e6 -30 -1e6) (1200 30 1e6); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict3 b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict3 new file mode 100644 index 0000000000..4615dccb2d --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict3 @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name box; + type cellSet; + action new; + source boxToCell; + box (-1e6 -40 -1e6) (1e6 40 1e6); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict4 b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict4 new file mode 100644 index 0000000000..a0f6e75325 --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict4 @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name box; + type cellSet; + action new; + source boxToCell; + box (-1e6 -30 -1e6) (1e6 30 1e6); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict5 b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict5 new file mode 100644 index 0000000000..a8889e795e --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict5 @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name box; + type cellSet; + action new; + source boxToCell; + box (-1e6 -20 -1e6) (1e6 20 1e6); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict6 b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict6 new file mode 100644 index 0000000000..6afd5b06ea --- /dev/null +++ b/tutorials/multiphase/interFoam/laminar/forcedWave/system/topoSetDict6 @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name box; + type cellSet; + action new; + source boxToCell; + box (-1e6 -10 -1e6) (1e6 10 1e6); + } +); + +// ************************************************************************* //