ENH: Refactored waveMaker BC to support piston and flap motions
This commit is contained in:
parent
6e1e854cbc
commit
cab7820fb3
@ -20,6 +20,7 @@ waveAbsorptionModels/derived/shallowWaterAbsorption/shallowWaterAbsorption.C
|
||||
|
||||
derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C
|
||||
derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C
|
||||
derivedPointPatchFields/waveMaker/waveMakerPointPatchVectorField.C
|
||||
|
||||
fvOptions/multiphaseMangrovesSource/multiphaseMangrovesSource.C
|
||||
fvOptions/multiphaseMangrovesTurbulenceModel/multiphaseMangrovesTurbulenceModel.C
|
||||
|
@ -1,250 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "waveMakerFlapPointPatchVectorField.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "pointPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "Time.H"
|
||||
#include "polyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::waveMakerFlapPointPatchVectorField::
|
||||
waveMakerFlapPointPatchVectorField
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<vector, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(p, iF),
|
||||
initialDepth_(0.0),
|
||||
wavePeriod_(0.0),
|
||||
waveHeigth_(0.0),
|
||||
waveLength_(0.0),
|
||||
wavePhase_(0.0),
|
||||
waveNumber_(0.0),
|
||||
rampTime_(0.0),
|
||||
g_(Zero),
|
||||
secondOrder_(false)
|
||||
{}
|
||||
|
||||
|
||||
Foam::waveMakerFlapPointPatchVectorField::
|
||||
waveMakerFlapPointPatchVectorField
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<vector, pointMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(p, iF, dict),
|
||||
initialDepth_(readScalar(dict.lookup("initialDepth"))),
|
||||
wavePeriod_(readScalar(dict.lookup("wavePeriod"))),
|
||||
waveHeigth_(readScalar(dict.lookup("waveHeigth"))),
|
||||
waveLength_(readScalar(dict.lookup("waveLength"))),
|
||||
wavePhase_(readScalar(dict.lookup("wavePhase"))),
|
||||
waveNumber_(readScalar(dict.lookup("waveNumber"))),
|
||||
rampTime_(readScalar(dict.lookup("rampTime"))),
|
||||
g_(dict.lookup("g")),
|
||||
secondOrder_(dict.lookupOrDefault<bool>("secondOrder",false))
|
||||
{
|
||||
if (!dict.found("value"))
|
||||
{
|
||||
updateCoeffs();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::waveMakerFlapPointPatchVectorField::
|
||||
waveMakerFlapPointPatchVectorField
|
||||
(
|
||||
const waveMakerFlapPointPatchVectorField& ptf,
|
||||
const pointPatch& p,
|
||||
const DimensionedField<vector, pointMesh>& iF,
|
||||
const pointPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(ptf, p, iF, mapper),
|
||||
initialDepth_(ptf.initialDepth_),
|
||||
wavePeriod_(ptf.wavePeriod_),
|
||||
waveHeigth_(ptf.waveHeigth_),
|
||||
waveLength_(ptf.waveLength_),
|
||||
wavePhase_(ptf.wavePhase_),
|
||||
waveNumber_(ptf.waveNumber_),
|
||||
rampTime_(ptf.rampTime_),
|
||||
g_(ptf.g_),
|
||||
secondOrder_(ptf.secondOrder_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::waveMakerFlapPointPatchVectorField::
|
||||
waveMakerFlapPointPatchVectorField
|
||||
(
|
||||
const waveMakerFlapPointPatchVectorField& ptf,
|
||||
const DimensionedField<vector, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(ptf, iF),
|
||||
initialDepth_(ptf.initialDepth_),
|
||||
wavePeriod_(ptf.wavePeriod_),
|
||||
waveHeigth_(ptf.waveHeigth_),
|
||||
waveLength_(ptf.waveLength_),
|
||||
wavePhase_(ptf.wavePhase_),
|
||||
waveNumber_(ptf.waveNumber_),
|
||||
rampTime_(ptf.rampTime_),
|
||||
g_(ptf.g_),
|
||||
secondOrder_(ptf.secondOrder_)
|
||||
{}
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::waveMakerFlapPointPatchVectorField::waveLength
|
||||
(
|
||||
const scalar h,
|
||||
const scalar T
|
||||
)
|
||||
{
|
||||
const scalar L0 = mag(g_)*T*T/(constant::mathematical::twoPi);
|
||||
scalar L = L0;
|
||||
|
||||
for(int i=1; i<=100; i++)
|
||||
{
|
||||
L = L0*tanh(constant::mathematical::twoPi*h/L);
|
||||
}
|
||||
return L;
|
||||
}
|
||||
|
||||
Foam::scalar Foam::waveMakerFlapPointPatchVectorField::timeCoeff
|
||||
(
|
||||
const scalar t
|
||||
) const
|
||||
{
|
||||
return max(0, min(t/rampTime_, 1));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::waveMakerFlapPointPatchVectorField::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const polyMesh& mesh = this->internalField().mesh()();
|
||||
const Time& t = mesh.time();
|
||||
|
||||
// Time ramp weight
|
||||
const scalar tCoeff = timeCoeff(t.value());
|
||||
|
||||
vectorField localPoints_ = this->patch().localPoints();
|
||||
vectorField waveBoardMotion_ = 0.0*localPoints_;
|
||||
|
||||
waveLength_ = waveLength (initialDepth_, wavePeriod_);
|
||||
|
||||
const scalar waveK = constant::mathematical::twoPi/waveLength_;
|
||||
const scalar sigma_ = (2.0*constant::mathematical::pi) / wavePeriod_;
|
||||
|
||||
//First order
|
||||
if (secondOrder_== false)
|
||||
{
|
||||
forAll (localPoints_, labelP)
|
||||
{
|
||||
scalar waveBoardStroke_ = (sinh(2.0*waveK*initialDepth_)
|
||||
+ 2.0*waveK*initialDepth_)
|
||||
/ (4.0*sinh(waveK*initialDepth_))
|
||||
* (1.0 / ( sinh(waveK*initialDepth_)
|
||||
+ (1.0-cosh(waveK*initialDepth_))
|
||||
/ (waveK*initialDepth_) ) ) * waveHeigth_;
|
||||
|
||||
waveBoardMotion_[labelP].component(0) = tCoeff
|
||||
* (1.0+(localPoints_[labelP].component(2)-initialDepth_)
|
||||
/ (initialDepth_))*(waveBoardStroke_/2.0)*sin(sigma_*t.value());
|
||||
}
|
||||
|
||||
Field<vector>::operator=
|
||||
(
|
||||
waveBoardMotion_
|
||||
);
|
||||
}
|
||||
else if ( secondOrder_ == true)
|
||||
{
|
||||
scalar m1_;
|
||||
forAll (localPoints_, labelP)
|
||||
{
|
||||
m1_ = ((4.0*sinh(waveK*initialDepth_))
|
||||
/ (sinh(2.0*waveK*initialDepth_)+2.0*waveK*initialDepth_))
|
||||
* ( sinh(waveK*initialDepth_) + 1.0/(waveK*initialDepth_)
|
||||
* (1.0-cosh(waveK*initialDepth_)));
|
||||
|
||||
waveBoardMotion_[labelP].component(0) = waveHeigth_/(2.0*m1_)*sin(sigma_*t.value())
|
||||
+ pow(waveHeigth_,2)/(16.0*initialDepth_)*(3.0*cosh(waveK*initialDepth_)
|
||||
/ pow(sinh(waveK*initialDepth_),3) -2.0/m1_)*sin(2.0*sigma_*t.value());
|
||||
|
||||
waveBoardMotion_[labelP].component(0) = tCoeff
|
||||
* (1.0+(localPoints_[labelP].component(2)-initialDepth_)
|
||||
/ (initialDepth_)) * waveBoardMotion_[labelP].component(0);
|
||||
}
|
||||
|
||||
Field<vector>::operator=
|
||||
(
|
||||
waveBoardMotion_
|
||||
);
|
||||
}
|
||||
|
||||
fixedValuePointPatchField<vector>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::waveMakerFlapPointPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
pointPatchField<vector>::write(os);
|
||||
os.writeEntry("initialDepth", initialDepth_);
|
||||
os.writeEntry("wavePeriod", wavePeriod_);
|
||||
os.writeEntry("waveHeigth", waveHeigth_);
|
||||
os.writeEntry("waveLength", waveLength_);
|
||||
os.writeEntry("wavePhase", wavePhase_);
|
||||
os.writeEntry("waveNumber", waveNumber_);
|
||||
os.writeEntry("rampTime", rampTime_);
|
||||
os.writeEntry("g", g_);
|
||||
os.writeEntry("secondOrder", secondOrder_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePointPatchTypeField
|
||||
(
|
||||
pointPatchVectorField,
|
||||
waveMakerFlapPointPatchVectorField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,238 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "waveMakerPistonPointPatchVectorField.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "pointPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "Time.H"
|
||||
#include "polyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::waveMakerPistonPointPatchVectorField::
|
||||
waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<vector, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(p, iF),
|
||||
initialDepth_(0.0),
|
||||
wavePeriod_(0.0),
|
||||
waveHeigth_(0.0),
|
||||
waveLength_(0.0),
|
||||
wavePhase_(0.0),
|
||||
waveNumber_(0.0),
|
||||
rampTime_(0.0),
|
||||
g_(Zero),
|
||||
secondOrder_(false)
|
||||
{}
|
||||
|
||||
|
||||
Foam::waveMakerPistonPointPatchVectorField::
|
||||
waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<vector, pointMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(p, iF, dict),
|
||||
initialDepth_(readScalar(dict.lookup("initialDepth"))),
|
||||
wavePeriod_(readScalar(dict.lookup("wavePeriod"))),
|
||||
waveHeigth_(readScalar(dict.lookup("waveHeigth"))),
|
||||
waveLength_(readScalar(dict.lookup("waveLength"))),
|
||||
wavePhase_(readScalar(dict.lookup("wavePhase"))),
|
||||
waveNumber_(readScalar(dict.lookup("waveNumber"))),
|
||||
rampTime_(readScalar(dict.lookup("rampTime"))),
|
||||
g_(dict.lookup("g")),
|
||||
secondOrder_(dict.lookupOrDefault<bool>("secondOrder",false))
|
||||
{
|
||||
if (!dict.found("value"))
|
||||
{
|
||||
updateCoeffs();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::waveMakerPistonPointPatchVectorField::
|
||||
waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
const waveMakerPistonPointPatchVectorField& ptf,
|
||||
const pointPatch& p,
|
||||
const DimensionedField<vector, pointMesh>& iF,
|
||||
const pointPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(ptf, p, iF, mapper),
|
||||
initialDepth_(ptf.initialDepth_),
|
||||
wavePeriod_(ptf.wavePeriod_),
|
||||
waveHeigth_(ptf.waveHeigth_),
|
||||
waveLength_(ptf.waveLength_),
|
||||
wavePhase_(ptf.wavePhase_),
|
||||
waveNumber_(ptf.waveNumber_),
|
||||
rampTime_(ptf.rampTime_),
|
||||
g_(ptf.g_),
|
||||
secondOrder_(ptf.secondOrder_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::waveMakerPistonPointPatchVectorField::
|
||||
waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
const waveMakerPistonPointPatchVectorField& ptf,
|
||||
const DimensionedField<vector, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(ptf, iF),
|
||||
initialDepth_(ptf.initialDepth_),
|
||||
wavePeriod_(ptf.wavePeriod_),
|
||||
waveHeigth_(ptf.waveHeigth_),
|
||||
waveLength_(ptf.waveLength_),
|
||||
wavePhase_(ptf.wavePhase_),
|
||||
waveNumber_(ptf.waveNumber_),
|
||||
rampTime_(ptf.rampTime_),
|
||||
g_(ptf.g_),
|
||||
secondOrder_(ptf.secondOrder_)
|
||||
{}
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::waveMakerPistonPointPatchVectorField::waveLength
|
||||
(
|
||||
const scalar h,
|
||||
const scalar T
|
||||
)
|
||||
{
|
||||
const scalar L0 = mag(g_)*T*T/(constant::mathematical::twoPi);
|
||||
scalar L = L0;
|
||||
|
||||
for(int i=1; i<=100; i++)
|
||||
{
|
||||
L = L0*tanh(constant::mathematical::twoPi*h/L);
|
||||
}
|
||||
return L;
|
||||
}
|
||||
|
||||
Foam::scalar Foam::waveMakerPistonPointPatchVectorField::timeCoeff
|
||||
(
|
||||
const scalar t
|
||||
) const
|
||||
{
|
||||
return max(0, min(t/rampTime_, 1));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::waveMakerPistonPointPatchVectorField::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const polyMesh& mesh = this->internalField().mesh()();
|
||||
const Time& t = mesh.time();
|
||||
|
||||
// Time ramp weight
|
||||
const scalar tCoeff = timeCoeff(t.value());
|
||||
|
||||
vectorField localPoints_ = this->patch().localPoints();
|
||||
vectorField auxPoints = 0.0*localPoints_;
|
||||
|
||||
waveLength_ = waveLength (initialDepth_, wavePeriod_);
|
||||
|
||||
const scalar waveK = constant::mathematical::twoPi/waveLength_;
|
||||
|
||||
vector waveBoardMotion_(0,0,0);
|
||||
const scalar sigma_ = (2.0*constant::mathematical::pi) / wavePeriod_;
|
||||
|
||||
//first order
|
||||
if ( secondOrder_ == false)
|
||||
{
|
||||
scalar waveBoardStroke_ = (sinh(2.0*waveK*initialDepth_)
|
||||
+ 2.0*waveK*initialDepth_)
|
||||
/ (2.0*(cosh(2.0*waveK*initialDepth_)
|
||||
- 1.0)) * waveHeigth_;
|
||||
waveBoardMotion_.component(0)= tCoeff*(waveBoardStroke_/2.0)
|
||||
* sin(sigma_*t.value());
|
||||
|
||||
Field<vector>::operator=
|
||||
(
|
||||
waveBoardMotion_
|
||||
);
|
||||
}
|
||||
//second order
|
||||
else if ( secondOrder_ == true)
|
||||
{
|
||||
scalar m1_ = (2.0*(cosh(2.0*waveK*initialDepth_)-1.0))
|
||||
/ (sinh(2.0*waveK*initialDepth_)
|
||||
+ 2.0*waveK*initialDepth_);
|
||||
waveBoardMotion_.component(0) = tCoeff * (waveHeigth_/(2.0*m1_)
|
||||
* sin(sigma_*t.value()) + pow(waveHeigth_,2)
|
||||
/ (32.0*initialDepth_)*(3.0*cosh(waveK*initialDepth_)
|
||||
/ pow(sinh(waveK*initialDepth_),3)-2.0/m1_)
|
||||
* sin(2.0*sigma_*t.value()));
|
||||
|
||||
Field<vector>::operator=
|
||||
(
|
||||
waveBoardMotion_
|
||||
);
|
||||
}
|
||||
|
||||
fixedValuePointPatchField<vector>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::waveMakerPistonPointPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
pointPatchField<vector>::write(os);
|
||||
os.writeEntry("initialDepth", initialDepth_);
|
||||
os.writeEntry("wavePeriod", wavePeriod_);
|
||||
os.writeEntry("waveHeigth", waveHeigth_);
|
||||
os.writeEntry("waveLength", waveLength_);
|
||||
os.writeEntry("wavePhase", wavePhase_);
|
||||
os.writeEntry("waveNumber", waveNumber_);
|
||||
os.writeEntry("rampTime", rampTime_);
|
||||
os.writeEntry("g", g_);
|
||||
os.writeEntry("secondOrder", secondOrder_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePointPatchTypeField
|
||||
(
|
||||
pointPatchVectorField,
|
||||
waveMakerPistonPointPatchVectorField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,179 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::waveMakerPistonPointPatchVectorField
|
||||
|
||||
Description
|
||||
Foam::waveMakerPistonPointPatchVectorField
|
||||
|
||||
SourceFiles
|
||||
waveMakerPistonPointPatchVectorField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef waveMakerPistonPointPatchVectorField_H
|
||||
#define waveMakerPistonPointPatchVectorField_H
|
||||
|
||||
#include "fixedValuePointPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class waveMakerPistonPointPatchVectorField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class waveMakerPistonPointPatchVectorField
|
||||
:
|
||||
public fixedValuePointPatchField<vector>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//inital water depth
|
||||
scalar initialDepth_;
|
||||
|
||||
//wave period
|
||||
scalar wavePeriod_;
|
||||
|
||||
//wave heigth
|
||||
scalar waveHeigth_;
|
||||
|
||||
//wavelength
|
||||
scalar waveLength_;
|
||||
|
||||
//wave phase
|
||||
scalar wavePhase_;
|
||||
|
||||
//wave number
|
||||
scalar waveNumber_;
|
||||
|
||||
//ramp time
|
||||
scalar rampTime_;
|
||||
|
||||
// gravity vector
|
||||
vector g_;
|
||||
|
||||
//on/off second order generation
|
||||
scalar secondOrder_;
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
// Dispersion equation
|
||||
virtual scalar waveLength(const scalar h, const scalar T);
|
||||
|
||||
//- Return the time scaling coefficient
|
||||
virtual scalar timeCoeff(const scalar t) const;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("waveMakerPiston");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
const pointPatch&,
|
||||
const DimensionedField<vector, pointMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
const pointPatch&,
|
||||
const DimensionedField<vector, pointMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given patchField<vector> onto a new patch
|
||||
waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
const waveMakerPistonPointPatchVectorField&,
|
||||
const pointPatch&,
|
||||
const DimensionedField<vector, pointMesh>&,
|
||||
const pointPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<pointPatchField<vector>> clone() const
|
||||
{
|
||||
return autoPtr<pointPatchField<vector>>
|
||||
(
|
||||
new waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
*this
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
const waveMakerPistonPointPatchVectorField&,
|
||||
const DimensionedField<vector, pointMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual autoPtr<pointPatchField<vector>> clone
|
||||
(
|
||||
const DimensionedField<vector, pointMesh>& iF
|
||||
) const
|
||||
{
|
||||
return autoPtr<pointPatchField<vector>>
|
||||
(
|
||||
new waveMakerPistonPointPatchVectorField
|
||||
(
|
||||
*this,
|
||||
iF
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,290 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2018 IH-Cantabria
|
||||
-------------------------------------------------------------------------------
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "waveMakerPointPatchVectorField.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "pointPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "Time.H"
|
||||
#include "gravityMeshObject.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::Enum<Foam::waveMakerPointPatchVectorField::motionTypes>
|
||||
Foam::waveMakerPointPatchVectorField::motionTypeNames
|
||||
({
|
||||
{ motionTypes::piston, "piston" },
|
||||
{ motionTypes::flap, "flap" }
|
||||
});
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
const Foam::vector& Foam::waveMakerPointPatchVectorField::g()
|
||||
{
|
||||
const meshObjects::gravity& gf = meshObjects::gravity::New(db().time());
|
||||
|
||||
if (mag(gf.value()) < SMALL)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Gravity vector is not set. Please update "
|
||||
<< gf.uniformDimensionedVectorField::path()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return gf.value();
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::waveMakerPointPatchVectorField::waveLength
|
||||
(
|
||||
const scalar h,
|
||||
const scalar T
|
||||
)
|
||||
{
|
||||
const scalar L0 = mag(g())*T*T/(constant::mathematical::twoPi);
|
||||
scalar L = L0;
|
||||
|
||||
for (label i=1; i<=100; ++i)
|
||||
{
|
||||
L = L0*tanh(constant::mathematical::twoPi*h/L);
|
||||
}
|
||||
|
||||
return L;
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::waveMakerPointPatchVectorField::timeCoeff
|
||||
(
|
||||
const scalar t
|
||||
) const
|
||||
{
|
||||
return max(0, min(t/rampTime_, 1));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<vector, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(p, iF),
|
||||
motionType_(motionTypes::piston),
|
||||
n_(Zero),
|
||||
gHat_(Zero),
|
||||
initialDepth_(0),
|
||||
wavePeriod_(0),
|
||||
waveHeight_(0),
|
||||
wavePhase_(0),
|
||||
waveLength_(0),
|
||||
rampTime_(0),
|
||||
secondOrder_(false)
|
||||
{}
|
||||
|
||||
|
||||
Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<vector, pointMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(p, iF, dict, false),
|
||||
motionType_(motionTypeNames.lookup("motionType", dict)),
|
||||
n_(dict.get<vector>("n")),
|
||||
gHat_(Zero),
|
||||
initialDepth_(dict.get<scalar>("initialDepth")),
|
||||
wavePeriod_(dict.get<scalar>("wavePeriod")),
|
||||
waveHeight_(dict.get<scalar>("waveHeight")),
|
||||
wavePhase_(dict.get<scalar>("wavePhase")),
|
||||
waveLength_(this->waveLength(initialDepth_, wavePeriod_)),
|
||||
rampTime_(dict.get<scalar>("rampTime")),
|
||||
secondOrder_(dict.lookupOrDefault<bool>("secondOrder", false))
|
||||
{
|
||||
// Create the co-ordinate system
|
||||
if (mag(n_) < SMALL)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Patch normal direction vector is not set. 'n' = " << n_
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
n_ /= mag(n_);
|
||||
|
||||
gHat_ = (g() - n_*(n_&g()));
|
||||
gHat_ /= mag(gHat_);
|
||||
|
||||
if (!dict.found("value"))
|
||||
{
|
||||
updateCoeffs();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
||||
(
|
||||
const waveMakerPointPatchVectorField& ptf,
|
||||
const pointPatch& p,
|
||||
const DimensionedField<vector, pointMesh>& iF,
|
||||
const pointPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(ptf, p, iF, mapper),
|
||||
motionType_(ptf.motionType_),
|
||||
n_(ptf.n_),
|
||||
gHat_(ptf.gHat_),
|
||||
initialDepth_(ptf.initialDepth_),
|
||||
wavePeriod_(ptf.wavePeriod_),
|
||||
waveHeight_(ptf.waveHeight_),
|
||||
wavePhase_(ptf.wavePhase_),
|
||||
waveLength_(ptf.waveLength_),
|
||||
rampTime_(ptf.rampTime_),
|
||||
secondOrder_(ptf.secondOrder_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
||||
(
|
||||
const waveMakerPointPatchVectorField& ptf,
|
||||
const DimensionedField<vector, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<vector>(ptf, iF),
|
||||
motionType_(ptf.motionType_),
|
||||
n_(ptf.n_),
|
||||
gHat_(ptf.gHat_),
|
||||
initialDepth_(ptf.initialDepth_),
|
||||
wavePeriod_(ptf.wavePeriod_),
|
||||
waveHeight_(ptf.waveHeight_),
|
||||
wavePhase_(ptf.wavePhase_),
|
||||
waveLength_(ptf.waveLength_),
|
||||
rampTime_(ptf.rampTime_),
|
||||
secondOrder_(ptf.secondOrder_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::waveMakerPointPatchVectorField::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const scalar t = db().time().value();
|
||||
|
||||
const scalar waveK = constant::mathematical::twoPi/waveLength_;
|
||||
const scalar sigma = constant::mathematical::twoPi/wavePeriod_;
|
||||
|
||||
const scalar kh = waveK*initialDepth_;
|
||||
|
||||
switch (motionType_)
|
||||
{
|
||||
case motionTypes::flap:
|
||||
{
|
||||
const scalar m1 =
|
||||
4*sinh(kh)/(sinh(2*kh) + 2*kh)*(sinh(kh) + (1 - cosh(kh))/kh);
|
||||
|
||||
scalar motionX = 0.5*waveHeight_/m1*sin(sigma*t);
|
||||
|
||||
if (secondOrder_)
|
||||
{
|
||||
motionX +=
|
||||
sqr(waveHeight_)/(16*initialDepth_)
|
||||
*(3*cosh(kh)/pow3(sinh(kh)) - 2/m1)
|
||||
*sin(2*sigma*t);
|
||||
}
|
||||
|
||||
const pointField& points = patch().localPoints();
|
||||
const scalarField dz(-(points & gHat_) - initialDepth_);
|
||||
|
||||
Field<vector>::operator=
|
||||
(
|
||||
n_*timeCoeff(t)*motionX*(1 + dz/initialDepth_)
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
case motionTypes::piston:
|
||||
{
|
||||
const scalar m1 = 2*(cosh(2*kh) - 1)/(sinh(2*kh) + 2*kh);
|
||||
|
||||
scalar motionX = 0.5*waveHeight_/m1*sin(sigma*t);
|
||||
|
||||
if (secondOrder_)
|
||||
{
|
||||
motionX +=
|
||||
sqr(waveHeight_)
|
||||
/(32*initialDepth_)*(3*cosh(kh)
|
||||
/pow3(sinh(kh)) - 2/m1);
|
||||
}
|
||||
|
||||
Field<vector>::operator=(n_*timeCoeff(t)*motionX);
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unhandled enumeration " << motionTypeNames[motionType_]
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fixedValuePointPatchField<vector>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::waveMakerPointPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
pointPatchField<vector>::write(os);
|
||||
os.writeEntry("motionType", motionTypeNames[motionType_]);
|
||||
os.writeEntry("n", n_);
|
||||
os.writeEntry("initialDepth", initialDepth_);
|
||||
os.writeEntry("wavePeriod", wavePeriod_);
|
||||
os.writeEntry("waveHeight", waveHeight_);
|
||||
os.writeEntry("wavePhase", wavePhase_);
|
||||
os.writeEntry("rampTime", rampTime_);
|
||||
os.writeEntry("secondOrder", secondOrder_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePointPatchTypeField
|
||||
(
|
||||
pointPatchVectorField,
|
||||
waveMakerPointPatchVectorField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -2,8 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2018 IH-Cantabria
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -22,20 +22,63 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::waveMakerFlapPointPatchVectorField
|
||||
Foam::waveMakerPointPatchVectorField
|
||||
|
||||
Description
|
||||
Foam::waveMakerFlapPointPatchVectorField
|
||||
Point motion boundary condition to generate waves based on either piston
|
||||
or flap motions.
|
||||
|
||||
Based on the reference
|
||||
\verbatim
|
||||
Hughes, S.A. (1993).
|
||||
Physical Models And Laboratory Techniques In Coastal Engineering.
|
||||
Advanced Series On Ocean Engineering, volume 7
|
||||
\endverbatim
|
||||
|
||||
Usage
|
||||
Example patch specification
|
||||
\verbatim
|
||||
leftwall
|
||||
{
|
||||
type waveMaker;
|
||||
motionType flap;
|
||||
n (1 0 0);
|
||||
initialDepth 0.25;
|
||||
wavePeriod 2.0;
|
||||
waveHeight 0.06;
|
||||
wavePhase 0;
|
||||
rampTime 2.0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
where
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
motionType | See motion types below | yes |
|
||||
x0 | Reference point on patch | yes |
|
||||
n | Direction of motion | yes |
|
||||
initialDepth | Initial depth | yes |
|
||||
wavePeriod | wave period | yes |
|
||||
waveHeight | Wave height | yes |
|
||||
wavePhase | wave phase | yes |
|
||||
rampTime | Time to reach maximum motion | yes |
|
||||
secondOrder | Second order calculation | no | no
|
||||
\endtable
|
||||
|
||||
Available motion types include:
|
||||
- piston
|
||||
- flap
|
||||
|
||||
SourceFiles
|
||||
waveMakerFlapPointPatchVectorField.C
|
||||
waveMakerPointPatchVectorField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef waveMakerFlapPointPatchVectorField_H
|
||||
#define waveMakerFlapPointPatchVectorField_H
|
||||
#ifndef waveMakerPointPatchVectorField_H
|
||||
#define waveMakerPointPatchVectorField_H
|
||||
|
||||
#include "fixedValuePointPatchField.H"
|
||||
#include "Enum.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -43,67 +86,89 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class waveMakerFlapPointPatchVectorField Declaration
|
||||
Class waveMakerPointPatchVectorField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class waveMakerFlapPointPatchVectorField
|
||||
class waveMakerPointPatchVectorField
|
||||
:
|
||||
public fixedValuePointPatchField<vector>
|
||||
{
|
||||
public:
|
||||
|
||||
enum motionTypes
|
||||
{
|
||||
piston,
|
||||
flap
|
||||
};
|
||||
|
||||
//- Names for motion types
|
||||
static const Enum<motionTypes> motionTypeNames;
|
||||
|
||||
|
||||
// Private data
|
||||
|
||||
//inital water depth
|
||||
//- Motion type
|
||||
motionTypes motionType_;
|
||||
|
||||
//- Patch normal direction
|
||||
// Note: cannot use patch normal of the initial patch unless it is
|
||||
// in its neutral position (flap mode)
|
||||
vector n_;
|
||||
|
||||
//- Vertical direction
|
||||
vector gHat_;
|
||||
|
||||
//- Inital water depth
|
||||
scalar initialDepth_;
|
||||
|
||||
//wave period
|
||||
//- Wave period
|
||||
scalar wavePeriod_;
|
||||
|
||||
//wave heigth
|
||||
scalar waveHeigth_;
|
||||
//- Wave height
|
||||
scalar waveHeight_;
|
||||
|
||||
//wavelength
|
||||
scalar waveLength_;
|
||||
|
||||
//wave phase
|
||||
//- Wave phase
|
||||
scalar wavePhase_;
|
||||
|
||||
//wave number
|
||||
scalar waveNumber_;
|
||||
//- Wave length
|
||||
scalar waveLength_;
|
||||
|
||||
//ramp time
|
||||
//- Ramp time
|
||||
scalar rampTime_;
|
||||
|
||||
// gravity vector
|
||||
vector g_;
|
||||
|
||||
//on/off second order generation
|
||||
//- On/off second order calculation switch
|
||||
scalar secondOrder_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
// Dispersion equation
|
||||
virtual scalar waveLength(const scalar h, const scalar T);
|
||||
//- Return the gravitational acceleration
|
||||
const vector& g();
|
||||
|
||||
//- Dispersion equation
|
||||
virtual scalar waveLength(const scalar h, const scalar T);
|
||||
|
||||
//- Return the time scaling coefficient
|
||||
virtual scalar timeCoeff(const scalar t) const;
|
||||
virtual scalar timeCoeff(const scalar t) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("waveMakerFlap");
|
||||
TypeName("waveMaker");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
waveMakerFlapPointPatchVectorField
|
||||
waveMakerPointPatchVectorField
|
||||
(
|
||||
const pointPatch&,
|
||||
const DimensionedField<vector, pointMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
waveMakerFlapPointPatchVectorField
|
||||
waveMakerPointPatchVectorField
|
||||
(
|
||||
const pointPatch&,
|
||||
const DimensionedField<vector, pointMesh>&,
|
||||
@ -111,9 +176,9 @@ public:
|
||||
);
|
||||
|
||||
//- Construct by mapping given patchField<vector> onto a new patch
|
||||
waveMakerFlapPointPatchVectorField
|
||||
waveMakerPointPatchVectorField
|
||||
(
|
||||
const waveMakerFlapPointPatchVectorField&,
|
||||
const waveMakerPointPatchVectorField&,
|
||||
const pointPatch&,
|
||||
const DimensionedField<vector, pointMesh>&,
|
||||
const pointPatchFieldMapper&
|
||||
@ -124,7 +189,7 @@ public:
|
||||
{
|
||||
return autoPtr<pointPatchField<vector>>
|
||||
(
|
||||
new waveMakerFlapPointPatchVectorField
|
||||
new waveMakerPointPatchVectorField
|
||||
(
|
||||
*this
|
||||
)
|
||||
@ -132,9 +197,9 @@ public:
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
waveMakerFlapPointPatchVectorField
|
||||
waveMakerPointPatchVectorField
|
||||
(
|
||||
const waveMakerFlapPointPatchVectorField&,
|
||||
const waveMakerPointPatchVectorField&,
|
||||
const DimensionedField<vector, pointMesh>&
|
||||
);
|
||||
|
||||
@ -146,7 +211,7 @@ public:
|
||||
{
|
||||
return autoPtr<pointPatchField<vector>>
|
||||
(
|
||||
new waveMakerFlapPointPatchVectorField
|
||||
new waveMakerPointPatchVectorField
|
||||
(
|
||||
*this,
|
||||
iF
|
@ -1,55 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5-dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ 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 empty;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,72 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ 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 waveMakerFlap;
|
||||
value uniform (0 0 0);
|
||||
|
||||
waveBoardStroke 0.0;
|
||||
waveHeigth 0.06;
|
||||
g (0 0 -9.81);
|
||||
initialDepth 0.25;
|
||||
wavePeriod 2.0;
|
||||
|
||||
rampTime 2.0;
|
||||
waveLength 0;
|
||||
wavePhase 0;
|
||||
|
||||
waveNumber 0.0;
|
||||
secondOrder false;
|
||||
|
||||
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5-dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -31,27 +31,21 @@ boundaryField
|
||||
}
|
||||
leftwall
|
||||
{
|
||||
type waveMakerPiston;
|
||||
type waveMaker;
|
||||
value uniform (0 0 0);
|
||||
|
||||
waveBoardStroke 0;
|
||||
waveHeigth 0.06;
|
||||
g (0 0 -9.81);
|
||||
waterDepthRef 0.25;
|
||||
initialDepth 0.25;
|
||||
|
||||
wavePeriod 2.0;
|
||||
|
||||
rampTime 2.0;
|
||||
waveLength 0;
|
||||
wavePhase 0;
|
||||
|
||||
waveNumber 0.0;
|
||||
secondOrder false;
|
||||
motionType flap;
|
||||
x0 (0 0 0);
|
||||
n (1 0 0);
|
||||
waveHeight 0.06;
|
||||
initialDepth 0.25;
|
||||
wavePeriod 2.0;
|
||||
rampTime 2.0;
|
||||
wavePhase 0;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
type empty;
|
||||
}
|
||||
front
|
||||
{
|
7
tutorials/multiphase/interFoam/laminar/waveMakerFlap/Allclean
Executable file
7
tutorials/multiphase/interFoam/laminar/waveMakerFlap/Allclean
Executable file
@ -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/waveMakerFlap/Allrun
Executable file
15
tutorials/multiphase/interFoam/laminar/waveMakerFlap/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)
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.0.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -14,16 +14,15 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
|
||||
solver displacementLaplacian;
|
||||
solver displacementLaplacian;
|
||||
|
||||
displacementLaplacianCoeffs
|
||||
{
|
||||
diffusivity inverseDistance (leftwall);
|
||||
diffusivity inverseDistance (leftwall);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.7.1 |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application interDyMFoam;
|
||||
application interFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
@ -23,7 +23,7 @@ startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 40;
|
||||
endTime 10;
|
||||
|
||||
deltaT 0.005;
|
||||
|
||||
|
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method simple;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n ( 4 1 1 );
|
||||
order xyz;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
@ -1,59 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ 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 empty;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
rightwall
|
||||
{
|
||||
type waveVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
top
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,65 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ 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 empty;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.0.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -14,16 +14,15 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
|
||||
solver displacementLaplacian;
|
||||
solver displacementLaplacian;
|
||||
|
||||
displacementLaplacianCoeffs
|
||||
{
|
||||
diffusivity inverseDistance (leftwall);
|
||||
diffusivity inverseDistance (leftwall);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.7.1 |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application interDyMFoam;
|
||||
application interFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
@ -23,7 +23,7 @@ startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 40;
|
||||
endTime 10;
|
||||
|
||||
deltaT 0.005;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -66,6 +66,7 @@ solvers
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
R
|
||||
{
|
||||
solver PBiCG;
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: v1806 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
Loading…
Reference in New Issue
Block a user