|
[Sponsors] |
[waves2Foam] Initial water level is not horizontal, but U shaped towards domain inlet and outlet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 19, 2023, 09:54 |
Initial water level is not horizontal, but U shaped towards domain inlet and outlet
|
#1 |
New Member
Nian
Join Date: Jun 2019
Posts: 15
Rep Power: 7 |
Hello there,
I am quite new to waves solver, so sorry in advance if the answer to this is obvious. I have run the 2D waveFlume tutorial okay, now I have adapted the case to be 3D, as well as added a fixed object in the water domain. However, the results seem to show I have not defined the water field properly, and that water is only present at the beginning and end sections of the domain, which I suspect is the relaxation zone I have added. Please see image1: I am not completely sure why this is the case, could it maybe have been the boundary conditions I have set? My blockMesh dict: Code:
/*--------------------------------*- 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; vertices ( ( -3 -3 -1 ) ( 7 -3 -1 ) ( -3 1 -1 ) ( 7 1 -1 ) ( -3 -3 1 ) ( 7 -3 1 ) ( -3 1 1 ) ( 7 1 1 ) ); blocks ( hex (0 1 3 2 4 5 7 6) ( 100 40 20 ) 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 frontBack ( (0 1 3 2) (4 5 7 6) ) ); mergePatchPairs ( ); // ************************************************************************* // Code:
/*--------------------------------*- 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 2; // Water depth at the boundary and in the relaxation zone depth 1.200000; // Wave period period 2.0; // Phase shift in the wave phi 0.000000; // Wave number vector, k. direction (1.0 0.0 0.0); // Wave height height 0.1; // Specifications on the relaxation zone shape and relaxation scheme relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType INLET; startX (-3 0.0 -1); endX (-1 0.0 1); orientation (1.0 0.0 0.0); } }; outletCoeffs { waveType potentialCurrent; U (0 0 0); Tsoft 2; relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType OUTLET; startX (5 0.0 -1); endX (7 0.0 1); orientation (1.0 0.0 0.0); } }; // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1912 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } bottom { type zeroGradient; } outlet { type zeroGradient; } atmosphere { type totalPressure; rho rho; psi none; gamma 1; p0 uniform 0; value uniform 0; } frontBack { type zeroGradient; } } // ************************************************************************* // alpha1.org: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5-dev | | \\ / A nd | Revision: 1740 | | \\/ M anipulation | Web: http://www.OpenFOAM.org | \*---------------------------------------------------------------------------*/ 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 { //- Set patchGroups for constraint patches #includeEtc "$WM_PROJECT_DIR/etc/caseDicts/setConstraintTypes" inlet { type zeroGradient; //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; } frontBack { type zeroGradient; //empty; } WCGroup { type zeroGradient; } } // ************************************************************************* // |
|
April 21, 2023, 06:35 |
|
#2 |
New Member
Nian
Join Date: Jun 2019
Posts: 15
Rep Power: 7 |
To add to this, I am running in parallel - it seems to run fine without the object in the domain, it feels like an issue with either snappyHexMesh or the setting of boundary conditions/initial input conditions for decomposed domains!
My run file procedure is: runApplication surfaceFeatureExtract runApplication blockMesh runApplication waveGaugesNProbes runApplication setWaveParameters runApplication decomposePar -copyZero runParallel snappyHexMesh -overwrite runApplication reconstructParMesh runApplication setFields runApplication decomposePar mpirun -np 4 waveFoam -parallel > log.waveFoam 2>&1 The reason I reconstructed before setFields is because I have read other posts where it seems to be the best way going about it, as setFields seems to not set the decomposed domains properly, I am not sure if my approach is correct though! Last edited by noodleluvmay; April 21, 2023 at 06:54. Reason: Adding more information |
|
April 27, 2023, 13:24 |
|
#3 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Please note that setFields is native to OpenFOAM, while setWaveField is the tool developed for waves2Foam.
Kind regards and good luck Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
Tags |
boundary condition, initial condition |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Atmospheric BCs for domain with a single boundary serving as both the inlet & outlet | Newtonian | OpenFOAM Running, Solving & CFD | 0 | July 21, 2022 15:07 |
interFoam wave propagation and explosion of Courant number and residuals | ChiaraViola | OpenFOAM Running, Solving & CFD | 1 | June 26, 2019 06:36 |
Flowrate at inlet and outlet not balancing ( centrifugal pump ) -- pimpleDyMFoam | coolcrasher | OpenFOAM Running, Solving & CFD | 20 | November 25, 2015 06:33 |
Keeping inlet mass flux the same as outlet mass flux in an water tank | vaibhav402 | Main CFD Forum | 0 | October 13, 2015 04:02 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |