CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[waves2Foam] stokes 1st wave propagation in 3d domain diverged after mesh refinement

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2019, 12:15
Default stokes 1st wave propagation in 3d domain diverged after mesh refinement
  #1
New Member
 
Ontario
Join Date: Jul 2018
Posts: 3
Rep Power: 8
chliu is on a distinguished road
I am working on stokes 1st wave running up a truncated circular column, following the paper “2016 Applied Ocean Research. Liang Sun. Regular waves onto a truncated circular column: A comparison ofexperiments and simulationsL.” Currently I am using foam-extend4.0 together with waves2Foam package.

In the first step I performed simulation of stokes 1st wave propagation in 2d domain (uniform mesh). Grid convergence test was performed and the simulation result was validated by theoretical solution. Then I tried to run a 3d case(uniform mesh) by an extension in spanwise direction. I succeed in the coarse mesh (1 grid in a wave height) as shown in the attach. However when I try to increase the mesh resolution (uniform mesh) it always burst suddently after many time steps, even though both of the time step and CFL number is very small. My case is shown in the attach, could anyone help me pinpoint my mistake? Many thanks!
system/controlDict
Quote:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application interFoam;

startFrom latestTime; //startTime;

startTime 0;

stopAt endTime;

endTime 40;

deltaT 0.001;

writeControl adjustableRunTime;

writeInterval 10;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep no;

maxCo 0.25;

maxAlphaCo 0.25;

maxDeltaT 0.001;

functions
{
#includeIfPresent "../waveGaugesNProbes/surfaceElevationAnyName_controlDict";
}

// ************************************************** *********************** //

constant/polyMesh/blockMeshDict
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
//nx 140;
//ny 56; //28;
//nz 56;

nx 280;
ny 56;
nz 112;

xl -152.88;
xr 229.32;
yl -76.44;
yr 38.22;
zl -76.44;
zr 76.44;

vertices
(
// ( 0 -0.4 0 )
// ( 18 -0.4 0 )
// ( 0 0.2 0 )
// ( 18 0.2 0 )

// ( 0 -0.4 1 )
// ( 18 -0.4 1 )
// ( 0 0.2 1 )
// ( 18 0.2 1 )

($xl $yl $zl)
($xr $yl $zl)
($xl $yr $zl)
($xr $yr $zl)

($xl $yl $zr)
($xr $yl $zr)
($xl $yr $zr)
($xr $yr $zr)
);

blocks
(
hex (0 1 3 2 4 5 7 6) ($nx $ny $nz ) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch inlet
(
(0 4 6 2)
)
wall bottom
(
(0 1 5 4)
)
patch outlet
(
(1 5 7 3)
)

patch atmosphere
(
(2 3 7 6)
)

patch front
(
(4 5 7 6)
)
patch back
(
(0 1 3 2)
)
);

mergePatchPairs
(
);

// ************************************************** *********************** //
waveProperties.input
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object environmentalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

seaLevel 0.00;

// A list of the relaxation zones in the simulation. The parameters are given
// in <name>Coeffs below.
relaxationNames (inlet outlet);

initializationName outlet;

inletCoeffs
{
// Wave type to be used at boundary "inlet" and in relaxation zone "inlet"
waveType stokesFirst;

// Ramp time of 2 s
Tsoft 7.0;

// Water depth at the boundary and in the relaxation zone
depth 76.44;

// Wave period
period 7.0;

// Phase shift in the wave
phi 0.000000;

// Wave number vector, k.
direction (1.0 0.0 0.0);

// Wave height
height 2.54;

// Specifications on the relaxation zone shape and relaxation scheme
relaxationZone
{
relaxationScheme Spatial;
relaxationShape Rectangular;
beachType Empty;

relaxType INLET;
startX (-152.88 0.0 -76.44);
endX (-100.00 0.0 76.44);
orientation (1.0 0.0 0.0);
}
};

outletCoeffs
{
waveType potentialCurrent;
U (0 0 0);
Tsoft 7.0;

relaxationZone
{
relaxationScheme Spatial;
relaxationShape Rectangular;
beachType Empty;

relaxType OUTLET;
startX (152.88 0.0 -76.44);
endX (229.32 0.0 76.44);
orientation (1.0 0.0 0.0);
}
};



// ************************************************** *********************** //
turbulenceProperties
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType laminar;

