mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'feature-ihc-wavemodels' into 'develop'
Feature ihc wavemodels See merge request Development/openfoam!317
This commit is contained in:
@ -33,6 +33,10 @@ License
|
||||
#include "Time.H"
|
||||
#include "gravityMeshObject.H"
|
||||
|
||||
#include "polyMesh.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::Enum<Foam::waveMakerPointPatchVectorField::motionTypes>
|
||||
@ -89,6 +93,48 @@ Foam::scalar Foam::waveMakerPointPatchVectorField::timeCoeff
|
||||
}
|
||||
|
||||
|
||||
void Foam::waveMakerPointPatchVectorField::initialiseGeometry()
|
||||
{
|
||||
// Global patch extents
|
||||
const vectorField& Cp = this->patch().localPoints();
|
||||
const vectorField CpLocal(Cp);
|
||||
boundBox bb(CpLocal, true);
|
||||
|
||||
const scalar xMin = bb.min().x();
|
||||
const scalar xMax = bb.max().x();
|
||||
const scalar yMin = bb.min().y();
|
||||
const scalar yMax = bb.max().y();
|
||||
zSpan_ = bb.max().z() - bb.min().z();
|
||||
|
||||
zMinGb_ = bb.min().z();
|
||||
reduce(zMinGb_, minOp<scalar>());
|
||||
|
||||
// Global x, y positions of the paddle centres
|
||||
xPaddle_.setSize(nPaddle_, 0);
|
||||
yPaddle_.setSize(nPaddle_, 0);
|
||||
const scalar xMid = xMin + 0.5*(xMax - xMin);
|
||||
const scalar paddleDy = (yMax - yMin)/scalar(nPaddle_);
|
||||
|
||||
for (label paddlei = 0; paddlei < nPaddle_; ++paddlei)
|
||||
{
|
||||
xPaddle_[paddlei] = xMid;
|
||||
yPaddle_[paddlei] = paddlei*paddleDy + yMin + 0.5*paddleDy;
|
||||
}
|
||||
|
||||
// Local face centres
|
||||
x_ = this->patch().localPoints().component(0);
|
||||
y_ = this->patch().localPoints().component(1);
|
||||
z_ = this->patch().localPoints().component(2);
|
||||
|
||||
// Local point-to-paddle addressing
|
||||
pointToPaddle_.setSize(this->patch().size(), -1);
|
||||
|
||||
forAll(pointToPaddle_, ppi)
|
||||
{
|
||||
pointToPaddle_[ppi] = floor((y_[ppi] - yMin)/(paddleDy+0.01*paddleDy));
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
||||
@ -105,10 +151,11 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
||||
wavePeriod_(0),
|
||||
waveHeight_(0),
|
||||
wavePhase_(0),
|
||||
waveLength_(0),
|
||||
waveAngle_(0),
|
||||
startTime_(0),
|
||||
rampTime_(1),
|
||||
secondOrder_(false)
|
||||
secondOrder_(false),
|
||||
nPaddle_(0)
|
||||
{}
|
||||
|
||||
|
||||
@ -127,29 +174,43 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
||||
wavePeriod_(dict.get<scalar>("wavePeriod")),
|
||||
waveHeight_(dict.get<scalar>("waveHeight")),
|
||||
wavePhase_(dict.get<scalar>("wavePhase")),
|
||||
waveLength_(this->waveLength(initialDepth_, wavePeriod_)),
|
||||
waveAngle_(dict.get<scalar>("waveAngle")),
|
||||
startTime_
|
||||
(
|
||||
dict.lookupOrDefault<scalar>
|
||||
dict.getOrDefault<scalar>
|
||||
(
|
||||
"startTime",
|
||||
db().time().startTime().value()
|
||||
)
|
||||
),
|
||||
rampTime_(dict.get<scalar>("rampTime")),
|
||||
secondOrder_(dict.lookupOrDefault<bool>("secondOrder", false))
|
||||
secondOrder_(dict.getOrDefault<bool>("secondOrder", false)),
|
||||
nPaddle_(dict.getOrDefault<label>("nPaddle", 1))
|
||||
{
|
||||
// Create the co-ordinate system
|
||||
if (mag(n_) < SMALL)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Patch normal direction vector is not set. 'n' = " << n_
|
||||
<< "Patch normal direction vector is not set. 'n' = " << n_
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
n_ /= mag(n_);
|
||||
n_.normalise();
|
||||
|
||||
gHat_ = (g() - n_*(n_&g()));
|
||||
gHat_ /= mag(gHat_);
|
||||
if (mag(gHat_) < SMALL)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Patch normal and gravity directions must not be aligned. "
|
||||
<< "'n' = " << n_ << " 'g' = " << g()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
gHat_.normalise();
|
||||
|
||||
waveAngle_ *= constant::mathematical::pi/180;
|
||||
|
||||
initialiseGeometry();
|
||||
|
||||
waterDepthRef_.setSize(nPaddle_, -1);
|
||||
|
||||
if (!dict.found("value"))
|
||||
{
|
||||
@ -174,10 +235,11 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
||||
wavePeriod_(ptf.wavePeriod_),
|
||||
waveHeight_(ptf.waveHeight_),
|
||||
wavePhase_(ptf.wavePhase_),
|
||||
waveLength_(ptf.waveLength_),
|
||||
waveAngle_(ptf.waveAngle_),
|
||||
startTime_(ptf.startTime_),
|
||||
rampTime_(ptf.rampTime_),
|
||||
secondOrder_(ptf.secondOrder_)
|
||||
secondOrder_(ptf.secondOrder_),
|
||||
nPaddle_(ptf.nPaddle_)
|
||||
{}
|
||||
|
||||
|
||||
@ -195,10 +257,11 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
||||
wavePeriod_(ptf.wavePeriod_),
|
||||
waveHeight_(ptf.waveHeight_),
|
||||
wavePhase_(ptf.wavePhase_),
|
||||
waveLength_(ptf.waveLength_),
|
||||
waveAngle_(ptf.waveAngle_),
|
||||
startTime_(ptf.startTime_),
|
||||
rampTime_(ptf.rampTime_),
|
||||
secondOrder_(ptf.secondOrder_)
|
||||
secondOrder_(ptf.secondOrder_),
|
||||
nPaddle_(ptf.nPaddle_)
|
||||
{}
|
||||
|
||||
|
||||
@ -211,86 +274,160 @@ void Foam::waveMakerPointPatchVectorField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
if (firstTime == 0)
|
||||
{
|
||||
// Set the reference water depth
|
||||
if (initialDepth_ != 0 )
|
||||
{
|
||||
forAll(waterDepthRef_,paddlei)
|
||||
{
|
||||
waterDepthRef_[paddlei] = initialDepth_;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "initialDepth is not set. Please update "
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
|
||||
Info << " WaterDepth at the wavepaddles = " << waterDepthRef_ << endl;
|
||||
firstTime = 1;
|
||||
}
|
||||
|
||||
const scalar t = db().time().value() - startTime_;
|
||||
|
||||
const scalar waveK = constant::mathematical::twoPi/waveLength_;
|
||||
const scalar sigma = constant::mathematical::twoPi/wavePeriod_;
|
||||
scalarField waveLength_(nPaddle_,-1);
|
||||
|
||||
const scalar kh = waveK*initialDepth_;
|
||||
scalarField waveK(nPaddle_, -1);
|
||||
scalarField waveKx(nPaddle_, -1);
|
||||
scalarField waveKy(nPaddle_, -1);
|
||||
|
||||
forAll(waveK, pointi)
|
||||
{
|
||||
waveLength_[pointi] = waveLength(waterDepthRef_[pointi], wavePeriod_);
|
||||
|
||||
waveK[pointi] = constant::mathematical::twoPi/waveLength_[pointi];
|
||||
waveKx[pointi] = waveK[pointi]*cos(waveAngle_);
|
||||
waveKy[pointi] = waveK[pointi]*sin(waveAngle_);
|
||||
}
|
||||
const scalar sigma = 2*constant::mathematical::pi/wavePeriod_;
|
||||
|
||||
switch (motionType_)
|
||||
{
|
||||
case motionTypes::flap:
|
||||
{
|
||||
const scalar m1 =
|
||||
4*sinh(kh)/(sinh(2*kh) + 2*kh)*(sinh(kh) + (1 - cosh(kh))/kh);
|
||||
const pointField& points = patch().localPoints();
|
||||
scalarField motionX(patch().localPoints().size(), -1);
|
||||
|
||||
scalar motionX = 0.5*waveHeight_/m1*sin(sigma*t);
|
||||
|
||||
if (secondOrder_)
|
||||
forAll(points, pointi)
|
||||
{
|
||||
motionX +=
|
||||
sqr(waveHeight_)/(16*initialDepth_)
|
||||
*(3*cosh(kh)/pow3(sinh(kh)) - 2/m1)
|
||||
*sin(2*sigma*t);
|
||||
const label paddlei = pointToPaddle_[pointi];
|
||||
|
||||
const scalar phaseTot =
|
||||
waveKx[paddlei]*xPaddle_[paddlei]
|
||||
+ waveKy[paddlei]*yPaddle_[paddlei];
|
||||
|
||||
const scalar depthRef = waterDepthRef_[paddlei];
|
||||
const scalar kh = waveK[paddlei]*depthRef;
|
||||
const scalar pz = points[pointi].component(2);
|
||||
|
||||
const scalar m1 =
|
||||
(4*sinh(kh)/(sinh(2*kh) + 2*kh))
|
||||
* (sinh(kh) + 1/kh*(1 - cosh(kh)));
|
||||
|
||||
const scalar boardStroke = waveHeight_/m1;
|
||||
|
||||
motionX[pointi] = 0.5*boardStroke*sin(phaseTot - sigma*t);
|
||||
|
||||
if (secondOrder_)
|
||||
{
|
||||
motionX[pointi] +=
|
||||
sqr(waveHeight_)/(16*depthRef)
|
||||
* (3*cosh(kh)/pow3(sinh(kh)) - 2/m1)
|
||||
* sin(phaseTot - 2*sigma*t);
|
||||
|
||||
}
|
||||
|
||||
motionX[pointi] *= 1.0 + (pz - zMinGb_ - depthRef)/depthRef;
|
||||
|
||||
}
|
||||
|
||||
const pointField& points = patch().localPoints();
|
||||
const scalarField dz(-(points & gHat_) - initialDepth_);
|
||||
|
||||
Field<vector>::operator=
|
||||
(
|
||||
n_*timeCoeff(t)*motionX*(1 + dz/initialDepth_)
|
||||
);
|
||||
Field<vector>::operator=(timeCoeff(t)*n_*motionX);
|
||||
|
||||
break;
|
||||
}
|
||||
case motionTypes::piston:
|
||||
{
|
||||
const scalar m1 = 2*(cosh(2*kh) - 1)/(sinh(2*kh) + 2*kh);
|
||||
const pointField& points = patch().localPoints();
|
||||
scalarField motionX(patch().localPoints().size(), -1);
|
||||
|
||||
scalar motionX = 0.5*waveHeight_/m1*sin(sigma*t);
|
||||
|
||||
if (secondOrder_)
|
||||
forAll(points, pointi)
|
||||
{
|
||||
motionX +=
|
||||
sqr(waveHeight_)
|
||||
/(32*initialDepth_)*(3*cosh(kh)
|
||||
/pow3(sinh(kh)) - 2/m1);
|
||||
const label paddlei = pointToPaddle_[pointi];
|
||||
|
||||
const scalar phaseTot =
|
||||
waveKx[paddlei]*xPaddle_[paddlei]
|
||||
+ waveKy[paddlei]*yPaddle_[paddlei];
|
||||
|
||||
const scalar depthRef = waterDepthRef_[paddlei];
|
||||
const scalar kh = waveK[paddlei]*depthRef;
|
||||
const scalar m1 = 2*(cosh(2*kh) - 1.0)/(sinh(2*kh) + 2*kh);
|
||||
const scalar boardStroke = waveHeight_/m1;
|
||||
|
||||
motionX[pointi] = 0.5*boardStroke*sin(phaseTot - sigma*t);
|
||||
|
||||
if (secondOrder_)
|
||||
{
|
||||
motionX[pointi] +=
|
||||
+ sqr(waveHeight_)
|
||||
/ (32*depthRef)*(3*cosh(kh)/pow3(sinh(kh)) - 2.0/m1)
|
||||
* sin(phaseTot - 2*sigma*t);
|
||||
}
|
||||
}
|
||||
|
||||
Field<vector>::operator=(n_*timeCoeff(t)*motionX);
|
||||
Field<vector>::operator=(timeCoeff(t)*n_*motionX);
|
||||
|
||||
break;
|
||||
}
|
||||
case motionTypes::solitary:
|
||||
{
|
||||
const scalar kappa = sqrt(0.75*waveHeight_/(pow3(initialDepth_)));
|
||||
const scalar waveCelerity =
|
||||
sqrt(mag(g())*(initialDepth_ + waveHeight_));
|
||||
const scalar stroke = sqrt(16.0*waveHeight_*initialDepth_/3.0);
|
||||
const scalar hr = waveHeight_/initialDepth_;
|
||||
wavePeriod_ = (2.0/(kappa*waveCelerity))*(3.8 + hr);
|
||||
const scalar tSolitary = -0.5*wavePeriod_ + t;
|
||||
const pointField& points = patch().localPoints();
|
||||
scalarField motionX(patch().localPoints().size(), -1);
|
||||
const scalar magG = mag(g());
|
||||
|
||||
// Newton-Rapshon
|
||||
scalar theta1 = 0;
|
||||
scalar theta2 = 0;
|
||||
scalar er = 10000;
|
||||
const scalar error = 0.001;
|
||||
while (er > error)
|
||||
forAll(points, pointi)
|
||||
{
|
||||
theta2 =
|
||||
theta1
|
||||
- (theta1 - kappa*waveCelerity*tSolitary + hr*tanh(theta1))
|
||||
/(1.0 + hr*(1.0/cosh(theta1))*(1.0/cosh(theta1)));
|
||||
const label paddlei = pointToPaddle_[pointi];
|
||||
const scalar depthRef = waterDepthRef_[paddlei];
|
||||
|
||||
const scalar kappa = sqrt(0.75*waveHeight_/pow3(depthRef));
|
||||
const scalar celerity = sqrt(magG*(depthRef + waveHeight_));
|
||||
const scalar stroke = sqrt(16*waveHeight_*depthRef/3.0);
|
||||
const scalar hr = waveHeight_/depthRef;
|
||||
wavePeriod_ = 2.0/(kappa*celerity)*(3.8 + hr);
|
||||
const scalar tSolitary = -0.5*wavePeriod_ + t;
|
||||
|
||||
// Newton-Raphson
|
||||
scalar theta1 = 0;
|
||||
scalar theta2 = 0;
|
||||
scalar er = 10000;
|
||||
const scalar error = 0.001;
|
||||
while (er > error)
|
||||
{
|
||||
theta2 =
|
||||
theta1
|
||||
- (theta1 - kappa*celerity*tSolitary + hr*tanh(theta1))
|
||||
/(1.0 + hr*(1.0/cosh(theta1))*(1.0/cosh(theta1)));
|
||||
|
||||
er = mag(theta1 - theta2);
|
||||
theta1 = theta2;
|
||||
}
|
||||
}
|
||||
|
||||
scalar motionX =
|
||||
waveHeight_/(kappa*initialDepth_)*tanh(theta1) + 0.5*stroke;
|
||||
motionX[pointi] =
|
||||
waveHeight_/(kappa*depthRef)*tanh(theta1) + 0.5*stroke;
|
||||
}
|
||||
|
||||
Field<vector>::operator=(n_*motionX);
|
||||
|
||||
@ -304,7 +441,6 @@ void Foam::waveMakerPointPatchVectorField::updateCoeffs()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fixedValuePointPatchField<vector>::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -318,9 +454,11 @@ void Foam::waveMakerPointPatchVectorField::write(Ostream& os) const
|
||||
os.writeEntry("wavePeriod", wavePeriod_);
|
||||
os.writeEntry("waveHeight", waveHeight_);
|
||||
os.writeEntry("wavePhase", wavePhase_);
|
||||
os.writeEntry("waveAngle", waveAngle_);
|
||||
os.writeEntry("startTime", startTime_);
|
||||
os.writeEntry("rampTime", rampTime_);
|
||||
os.writeEntry("secondOrder", secondOrder_);
|
||||
os.writeEntry("nPaddle", nPaddle_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2019 IH-Cantabria
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -136,6 +136,9 @@ class waveMakerPointPatchVectorField
|
||||
//- Wave phase
|
||||
scalar wavePhase_;
|
||||
|
||||
//- Wave angle
|
||||
scalar waveAngle_;
|
||||
|
||||
//- Wave length
|
||||
scalar waveLength_;
|
||||
|
||||
@ -148,6 +151,54 @@ class waveMakerPointPatchVectorField
|
||||
//- On/off second order calculation switch
|
||||
scalar secondOrder_;
|
||||
|
||||
//- Number of wave paddles
|
||||
label nPaddle_;
|
||||
|
||||
//- Rotation tensor from global to local system
|
||||
tensor Rgl_;
|
||||
|
||||
//- Rotation tensor from local to global system
|
||||
tensor Rlg_;
|
||||
|
||||
//- Paddle x co-ordinates / [m]
|
||||
scalarField xPaddle_;
|
||||
|
||||
//- Paddle y co-ordinates / [m]
|
||||
scalarField yPaddle_;
|
||||
|
||||
//- Addressing from point patch index to paddle index
|
||||
labelList pointToPaddle_;
|
||||
|
||||
//- Addressing from patch face index to paddle index
|
||||
labelList faceToPaddle_;
|
||||
|
||||
//- Patch face centre x co-ordinates / [m]
|
||||
scalarField x_;
|
||||
|
||||
//- Patch face centre y co-ordinates / [m]
|
||||
scalarField y_;
|
||||
|
||||
//- Patch face centre z co-ordinates / [m]
|
||||
scalarField z_;
|
||||
|
||||
//- Overall (point) span in z-direction / [m]
|
||||
scalar zSpan_;
|
||||
|
||||
//- Minimum z (point) height per patch face / [m]
|
||||
scalarField zMin_;
|
||||
|
||||
//- Global Minimum z (point) / [m]
|
||||
scalar zMinGb_;
|
||||
|
||||
//- Maximum z (point) height per patch face / [m]
|
||||
scalarField zMax_;
|
||||
|
||||
//- Calculated water depth at the patch
|
||||
scalarField waterDepthRef_;
|
||||
|
||||
//
|
||||
scalar firstTime = 0;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
@ -160,6 +211,9 @@ class waveMakerPointPatchVectorField
|
||||
//- Return the time scaling coefficient
|
||||
virtual scalar timeCoeff(const scalar t) const;
|
||||
|
||||
//- Initialise
|
||||
virtual void initialiseGeometry();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
bottom1
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
back
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
front
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type waveVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
top
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alpha.water;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
bottom1
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
front
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
back
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
bottom1
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
front
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
back
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
top
|
||||
{
|
||||
type totalPressure;
|
||||
U U;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi none;
|
||||
gamma 1;
|
||||
p0 uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,69 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class pointVectorField;
|
||||
object pointDisplacement;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
bottom1
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type waveMaker;
|
||||
value uniform (0 0 0);
|
||||
|
||||
motionType flap;
|
||||
x0 (0 0 0);
|
||||
n (1 0 0);
|
||||
waveHeight 0.06;
|
||||
initialDepth 0.25;
|
||||
wavePeriod 2.0;
|
||||
rampTime 2.0;
|
||||
wavePhase 0;
|
||||
|
||||
nPaddle 4;
|
||||
waveAngle 45;
|
||||
}
|
||||
back
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
front
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
|
||||
cleanCase0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
15
tutorials/multiphase/interFoam/laminar/waves/waveMakerMultiPaddleFlap/Allrun
Executable file
15
tutorials/multiphase/interFoam/laminar/waves/waveMakerMultiPaddleFlap/Allrun
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel setFields
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object dynamicMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
|
||||
solver displacementLaplacian;
|
||||
|
||||
displacementLaplacianCoeffs
|
||||
{
|
||||
diffusivity inverseDistance (leftwall);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value ( 0 0 -9.81 );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (water air);
|
||||
|
||||
water
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 1e-06;
|
||||
rho 1000;
|
||||
}
|
||||
|
||||
air
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 1.48e-05;
|
||||
rho 1;
|
||||
}
|
||||
|
||||
sigma 0.07;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,20 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,28 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object wavesProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
rightwall
|
||||
{
|
||||
alpha alpha.water;
|
||||
|
||||
waveModel shallowWaterAbsorption;
|
||||
|
||||
nPaddle 4;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,111 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(2 0 0)
|
||||
(2 0 0.7)
|
||||
(0 0 0.7)
|
||||
(0 0.32 0)
|
||||
(2 0.32 0)
|
||||
(2 0.32 0.7)
|
||||
(0 0.32 0.7)
|
||||
(4 0 0)
|
||||
(4 0 0.7)
|
||||
(4 0.32 0.7)
|
||||
(4 0.32 0)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 5 4 3 2 6 7) (100 16 140) simpleGrading (1 1 1)
|
||||
hex (1 8 11 5 2 9 10 6) (100 16 140) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
bottom1
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 1 5 4)
|
||||
);
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(1 8 11 5)
|
||||
);
|
||||
}
|
||||
front
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 1 2 3)
|
||||
(1 8 9 2)
|
||||
);
|
||||
}
|
||||
back
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(4 5 6 7)
|
||||
(5 11 10 6)
|
||||
);
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(8 11 10 9)
|
||||
);
|
||||
}
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 2 6 7)
|
||||
(2 9 10 6)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,139 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application interFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 10;
|
||||
|
||||
deltaT 0.005;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.65;
|
||||
maxAlphaCo 0.65;
|
||||
maxDeltaT 0.05;
|
||||
|
||||
functions
|
||||
{
|
||||
line
|
||||
{
|
||||
type sets;
|
||||
libs (sampling);
|
||||
enabled true;
|
||||
writeControl writeTime;
|
||||
|
||||
interpolationScheme cellPoint;
|
||||
setFormat raw;
|
||||
|
||||
sets
|
||||
(
|
||||
s1
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 0.5 0.005 0.0 );
|
||||
end ( 0.5 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s2
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 1.0 0.005 0.0 );
|
||||
end ( 1.0 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s3
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 1.5 0.005 0.0 );
|
||||
end ( 1.5 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s4
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 2.0 0.005 0.0 );
|
||||
end ( 2.0 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s5
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 2.5 0.005 0.0 );
|
||||
end ( 2.5 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s6
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 3.0 0.005 0.0 );
|
||||
end ( 3.0 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s7
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 4.0 0.005 0.0 );
|
||||
end ( 4.0 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
);
|
||||
|
||||
fixedLocations false;
|
||||
|
||||
fields (alpha.water);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* /
|
||||
@ -0,0 +1,27 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 2;
|
||||
|
||||
method simple;
|
||||
|
||||
coeffs
|
||||
{
|
||||
n (2 1 1);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,64 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss interfaceCompression;
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(phi,nuTilda) Gauss upwind;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p_rgh;
|
||||
pcorr;
|
||||
alpha;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,80 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"(cellDisplacement|cellDisplacementFinal)"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration false;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
"alpha.water.*"
|
||||
{
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
cAlpha 1;
|
||||
}
|
||||
|
||||
"(pcorr|pcorrFinal)"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
smoother DICGaussSeidel;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
$pcorr;
|
||||
tolerance 1e-07;
|
||||
relTol 0.05;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
tolerance 1e-07;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 3;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box ( -100 -100 -1 ) ( 100.0 100.0 0.25 );
|
||||
fieldValues ( volScalarFieldValue alpha.water 1 );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,59 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
bottom1
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
back
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
front
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type waveVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
top
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alpha.water;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
bottom1
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
front
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
back
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
bottom1
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
front
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
back
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
top
|
||||
{
|
||||
type totalPressure;
|
||||
U U;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi none;
|
||||
gamma 1;
|
||||
p0 uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,69 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class pointVectorField;
|
||||
object pointDisplacement;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
bottom1
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type waveMaker;
|
||||
value uniform (0 0 0);
|
||||
|
||||
motionType piston;
|
||||
x0 (0 0 0);
|
||||
n (1 0 0);
|
||||
waveHeight 0.06;
|
||||
initialDepth 0.25;
|
||||
wavePeriod 2.0;
|
||||
rampTime 2.0;
|
||||
wavePhase 0;
|
||||
|
||||
nPaddle 4;
|
||||
waveAngle 45;
|
||||
}
|
||||
back
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
front
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
|
||||
cleanCase0
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel setFields
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object dynamicMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
|
||||
solver displacementLaplacian;
|
||||
|
||||
displacementLaplacianCoeffs
|
||||
{
|
||||
diffusivity inverseDistance (leftwall);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value ( 0 0 -9.81 );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,37 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (water air);
|
||||
|
||||
water
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 1e-06;
|
||||
rho 1000;
|
||||
}
|
||||
|
||||
air
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu 1.48e-05;
|
||||
rho 1;
|
||||
}
|
||||
|
||||
sigma 0.07;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,20 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,28 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object wavesProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
rightwall
|
||||
{
|
||||
alpha alpha.water;
|
||||
|
||||
waveModel shallowWaterAbsorption;
|
||||
|
||||
nPaddle 4;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,111 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(2 0 0)
|
||||
(2 0 0.7)
|
||||
(0 0 0.7)
|
||||
(0 0.32 0)
|
||||
(2 0.32 0)
|
||||
(2 0.32 0.7)
|
||||
(0 0.32 0.7)
|
||||
(4 0 0)
|
||||
(4 0 0.7)
|
||||
(4 0.32 0.7)
|
||||
(4 0.32 0)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 5 4 3 2 6 7) (100 16 140) simpleGrading (1 1 1)
|
||||
hex (1 8 11 5 2 9 10 6) (100 16 140) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
bottom1
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 1 5 4)
|
||||
);
|
||||
}
|
||||
bottom2
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(1 8 11 5)
|
||||
);
|
||||
}
|
||||
front
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 1 2 3)
|
||||
(1 8 9 2)
|
||||
);
|
||||
}
|
||||
back
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(4 5 6 7)
|
||||
(5 11 10 6)
|
||||
);
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(8 11 10 9)
|
||||
);
|
||||
}
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 2 6 7)
|
||||
(2 9 10 6)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,139 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application interFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 10;
|
||||
|
||||
deltaT 0.005;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.65;
|
||||
maxAlphaCo 0.65;
|
||||
maxDeltaT 0.05;
|
||||
|
||||
functions
|
||||
{
|
||||
line
|
||||
{
|
||||
type sets;
|
||||
libs (sampling);
|
||||
enabled true;
|
||||
writeControl writeTime;
|
||||
|
||||
interpolationScheme cellPoint;
|
||||
setFormat raw;
|
||||
|
||||
sets
|
||||
(
|
||||
s1
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 0.5 0.005 0.0 );
|
||||
end ( 0.5 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s2
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 1.0 0.005 0.0 );
|
||||
end ( 1.0 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s3
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 1.5 0.005 0.0 );
|
||||
end ( 1.5 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s4
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 2.0 0.005 0.0 );
|
||||
end ( 2.0 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s5
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 2.5 0.005 0.0 );
|
||||
end ( 2.5 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s6
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 3.0 0.005 0.0 );
|
||||
end ( 3.0 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
|
||||
s7
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 4.0 0.005 0.0 );
|
||||
end ( 4.0 0.005 0.7 );
|
||||
nPoints 1001;
|
||||
}
|
||||
);
|
||||
|
||||
fixedLocations false;
|
||||
|
||||
fields (alpha.water);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* /
|
||||
@ -0,0 +1,27 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 2;
|
||||
|
||||
method simple;
|
||||
|
||||
coeffs
|
||||
{
|
||||
n (2 1 1);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,64 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss interfaceCompression;
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(phi,nuTilda) Gauss upwind;
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p_rgh;
|
||||
pcorr;
|
||||
alpha;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,80 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"(cellDisplacement|cellDisplacementFinal)"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration false;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
"alpha.water.*"
|
||||
{
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
cAlpha 1;
|
||||
}
|
||||
|
||||
"(pcorr|pcorrFinal)"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
smoother DICGaussSeidel;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
$pcorr;
|
||||
tolerance 1e-07;
|
||||
relTol 0.05;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
tolerance 1e-07;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 3;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1906 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box ( -100 -100 -1 ) ( 100.0 100.0 0.25 );
|
||||
fieldValues ( volScalarFieldValue alpha.water 1 );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user