mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: New wave model integration updates for McCowan and Grimshaw models
This commit is contained in:
@ -2,8 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015 IH-Cantabria
|
||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2017 IH-Cantabria
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -52,12 +52,11 @@ Foam::scalar Foam::waveModels::Grimshaw::alfa
|
||||
) const
|
||||
{
|
||||
scalar eps = H/h;
|
||||
scalar alfa = sqrt(0.75*eps)*(1.0 - (5.0/8.0)*eps + (71.0/128.0)*eps*eps);
|
||||
|
||||
return alfa;
|
||||
return sqrt(0.75*eps)*(1.0 - 0.625*eps + (71.0/128.0)*eps*eps);
|
||||
}
|
||||
|
||||
//- Wave height
|
||||
|
||||
Foam::scalar Foam::waveModels::Grimshaw::eta
|
||||
(
|
||||
const scalar H,
|
||||
@ -69,22 +68,32 @@ Foam::scalar Foam::waveModels::Grimshaw::eta
|
||||
const scalar X0
|
||||
) const
|
||||
{
|
||||
scalar eps = H/h;
|
||||
scalar C = sqrt(mag(g_)*h)*sqrt(1.0+eps-(1.0/20.0)*eps*eps-(3.0/70.0)*eps*eps*eps);
|
||||
const scalar eps = H/h;
|
||||
const scalar eps2 = eps*eps;
|
||||
const scalar eps3 = eps*eps2;
|
||||
|
||||
scalar ts = 3.5*h/sqrt(H/h);
|
||||
scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||
const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
||||
|
||||
scalar alfa = this->alfa(H, h);
|
||||
const scalar ts = 3.5*h/sqrt(H/h);
|
||||
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||
const scalar alfa = this->alfa(H, h);
|
||||
|
||||
scalar s = (1.0)/(cosh(alfa*(xa/h)));
|
||||
scalar q = tanh(alfa*(xa/h));
|
||||
const scalar s = (1.0)/(cosh(alfa*(xa/h)));
|
||||
const scalar s2 = s*s;
|
||||
const scalar q = tanh(alfa*(xa/h));
|
||||
const scalar q2 = q*q;
|
||||
|
||||
return h*(eps*s*s - 0.75*eps*eps*s*s*q*q + eps*eps*eps*((5.0/8.0)*s*s*q*q - (101.0/80.0)*s*s*s*s*q*q));
|
||||
return
|
||||
h
|
||||
*(
|
||||
eps*s2
|
||||
- 0.75*eps2*s2*q2
|
||||
+ eps3*(0.625*s2*q2 - 1.2625*s2*s2*q2)
|
||||
);
|
||||
}
|
||||
|
||||
//- Wave velocity
|
||||
Foam::vector Foam::waveModels::Grimshaw::U
|
||||
|
||||
Foam::vector Foam::waveModels::Grimshaw::Uf
|
||||
(
|
||||
const scalar H,
|
||||
const scalar h,
|
||||
@ -96,34 +105,46 @@ Foam::vector Foam::waveModels::Grimshaw::U
|
||||
const scalar z
|
||||
) const
|
||||
{
|
||||
scalar eps = H/h;
|
||||
scalar C = sqrt(mag(g_)*h)*sqrt(1.0+eps-(1.0/20.0)*eps*eps-(3.0/70.0)*eps*eps*eps);
|
||||
scalar ts = 3.5*h/sqrt(H/h);
|
||||
scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||
scalar alfa = this->alfa(H, h);
|
||||
const scalar eps = H/h;
|
||||
const scalar eps2 = eps*eps;
|
||||
const scalar eps3 = eps*eps2;
|
||||
|
||||
scalar s = (1.0)/(cosh(alfa*(xa/h)));
|
||||
const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
||||
|
||||
scalar outa = eps*s*s - eps*eps*(-(1.0/4.0)*s*s + s*s*s*s + ((z/h)*(z/h))*((3.0/2.0)*s*s - (9.0/4.0)*s*s*s*s));
|
||||
scalar outb = (19.0/40.0)*s*s + (1.0/5.0)*s*s*s*s - (6.0/5.0)*s*s*s*s*s*s;
|
||||
scalar outc = ((z/h)*(z/h)) * ( -(3.0/2.0)*s*s - (15.0/4.0)*s*s*s*s + (15.0/2.0)*s*s*s*s*s*s);
|
||||
scalar outd = ((z/h)*(z/h)*(z/h)*(z/h)) * ((-3.0/8.0)*s*s + (45.0/16.0)*s*s*s*s - (45.0/16.0)*s*s*s*s*s*s);
|
||||
const scalar ts = 3.5*h/sqrt(eps);
|
||||
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||
const scalar alfa = this->alfa(H, h);
|
||||
|
||||
scalar u = sqrt(mag(g_)*h)*(outa - eps*eps*eps*(outb+outc+outd));
|
||||
const scalar s = (1.0)/(cosh(alfa*(xa/h)));
|
||||
const scalar s2 = s*s;
|
||||
const scalar s4 = s2*s2;
|
||||
const scalar s6 = s2*s4;
|
||||
|
||||
outa = eps*s*s - eps*eps*((3.0/8.0)*s*s + 2.0*s*s*s*s + ((z/h)*(z/h))*(0.5*s*s - (3.0/2.0)*s*s*s*s));
|
||||
outb = (49.0/640.0)*s*s - (17.0/20.0)*s*s*s*s - (18.0/5.0)*s*s*s*s*s*s;
|
||||
outc = ((z/h)*(z/h)) * ((-13.0/16.0)*s*s -(25.0/16.0)*s*s*s*s + (15.0/2.0)*s*s*s*s*s*s);
|
||||
outd = ((z/h)*(z/h)*(z/h)*(z/h)) * ((-3.0/40.0)*s*s -(9.0/8.0)*s*s*s*s - (27.0/16.0)*s*s*s*s*s*s);
|
||||
const scalar zbyh = z/h;
|
||||
const scalar zbyh2 = zbyh*zbyh;
|
||||
const scalar zbyh4 = zbyh2*zbyh2;
|
||||
|
||||
scalar w = sqrt(mag(g_)*h)*(outa - eps*eps*eps*(outb+outc+outd));
|
||||
scalar outa = eps*s2 - eps2*(-0.25*s2 + s4 + zbyh2*(1.5*s2 - 2.25*s4));
|
||||
scalar outb = 0.475*s2 + 0.2*s4 - 1.2*s6;
|
||||
scalar outc = zbyh2*(-1.5*s2 - 3.75*s4 + 7.5*s6);
|
||||
scalar outd = zbyh4*(-0.375*s2 + (45.0/16.0)*s4 - (45.0/16.0)*s6);
|
||||
|
||||
scalar v = u*sin(waveAngle_);
|
||||
scalar u = sqrt(mag(g_)*h)*(outa - eps3*(outb + outc + outd));
|
||||
|
||||
outa = eps*s2 - eps2*(0.375*s2 + 2*s4 + zbyh2*(0.5*s2 - 1.5*s4));
|
||||
outb = (49.0/640.0)*s2 - 0.85*s4 - 3.6*s6;
|
||||
outc = zbyh2*((-13.0/16.0)*s2 -(25.0/16.0)*s4 + 7.5*s6);
|
||||
outd = zbyh4*(-0.075*s2 -1.125*s4 - (27.0/16.0)*s6);
|
||||
|
||||
const scalar w = sqrt(mag(g_)*h)*(outa - eps3*(outb + outc + outd));
|
||||
|
||||
const scalar v = u*sin(waveAngle_);
|
||||
u *= cos(waveAngle_);
|
||||
|
||||
return vector(u, v, w);
|
||||
}
|
||||
|
||||
|
||||
void Foam::waveModels::Grimshaw::setLevel
|
||||
(
|
||||
const scalar t,
|
||||
@ -164,7 +185,7 @@ Foam::waveModels::Grimshaw::Grimshaw
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
read(dict);
|
||||
readDict(dict);
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,9 +198,9 @@ Foam::waveModels::Grimshaw::~Grimshaw()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::waveModels::Grimshaw::read(const dictionary& overrideDict)
|
||||
bool Foam::waveModels::Grimshaw::readDict(const dictionary& overrideDict)
|
||||
{
|
||||
if (solitaryWaveModel::read(overrideDict))
|
||||
if (solitaryWaveModel::readDict(overrideDict))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -187,12 +208,12 @@ bool Foam::waveModels::Grimshaw::read(const dictionary& overrideDict)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Foam::waveModels::Grimshaw::setVelocity
|
||||
(
|
||||
const scalar t,
|
||||
const scalar tCoeff,
|
||||
const scalarField& level,
|
||||
const scalar tg
|
||||
const scalarField& level
|
||||
)
|
||||
{
|
||||
forAll(U_, facei)
|
||||
@ -206,13 +227,10 @@ void Foam::waveModels::Grimshaw::setVelocity
|
||||
setPaddlePropeties(level, facei, fraction, z);
|
||||
|
||||
if (fraction > 0)
|
||||
{
|
||||
|
||||
if ( (tg<0) || (t >= tg) )
|
||||
{
|
||||
const label paddlei = faceToPaddle_[facei];
|
||||
|
||||
const vector Uf = U
|
||||
const vector Uf = this->Uf
|
||||
(
|
||||
waveHeight_,
|
||||
waterDepthRef_,
|
||||
@ -224,55 +242,12 @@ void Foam::waveModels::Grimshaw::setVelocity
|
||||
z
|
||||
);
|
||||
|
||||
U_[facei] = fraction*Uf*tCoeff + fraction*UCurrent_;
|
||||
|
||||
}
|
||||
else if ( tg>=t )
|
||||
{
|
||||
U_[facei] = fraction*UCurrent_;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Foam::waveModels::Grimshaw::setVelocityAbsorption
|
||||
(
|
||||
const scalarField& calculatedLevel,
|
||||
const scalarField& activeLevel
|
||||
)
|
||||
{
|
||||
|
||||
forAll(U_, facei)
|
||||
{
|
||||
const label paddlei = faceToPaddle_[facei];
|
||||
|
||||
scalar activeLevelMBL=activeLevel[paddlei];
|
||||
|
||||
scalar zMin = zMin_[facei];
|
||||
|
||||
//------ not needed anymore in new release
|
||||
if (fabs(zMinGb_)>1.0e-3)
|
||||
{
|
||||
zMin = zMin - zMinGb_;
|
||||
}
|
||||
//------
|
||||
|
||||
if (zMin < activeLevelMBL)
|
||||
|
||||
{
|
||||
scalar UCorr =
|
||||
(calculatedLevel[paddlei] - activeLevel[paddlei])
|
||||
*sqrt(mag(g_)/activeLevel[paddlei]);
|
||||
|
||||
U_[facei].x() += UCorr;
|
||||
}
|
||||
else
|
||||
{
|
||||
U_[facei].x() = 0;
|
||||
U_[facei] = fraction*Uf*tCoeff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::waveModels::Grimshaw::info(Ostream& os) const
|
||||
{
|
||||
solitaryWaveModel::info(os);
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015 IH-Cantabria
|
||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2017 IH-Cantabria
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -73,7 +73,7 @@ protected:
|
||||
) const;
|
||||
|
||||
//- Wave velocity
|
||||
virtual vector U
|
||||
virtual vector Uf
|
||||
(
|
||||
const scalar H,
|
||||
const scalar h,
|
||||
@ -98,22 +98,9 @@ protected:
|
||||
(
|
||||
const scalar t,
|
||||
const scalar tCoeff,
|
||||
const scalarField& level,
|
||||
const scalar tg
|
||||
const scalarField& level
|
||||
);
|
||||
|
||||
// Add current absorption to velocity
|
||||
virtual void setCurrent
|
||||
(
|
||||
const scalarField& levelMBO
|
||||
);
|
||||
|
||||
//- Calculate the wave model velocity absorption
|
||||
virtual void setVelocityAbsorption
|
||||
(
|
||||
const scalarField& calculatedLevel,
|
||||
const scalarField& activeLevel
|
||||
);
|
||||
|
||||
public:
|
||||
|
||||
@ -136,7 +123,7 @@ public:
|
||||
// Public Member Functions
|
||||
|
||||
//- Read from dictionary
|
||||
virtual bool read(const dictionary& overrideDict);
|
||||
virtual bool readDict(const dictionary& overrideDict);
|
||||
|
||||
//- Info
|
||||
virtual void info(Ostream& os) const;
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015 IH-Cantabria
|
||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2017 IH-Cantabria
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -56,7 +56,7 @@ Foam::scalar Foam::waveModels::McCowan::eta
|
||||
const scalar X0
|
||||
) const
|
||||
{
|
||||
vector vec = this->mn(H,h);
|
||||
vector vec = this->mn(H, h);
|
||||
scalar mm = vec[0];
|
||||
scalar nn = vec[1];
|
||||
|
||||
@ -65,29 +65,29 @@ Foam::scalar Foam::waveModels::McCowan::eta
|
||||
scalar Xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||
|
||||
scalar xin = 0.5*H;
|
||||
scalar etas = newtonRapsonF2(xin,H,h,Xa,mm,nn);
|
||||
scalar etas = newtonRapsonF2(xin, H, h, Xa, mm, nn);
|
||||
return etas;
|
||||
}
|
||||
|
||||
|
||||
Foam::vector Foam::waveModels::McCowan::mn
|
||||
(
|
||||
const scalar H,
|
||||
const scalar h
|
||||
) const
|
||||
{
|
||||
//m
|
||||
scalar xin = 1.0;
|
||||
scalar m = newtonRapsonF1(xin,H,h);
|
||||
// m
|
||||
scalar xin = 1;
|
||||
scalar m = newtonRapsonF1(xin, H, h);
|
||||
|
||||
//n
|
||||
scalar c1=sin(m+(1.0+((2.0*H)/(3.0*h))));
|
||||
scalar n = (2.0/3.0)*pow(c1,2);
|
||||
// n
|
||||
scalar c1 = sin(m + (1.0 + (2.0*H/(3.0*h))));
|
||||
scalar n = (2.0/3.0)*sqr(c1);
|
||||
|
||||
scalar aux=n;
|
||||
|
||||
return vector(m, n, aux);
|
||||
return vector(m, n, n);
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::waveModels::McCowan::newtonRapsonF1
|
||||
(
|
||||
const scalar x0,
|
||||
@ -95,58 +95,55 @@ Foam::scalar Foam::waveModels::McCowan::newtonRapsonF1
|
||||
const scalar h
|
||||
) const
|
||||
{
|
||||
scalar N=10000;
|
||||
scalar eps=1.e-5;
|
||||
label N = 10000;
|
||||
scalar eps = 1.e-5;
|
||||
scalar maxval = 10000.0;
|
||||
|
||||
scalar xn=0;
|
||||
scalar x=0;
|
||||
scalar c1=0;
|
||||
scalar c2=0;
|
||||
scalar c3=0;
|
||||
scalar fx=0;
|
||||
scalar fprime=0;
|
||||
scalar fxn=0;
|
||||
scalar fxx=0;
|
||||
|
||||
//define value for divergence
|
||||
scalar xx=x0;
|
||||
while (N>0)
|
||||
label iter = 1;
|
||||
scalar x = x0;
|
||||
scalar residual = 0;
|
||||
while (iter <= N)
|
||||
{
|
||||
//f
|
||||
c1=sin(xx+(1.0+((2.0*H)/(3.0*h))));
|
||||
fx = (2.0/3.0)*pow(c1,2) - (xx*H)/(h*tan(0.5*xx*(1.0+(H/h))));
|
||||
// f
|
||||
scalar a = x + 1.0 + 2.0*H/(3.0*h);
|
||||
scalar b = 0.5*x*(1.0 + H/h);
|
||||
scalar c = 0.5*x*(1.0 + h/H);
|
||||
scalar c1 = sin(a);
|
||||
scalar fx = (2.0/3.0)*sqr(c1) - x*H/(h*tan(b));
|
||||
|
||||
//fprime
|
||||
c2=1/tan(0.5*xx*(h/H + 1.0));
|
||||
c3=1/sin(0.5*xx*(H/h + 1.0));
|
||||
fprime=(4.0/3.0)*sin((2.0*H)/(3.0*h) + xx + 1.0)*cos((2.0*H)/(3.0*h) + xx + 1.0)-(h*c2)/H - (0.5*h*xx*(H/h + 1.0)*pow(c3,2))/h;
|
||||
xn = xx-fx/fprime;
|
||||
residual = mag(fx);
|
||||
|
||||
c1=sin(xn+(1.0+((2.0*H)/(3.0*h))));
|
||||
fxn = (2.0/3.0)*pow(c1,2) - (xn*H)/(h*tan(0.5*xn*(1.0+(H/h))));
|
||||
if (fabs(fxn)<eps)
|
||||
if (residual < eps)
|
||||
{
|
||||
x=xn;
|
||||
return x;
|
||||
}
|
||||
|
||||
c1=sin(xx+(1.0+((2.0*H)/(3.0*h))));
|
||||
fxx = (2.0/3.0)*pow(c1,2) - (xx*H)/(h*tan(0.5*xx*(1.0+(H/h))));
|
||||
if (fabs(fxx)>maxval)
|
||||
else if ((iter > 1) && (residual > maxval))
|
||||
{
|
||||
FatalIOErrorInFunction(*this)
|
||||
<< "fxx > maxval !!!"
|
||||
<< exit(FatalIOError);
|
||||
FatalErrorInFunction
|
||||
<< "Newton-Raphson iterations diverging: "
|
||||
<< "iterations = " << iter
|
||||
<< ", residual = " << residual
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
N = N - 1;
|
||||
xx = xn;
|
||||
// f-prime
|
||||
scalar c2 = 1.0/tan(c);
|
||||
scalar c3 = 1.0/sin(b);
|
||||
|
||||
scalar fprime = (4.0/3.0)*c1*cos(a) - c2*h/H - b*sqr(c3);
|
||||
|
||||
x -= fx/fprime;
|
||||
iter++;
|
||||
}
|
||||
|
||||
WarningInFunction
|
||||
<< "Failed to converge in " << iter << " iterations. Residual = "
|
||||
<< residual << nl << endl;
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::waveModels::McCowan::newtonRapsonF2
|
||||
(
|
||||
const scalar x0,
|
||||
@ -157,56 +154,54 @@ Foam::scalar Foam::waveModels::McCowan::newtonRapsonF2
|
||||
const scalar n
|
||||
) const
|
||||
{
|
||||
scalar N=10000;
|
||||
scalar eps=1.e-5;
|
||||
scalar maxval = 10000.0;
|
||||
label N = 10000;
|
||||
scalar eps = 1.e-5;
|
||||
scalar maxval = 10000;
|
||||
|
||||
scalar xn=0;
|
||||
scalar x=0;
|
||||
scalar c2=0;
|
||||
scalar c3=0;
|
||||
scalar fx=0;
|
||||
scalar fprime=0;
|
||||
scalar fxn=0;
|
||||
scalar fxx=0;
|
||||
|
||||
//define value for divergence
|
||||
scalar xx=x0;
|
||||
while (N>0)
|
||||
label iter = 1;
|
||||
scalar x = x0;
|
||||
scalar residual = 0;
|
||||
while (iter <= N)
|
||||
{
|
||||
//f
|
||||
fx = xx-(h*(n/m)*((sin(m*(1.0+(xx/h))))/(cos(m*(1.0+(xx/h)))+cosh(m*(xa/h)))));
|
||||
// f
|
||||
scalar a = m*(1.0 + x/h);
|
||||
scalar c1 = cos(a);
|
||||
scalar c2 = sin(a);
|
||||
|
||||
//fprime
|
||||
c2=sin((m*(h + x))/h);
|
||||
c3=cosh((xa*m)/h) + cos((m*(h + x))/h);
|
||||
fprime = 1 - (n*cos((m*(h + x))/h))/(cosh((xa*m)/h) + cos((m*(h + x))/h)) - (n*pow(c2,2))/(pow(c3,2));
|
||||
scalar fx = x - (h*n/m*(c2/(c1 + cosh(m*xa/h))));
|
||||
|
||||
xn = xx-fx/fprime;
|
||||
residual = mag(fx);
|
||||
|
||||
fxn = xn-(h*(n/m)*((sin(m*(1.0+(xn/h))))/(cos(m*(1.0+(xn/h)))+cosh(m*(xa/h)))));
|
||||
if (fabs(fxn)<eps)
|
||||
if (residual < eps)
|
||||
{
|
||||
x=xn;
|
||||
return x;
|
||||
}
|
||||
|
||||
fxx = xx-(h*(n/m)*((sin(m*(1.0+(xx/h))))/(cos(m*(1.0+(xx/h)))+cosh(m*(xa/h)))));
|
||||
if (fabs(fxx)>maxval)
|
||||
else if ((iter > 1) && (residual > maxval))
|
||||
{
|
||||
FatalIOErrorInFunction(*this)
|
||||
<< "fxx > maxval !!!"
|
||||
<< exit(FatalIOError);
|
||||
FatalErrorInFunction
|
||||
<< "Newton-Raphson iterations diverging: "
|
||||
<< "iterations = " << iter
|
||||
<< ", residual = " << residual
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
N = N - 1;
|
||||
xx = xn;
|
||||
// f-prime
|
||||
scalar c3 = cosh(xa*m/h) + c1;
|
||||
scalar fprime = 1 - n/c3*(c1 - sqr(c2)/c3);
|
||||
|
||||
x -= fx/fprime;
|
||||
iter++;
|
||||
}
|
||||
|
||||
WarningInFunction
|
||||
<< "Failed to converge in " << iter << " iterations. Residual = "
|
||||
<< residual << nl << endl;
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
Foam::vector Foam::waveModels::McCowan::U
|
||||
|
||||
Foam::vector Foam::waveModels::McCowan::Uf
|
||||
(
|
||||
const scalar H,
|
||||
const scalar h,
|
||||
@ -218,25 +213,24 @@ Foam::vector Foam::waveModels::McCowan::U
|
||||
const scalar z
|
||||
) const
|
||||
{
|
||||
vector vec = this->mn(H,h);
|
||||
scalar mm = vec[0];
|
||||
scalar nn = vec[1];
|
||||
const vector vec = this->mn(H, h);
|
||||
const scalar mm = vec[0];
|
||||
const scalar nn = vec[1];
|
||||
|
||||
scalar C = sqrt(((mag(g_)*h)/mm)*tan(mm));
|
||||
scalar ts = 3.5*h/sqrt(H/h);
|
||||
scalar Xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||
const scalar C = sqrt((mag(g_)*h)/mm*tan(mm));
|
||||
const scalar ts = 3.5*h/sqrt(H/h);
|
||||
const scalar Xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||
|
||||
scalar outa = C*nn*(1.0+cos(mm*(z/h))*cosh(mm*(Xa/h)));
|
||||
scalar outb = (cos(mm*(z/h))+cosh(mm*(Xa/h))) * (cos(mm*(z/h))+cosh(mm*(Xa/h)));
|
||||
scalar outa = C*nn*(1.0 + cos(mm*z/h)*cosh(mm*Xa/h));
|
||||
scalar outb = sqr(cos(mm*z/h) + cosh(mm*Xa/h));
|
||||
|
||||
scalar u = outa/outb;
|
||||
|
||||
outa = C*nn*(sin(mm*(z/h))*sinh(mm*(Xa/h)));
|
||||
outb = (cos(mm*(z/h))+cosh(mm*(Xa/h))) * (cos(mm*(z/h))+cosh(mm*(Xa/h)));
|
||||
outa = C*nn*sin(mm*z/h)*sinh(mm*Xa/h);
|
||||
|
||||
scalar w = outa/outb;
|
||||
const scalar w = outa/outb;
|
||||
|
||||
scalar v = u*sin(waveAngle_);
|
||||
const scalar v = u*sin(waveAngle_);
|
||||
u *= cos(waveAngle_);
|
||||
|
||||
return vector(u, v, w);
|
||||
@ -283,7 +277,7 @@ Foam::waveModels::McCowan::McCowan
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
read(dict);
|
||||
readDict(dict);
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,9 +290,9 @@ Foam::waveModels::McCowan::~McCowan()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::waveModels::McCowan::read(const dictionary& overrideDict)
|
||||
bool Foam::waveModels::McCowan::readDict(const dictionary& overrideDict)
|
||||
{
|
||||
if (solitaryWaveModel::read(overrideDict))
|
||||
if (solitaryWaveModel::readDict(overrideDict))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -306,12 +300,12 @@ bool Foam::waveModels::McCowan::read(const dictionary& overrideDict)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Foam::waveModels::McCowan::setVelocity
|
||||
(
|
||||
const scalar t,
|
||||
const scalar tCoeff,
|
||||
const scalarField& level,
|
||||
const scalar tg
|
||||
const scalarField& level
|
||||
)
|
||||
{
|
||||
forAll(U_, facei)
|
||||
@ -325,13 +319,10 @@ void Foam::waveModels::McCowan::setVelocity
|
||||
setPaddlePropeties(level, facei, fraction, z);
|
||||
|
||||
if (fraction > 0)
|
||||
{
|
||||
|
||||
if ( (tg<0) || (t >= tg) )
|
||||
{
|
||||
const label paddlei = faceToPaddle_[facei];
|
||||
|
||||
const vector Uf = U
|
||||
const vector Uf = this->Uf
|
||||
(
|
||||
waveHeight_,
|
||||
waterDepthRef_,
|
||||
@ -343,61 +334,11 @@ void Foam::waveModels::McCowan::setVelocity
|
||||
z
|
||||
);
|
||||
|
||||
U_[facei] = fraction*Uf*tCoeff + fraction*UCurrent_;
|
||||
|
||||
}
|
||||
else if ( tg>=t )
|
||||
{
|
||||
U_[facei] = fraction*UCurrent_;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Foam::waveModels::McCowan::setVelocityAbsorption
|
||||
(
|
||||
const scalarField& calculatedLevel,
|
||||
const scalarField& activeLevel
|
||||
)
|
||||
{
|
||||
|
||||
forAll(U_, facei)
|
||||
{
|
||||
const label paddlei = faceToPaddle_[facei];
|
||||
|
||||
scalar activeLevelMBL=activeLevel[paddlei];
|
||||
|
||||
scalar zMin = zMin_[facei];
|
||||
|
||||
//------ not needed anymore in new release
|
||||
if (fabs(zMinGb_)>1.0e-3)
|
||||
{
|
||||
zMin = zMin - zMinGb_;
|
||||
}
|
||||
//------
|
||||
|
||||
if (zMin < activeLevelMBL)
|
||||
{
|
||||
scalar UCorr =
|
||||
(calculatedLevel[paddlei] - activeLevel[paddlei])
|
||||
*sqrt(mag(g_)/activeLevel[paddlei]);
|
||||
|
||||
U_[facei].x() += UCorr;
|
||||
}
|
||||
else
|
||||
{
|
||||
U_[facei].x() = 0;
|
||||
U_[facei] = fraction*Uf*tCoeff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Foam::waveModels::McCowan::setCurrent
|
||||
(
|
||||
const scalarField& levelMBO
|
||||
)
|
||||
{
|
||||
//No needed for generation
|
||||
}
|
||||
|
||||
void Foam::waveModels::McCowan::info(Ostream& os) const
|
||||
{
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015 IH-Cantabria
|
||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2017 IH-Cantabria
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -89,7 +89,7 @@ protected:
|
||||
) const;
|
||||
|
||||
//- Wave velocity
|
||||
virtual vector U
|
||||
virtual vector Uf
|
||||
(
|
||||
const scalar H,
|
||||
const scalar h,
|
||||
@ -114,22 +114,9 @@ protected:
|
||||
(
|
||||
const scalar t,
|
||||
const scalar tCoeff,
|
||||
const scalarField& level,
|
||||
const scalar tg
|
||||
const scalarField& level
|
||||
);
|
||||
|
||||
// Add current absorption to velocity
|
||||
virtual void setCurrent
|
||||
(
|
||||
const scalarField& levelMBO
|
||||
);
|
||||
|
||||
//- Calculate the wave model velocity absorption
|
||||
virtual void setVelocityAbsorption
|
||||
(
|
||||
const scalarField& calculatedLevel,
|
||||
const scalarField& activeLevel
|
||||
);
|
||||
|
||||
public:
|
||||
|
||||
@ -152,7 +139,7 @@ public:
|
||||
// Public Member Functions
|
||||
|
||||
//- Read from dictionary
|
||||
virtual bool read(const dictionary& overrideDict);
|
||||
virtual bool readDict(const dictionary& overrideDict);
|
||||
|
||||
//- Info
|
||||
virtual void info(Ostream& os) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.openfoam.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.openfoam.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.7.x |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -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: plus |
|
||||
| \\ / 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: plus |
|
||||
| \\ / 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: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / 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: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.openfoam.com |
|
||||
| \\ / 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.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / 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.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -54,14 +54,12 @@ maxDeltaT 0.01;
|
||||
|
||||
functions
|
||||
{
|
||||
//Sensores VOF
|
||||
line
|
||||
{
|
||||
type sets;
|
||||
functionObjectLibs ("libsampling.so");
|
||||
libs ("libsampling.so");
|
||||
enabled true;
|
||||
outputControl writeTime;
|
||||
outputInterval 1;
|
||||
writeControl writeTime;
|
||||
|
||||
interpolationScheme cellPoint;
|
||||
setFormat raw;
|
||||
@ -69,61 +67,60 @@ functions
|
||||
(
|
||||
s1
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 0.865 0.275 0.0 );
|
||||
end ( 0.865 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s2
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 1.065 0.275 0.0 );
|
||||
end ( 1.065 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s3
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 4.1 0.275 0.0 );
|
||||
end ( 4.1 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s4
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 4.645 0.275 0.0 );
|
||||
end ( 4.645 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s5
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 5.2 0.275 0.0 );
|
||||
end ( 5.2 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s6
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 5.85 0.275 0.0 );
|
||||
end ( 5.85 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s7
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 6.15 0.275 0.0 );
|
||||
@ -131,13 +128,11 @@ functions
|
||||
nPoints 101;
|
||||
}
|
||||
);
|
||||
fixedLocations false;
|
||||
fields
|
||||
(
|
||||
alpha.water
|
||||
);
|
||||
}
|
||||
|
||||
fixedLocations false;
|
||||
fields (alpha.water);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -25,7 +25,7 @@ solvers
|
||||
cAlpha 1;
|
||||
}
|
||||
|
||||
pcorr
|
||||
"pcorr.*"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.7.x |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -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: plus |
|
||||
| \\ / 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: plus |
|
||||
| \\ / 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: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / 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: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.openfoam.com |
|
||||
| \\ / 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.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / 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.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -54,14 +54,12 @@ maxDeltaT 0.01;
|
||||
|
||||
functions
|
||||
{
|
||||
//Sensores VOF
|
||||
line
|
||||
{
|
||||
type sets;
|
||||
functionObjectLibs ("libsampling.so");
|
||||
libs ("libsampling.so");
|
||||
enabled true;
|
||||
outputControl writeTime;
|
||||
outputInterval 1;
|
||||
writeControl writeTime;
|
||||
|
||||
interpolationScheme cellPoint;
|
||||
setFormat raw;
|
||||
@ -69,61 +67,60 @@ functions
|
||||
(
|
||||
s1
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 0.865 0.275 0.0 );
|
||||
end ( 0.865 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s2
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 1.065 0.275 0.0 );
|
||||
end ( 1.065 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s3
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 4.1 0.275 0.0 );
|
||||
end ( 4.1 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s4
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 4.645 0.275 0.0 );
|
||||
end ( 4.645 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s5
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 5.2 0.275 0.0 );
|
||||
end ( 5.2 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s6
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 5.85 0.275 0.0 );
|
||||
end ( 5.85 0.275 0.5 );
|
||||
nPoints 101;
|
||||
}
|
||||
|
||||
s7
|
||||
{
|
||||
|
||||
type uniform;
|
||||
axis distance;
|
||||
start ( 6.15 0.275 0.0 );
|
||||
@ -131,13 +128,11 @@ functions
|
||||
nPoints 101;
|
||||
}
|
||||
);
|
||||
fixedLocations false;
|
||||
fields
|
||||
(
|
||||
alpha.water
|
||||
);
|
||||
}
|
||||
|
||||
fixedLocations false;
|
||||
fields (alpha.water);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -25,7 +25,7 @@ solvers
|
||||
cAlpha 1;
|
||||
}
|
||||
|
||||
pcorr
|
||||
"pcorr.*"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.1.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.openfoam.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.openfoam.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: http://www.openfoam.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
Reference in New Issue
Block a user