// ************************************************** *********************** //
transportProperties
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

phase1
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 0;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}

phase2
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 0;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}

sigma sigma [ 1 0 -2 0 0 0 0 ] 0.00;


// ************************************************** *********************** //
constant/g
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0 );

// ************************************************** *********************** //
system/fvSchemes
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
// default CrankNicolson 1.0;
default Euler;
}

gradSchemes
{
// default cellLimited fourth 1;
default Gauss linear;
grad(U) Gauss linear;
grad(alpha1) Gauss linear;
}

divSchemes
{
// default Gauss linear;
div(rho*phi,U) Gauss limitedLinearV 1;
// div(phi,gamma) Gauss vanLeer;
// div(rho*phi,U) Gauss MUSCL;
div(phi,alpha) Gauss MUSCL;
div(phirb,alpha) Gauss interfaceCompression;
// div(rhoPhi,U) Gauss limitedLinearV 1;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
pd;
pcorr;
gamma;
}

// ************************************************** *********************** //
system/fvSolution
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
/* pcorr PCG
{
preconditioner DIC;
tolerance 1e-10;
relTol 0;
};
pd PCG
{
preconditioner DIC;
tolerance 1e-7;
relTol 0.001;
};
pdFinal PCG
{
preconditioner DIC;
tolerance 1e-7;
relTol 0;
};*/

pcorr GAMG
{
tolerance 1e-7;
relTol 0.0;

smoother DIC;//GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;

cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
};

pd GAMG
{
tolerance 1e-7;
relTol 0.0;

smoother DIC;//GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;

cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
};

pdFinal GAMG
{
tolerance 1e-8;
relTol 0.0;

smoother DIC;//GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;

cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
};

U PBiCG
{
preconditioner DILU;
tolerance 1e-09;
relTol 0;
};

UFinal PBiCG
{
preconditioner DILU;
tolerance 1e-09;
relTol 0;
};

gamma PBiCG
{
preconditioner DILU;
tolerance 1e-07;
relTol 0;
};
}

PISO
{
cAlpha 1;
}

PIMPLE
{
pdRefCell 0;
pdRefValue 0;
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 1;
nAlphaCorr 1;
nAlphaSubCycles 1;
}

// ************************************************** *********************** //

0.org/alpha1.org
Quote:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.org;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type waveAlpha;
refValue uniform 0;
refGrad uniform 0;
valueFraction uniform 1;
value uniform 0;
}
bottom
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
front
{
type zeroGradient;
}
back
{
type zeroGradient;
}
}


// ************************************************** *********************** //
0.org/U.org
Quote:

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.org;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform ( 0.0 0.0 0.0);

boundaryField
{
inlet
{
type waveVelocity;
refValue uniform ( 0 0 0 );
refGradient uniform ( 0 0 0 );
valueFraction uniform 1;
value uniform ( 0 0 0 );
}
bottom
{
type fixedValue;
value uniform ( 0 0 0 );
}
outlet
{
// type fixedValue;
// value uniform ( 0 0 0 );
type zeroGradient;
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform ( 0 0 0 );
}
front
{
type zeroGradient;
}
back
{
type zeroGradient;
}
}


// ************************************************** *********************** //
0.org/pd.org
Quote:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object pd;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
atmosphere
{
type totalPressure;
U U;
phi phi;
rho none;
psi none;
gamma 1;
p0 uniform 0;
value uniform 0;
}
front
{
type zeroGradient;
}
back
{
type zeroGradient;
}
}


// ************************************************** *********************** //
log-waveFoam.png

stokes1-3d.zip

wave-3d-coarse.pdf

Last edited by chliu; March 28, 2019 at 09:37.
chliu is offline   Reply With Quote

Reply

Tags
3d simulation, diverge after mesh refine, foamextend-4.0, stokes 1st wave, waves2foam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Number of cells in mesh don't match with size of cellLevel colinB OpenFOAM Meshing & Mesh Conversion 14 December 12, 2018 09:07
[snappyHexMesh] Disturbance in the mesh after the addition of layers Dorian1504 OpenFOAM Meshing & Mesh Conversion 0 June 13, 2017 03:27
Sudden increase the residual of Maxwell's equations hsezsz CFX 2 October 13, 2016 07:58
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 20:43


All times are GMT -4. The time now is 00:20.