|
[Sponsors] |
[waves2Foam] BC changes from relaxationAlpha to waveAlpha after using setWaveField in OFv2306 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 17, 2023, 06:52 |
BC changes from relaxationAlpha to waveAlpha after using setWaveField in OFv2306
|
#1 |
New Member
Jesper R. K. Qwist
Join Date: Dec 2017
Posts: 22
Rep Power: 9 |
Hi,
I have compiled the newest version of waves2Foam with OpenFoam-v2306. My problem I specify boundary condition type to be relaxationAlpha in 0/alpha.water as follows: Code:
boundaryField { inlet { type relaxationAlpha; refValue uniform 0; refGrad uniform 0; valueFraction uniform 1; value uniform 0; } bottom { type zeroGradient; } outlet { type relaxationAlpha; refValue uniform 0; refGrad uniform 0; valueFraction uniform 1; value uniform 0; } atmosphere { type zeroGradient; } frontBack { type empty; } } The boundary type changes from relaxationAlpha to waveAlpha. The following piece of code, is the boundary field section from the alpha.water field that was written during a call to the setWaveField application. Code:
boundaryField { inlet { type waveAlpha; waveDictName waveProperties; value uniform 0; } bottom { type zeroGradient; } outlet { type waveAlpha; waveDictName waveProperties; value uniform 0; } atmosphere { type zeroGradient; } frontBack { type empty; } } My temporary solution: If I manually change waveAlpha to relaxationAlpha then my case executes perfectly fine. Notes: I have observed the same change in 0/U where the boundary type is changed from relaxationVelocity to waveVelocity. I have been looking at the source files related to the setWaveField application and class as well as the waveAlphaFvPatchScalarField and waveVelocityFvPatchScalarField classes. But I have not been able to identify exactly where the code writes waveAlpha or waveVelocity to the dictionary files. Are there anyone who have experienced the same problem? And how to solve this / suggestions to where to look for the problem? Best Regards, Jesper Qwist |
|
December 13, 2023, 10:05 |
|
#2 |
New Member
Guillén Campaña Alonso
Join Date: Jun 2021
Posts: 6
Rep Power: 5 |
Hi! I have also experienced this issue, moreover I cannot fix it like you do. An error arises saying:
Code:
Dictionary entry for patch inlet not found file: constant/waveProperties at line 17 to 75. From static Foam::autoPtr<Foam::waveModel> Foam::waveModel::New(const Foam::word&, const Foam::fvMesh&, const Foam::polyPatch&) in file waveModel/waveModelNew.C at line 61. alpha.water (I omit the internalField list) Code:
boundaryField { inlet { type relaxationAlpha; waveDictName waveProperties; value uniform 0; } outlet { type zeroGradient; } ground { type zeroGradient; } top { type inletOutlet; inletValue uniform 0; value uniform 0; } side1 { type empty; } side2 { type empty; } } Code:
internalField uniform (0 0 -0); boundaryField { inlet { type relaxationVelocity; waveDictName waveProperties; value uniform (0 0 0); } outlet { type fixedValue; value uniform (0 0 0); } ground { type slip; } top { type pressureInletOutletVelocity; value uniform (0 0 0); } side1 { type empty; } side2 { type empty; } } And finally, this is my waveProperties.input file Code:
seaLevel 0; relaxationNames ( inlet outlet ); initializationName inlet; inletCoeffs { waveType stokesSecond; depth 103.68; period 11.3; direction ( 1 0 0 ); phi 0; height 5.49; Tsoft 11.3; debug false; relaxationZone { relaxationScheme Spatial; relaxationWeight Exponential; exponent 3.5; courantCorrection false; beachType Empty; relaxationShape Rectangular; relaxType INLET; startX ( -400 -204 0 ); endX ( -200 204 0 ); orientation ( 1 0 0 ); } } outletCoeffs { waveType potentialCurrent; depth 103.68; U ( 0 0 0 ); Tsoft 11.3; relaxationZone { relaxationScheme Spatial; relaxationWeight Exponential; exponent 3.5; courantCorrection false; relaxationShape Rectangular; relaxType OUTLET; startX ( 200 -203.4 0 ); endX ( 700 203.4 0 ); orientation ( 1 0 0 ); } } initCoeffs { waveType potentialCurrent; U ( 0 0 0 ); Tsoft 11.3; } I can use the zeroGradient BC and it works. Do you know where my error is? Best regards |
|
Tags |
boundary, relaxationalpha, setwavefield, wavealpha, waves2foam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[waves2Foam] setWaveField and/or waveFoam not working in parallel | saeed.barzegar.v | OpenFOAM Community Contributions | 2 | January 25, 2023 15:57 |
setWaveField never finish | Rasmusiwersen | OpenFOAM Pre-Processing | 3 | June 30, 2022 12:51 |