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

[IHFOAM] The IHFOAM Thread

Register Blogs Community New Posts Updated Threads Search

Like Tree57Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2019, 13:30
Default
  #281
New Member
 
Chiara Viola
Join Date: Jun 2019
Posts: 7
Rep Power: 6
ChiaraViola is on a distinguished road
Quote:
Originally Posted by IHFOAM Team View Post

Can you add a snapshot of the last time step simulated?
Hi IHFOAM,

thank you for answer me. Here are available the snapshots of it, since the domain is quite long than the height I also made a detailed snapshot of one critical wave where is possible to see the breaking.

Best regards,
Chiara
Attached Images
File Type: png Screenshot latest time step.png (6.7 KB, 48 views)
File Type: jpg Screenshot detail.jpg (97.2 KB, 39 views)
ChiaraViola is offline   Reply With Quote

Old   July 2, 2019, 02:29
Default
  #282
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Quote:
Best regards,
Chiara
Have you checked the new tutorials available in the IHFOAM web page?

I recommend you to take a look to the tutorial number 3:
https://ihfoam.ihcantabria.com/source-code/tutorials/

Just by changing the dimensions to your specific case it should work straight forward.

Regards,
IHFOAM Team
ChiaraViola likes this.
__________________
http://ihfoam.ihcantabria.com/
IHFOAM Team is offline   Reply With Quote

Old   July 2, 2019, 06:29
Default
  #283
New Member
 
Chiara Viola
Join Date: Jun 2019
Posts: 7
Rep Power: 6
ChiaraViola is on a distinguished road
Quote:
Originally Posted by IHFOAM Team View Post
Have you checked the new tutorials available in the IHFOAM web page?

I recommend you to take a look to the tutorial number 3:
https://ihfoam.ihcantabria.com/source-code/tutorials/

Just by changing the dimensions to your specific case it should work straight forward.

Thank you so much for suggesting me these tutorials, I didn't checked before.

Firstly I want try to finish the tutorial with the original dimensions but when I run snappyHexMesh I have one problem that is the same I had in the previous trials when I wanted to use the empty patches in my geometry (this is why I changed then the boundaries but I don't know if I took the good ones because in my mind they describe a good situation).



When SHM is at the morphing phase, especially in the scaling iteration step, it stops to work. I mean the SHM is working if I check in the 'top' command but it doesn't go ahead in showing some results... in my previous trial I waited for 3 days without any result and I had to force the killing process


I have no idea how to solve this problem, I tried also to follow this steps https://openfoamwiki.net/index.php/M...Examples/2DsHM (and in order to avoid the problem regarding the morphing phase I used a patch instead of empty boundaries) but then when I wanted to run faceSet I got 'command not found'.


Here there is the snapshot of my terminal.


Regards,

Chiara
Attached Images
File Type: jpg Screenshot from 2019-07-02 12-12-18.jpg (86.6 KB, 23 views)
ChiaraViola is offline   Reply With Quote

Old   July 24, 2019, 06:13
Default
  #284
New Member
 
Chiara Viola
Join Date: Jun 2019
Posts: 7
Rep Power: 6
ChiaraViola is on a distinguished road
Quote:
Originally Posted by IHFOAM Team View Post
Have you checked the new tutorials available in the IHFOAM web page?

I recommend you to take a look to the tutorial number 3:
https://ihfoam.ihcantabria.com/source-code/tutorials/

Just by changing the dimensions to your specific case it should work straight forward.

Regards,
IHFOAM Team

Hi IHFOAM Team,

I solved my problem with the geometry but I still have convergence problem in my simulation. When I run the tutorial everything goes well but when I apply my dike my simulation is not able to finish the run.

I post here my best result that is having wave generation for all domain and a part of a promenade, then when the water impact to the storm wall my simulation explodes and stop to run. I tried to re run again from the latest time step but it doesn't change and I have floating point exception error but the message doesn't say where. I have tried the StokesV and Solitary wave theory.

Here's my last time steps:
Code:
Interface Courant Number mean: 7.52871716e-05 max: 0.49483746
deltaT = 0.000303030303
Time = 12.48121

PIMPLE: iteration 1
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834572  Min(alpha.water) = -3.56215196e-18  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834567  Min(alpha.water) = -4.81435309e-15  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834561  Min(alpha.water) = -3.16737612e-18  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
Updating shallowWaterAbsorption wave model for patch outlet
DICPCG:  Solving for p_rgh, Initial residual = 0.00129628034, Final residual = 8.454475e-05, No Iterations 2
time step continuity errors : sum local = 1.62441265e-06, global = -1.61430925e-10, cumulative = -0.000302494024
DICPCG:  Solving for p_rgh, Initial residual = 0.000101904608, Final residual = 9.57877951e-06, No Iterations 5
time step continuity errors : sum local = 1.84077961e-07, global = -1.52568624e-10, cumulative = -0.000302494176
DICPCG:  Solving for p_rgh, Initial residual = 2.58305186e-05, Final residual = 9.90149424e-08, No Iterations 40
time step continuity errors : sum local = 1.90277147e-09, global = -1.3610308e-10, cumulative = -0.000302494313
DILUPBiCG:  Solving for epsilon, Initial residual = 7.42801644e-05, Final residual = 8.44475079e-09, No Iterations 3
DILUPBiCG:  Solving for k, Initial residual = 4.0146251e-05, Final residual = 7.85378951e-09, No Iterations 3
ExecutionTime = 4890.13 s  ClockTime = 4898 s

forces theForce write:
    Sum of forces
        Total    : (13.3724271 -2.27757378e-19 -10.0306079)
        Pressure : (4.50642118 -2.3383332e-19 -10.9364174)
        Viscous  : (8.86600596 6.07594186e-21 0.905809559)
    Sum of moments
        Total    : (-0.250765197 244.537017 -0.334310679)
        Pressure : (-0.273410436 261.033131 -0.11266053)
        Viscous  : (0.022645239 -16.4961143 -0.221650149)


Courant Number mean: 0.000966970543 max: 0.654489614
Interface Courant Number mean: 7.52755711e-05 max: 0.493488506
deltaT = 0.000303030303
Time = 12.48152

PIMPLE: iteration 1
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834556  Min(alpha.water) = -2.43254777e-12  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834551  Min(alpha.water) = -2.99407269e-12  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -2.77249818e-12  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
Updating shallowWaterAbsorption wave model for patch outlet
DICPCG:  Solving for p_rgh, Initial residual = 0.999998938, Final residual = 0.0992890547, No Iterations 176
time step continuity errors : sum local = 1793.50201, global = -164.053246, cumulative = -164.053548
DICPCG:  Solving for p_rgh, Initial residual = 0.0100297232, Final residual = 0.000976588103, No Iterations 34
time step continuity errors : sum local = 5383.89001, global = 22.1393125, cumulative = -141.914236
DICPCG:  Solving for p_rgh, Initial residual = 0.623030872, Final residual = 8.75604326e-08, No Iterations 444
time step continuity errors : sum local = 1.29516877, global = 0.0317167913, cumulative = -141.882519
DILUPBiCG:  Solving for epsilon, Initial residual = 1, Final residual = 4.91728767e-08, No Iterations 305
DILUPBiCG:  Solving for k, Initial residual = 0.999992114, Final residual = 7.28249599e-08, No Iterations 72
ExecutionTime = 4893.86 s  ClockTime = 4902 s

forces theForce write:
    Sum of forces
        Total    : (-5.9421823e+11 1.75389677e-07 -1.82111202e+12)
        Pressure : (2.9596292e+10 3.46827344e-09 -1.2693774e+11)
        Viscous  : (-6.23814522e+11 1.71921404e-07 -1.69417428e+12)
    Sum of moments
        Total    : (-4.55278005e+10 4.3443861e+13 1.48554558e+10)
        Pressure : (-3.1734435e+09 3.04254594e+12 -739907300)
        Viscous  : (-4.2354357e+10 4.0401315e+13 1.55953631e+10)


Courant Number mean: 21088154.1 max: 1.9642191e+10
Interface Courant Number mean: 5037.41204 max: 3.06992413e+09
deltaT = 1.00278883e-14
Time = 12.48152

PIMPLE: iteration 1
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -2.53696869e-18  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -2.4194413e-18  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -2.30736125e-18  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
Updating shallowWaterAbsorption wave model for patch outlet
DICPCG:  Solving for p_rgh, Initial residual = 1, Final residual = 0.0896010676, No Iterations 3
time step continuity errors : sum local = 3.710663e-06, global = -1.46078069e-06, cumulative = -141.88252
DICPCG:  Solving for p_rgh, Initial residual = 0.0191976271, Final residual = 0.0018107842, No Iterations 74
time step continuity errors : sum local = 3.64633761e-07, global = -3.25543309e-08, cumulative = -141.88252
DICPCG:  Solving for p_rgh, Initial residual = 0.00533186821, Final residual = 9.77861893e-08, No Iterations 360
time step continuity errors : sum local = 1.38141453e-11, global = -4.31509092e-13, cumulative = -141.88252
DILUPBiCG:  Solving for epsilon, Initial residual = 0.801888953, Final residual = 2.63354537e-09, No Iterations 3
DILUPBiCG:  Solving for k, Initial residual = 0.999999981, Final residual = 4.47189636e-08, No Iterations 43
ExecutionTime = 4895.68 s  ClockTime = 4904 s

forces theForce write:
    Sum of forces
        Total    : (-7.31340554e+22 0.0797159682 -3.69161797e+20)
        Pressure : (-7.31340526e+22 0.0796140194 -3.69161615e+20)
        Viscous  : (-2.75274944e+15 0.000101948765 -1.8237216e+14)
    Sum of moments
        Total    : (-9.22904493e+18 -3.82515413e+22 1.82835138e+21)
        Pressure : (-9.22904037e+18 -3.82515441e+22 1.82835132e+21)
        Viscous  : (-4.559304e+12 2.7142395e+15 6.8818736e+13)


Courant Number mean: 0.000629044872 max: 0.650828439
Interface Courant Number mean: 1.6464218e-07 max: 0.0907623825
deltaT = 1.00151238e-14
Time = 12.48152

PIMPLE: iteration 1
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -2.19710685e-18  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -2.09212415e-18  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -1.99216095e-18  Max(alpha.water) = 1.00002689
Updating Boussinesq wave model for patch inlet
Updating shallowWaterAbsorption wave model for patch outlet
DICPCG:  Solving for p_rgh, Initial residual = 0.817942023, Final residual = 0.0813433379, No Iterations 5
time step continuity errors : sum local = 1.25065719e-05, global = 1.16963171e-05, cumulative = -141.882509
DICPCG:  Solving for p_rgh, Initial residual = 5.70953114e-23, Final residual = 5.70953114e-23, No Iterations 0
time step continuity errors : sum local = 0.000117355497, global = 2.11170735e-05, cumulative = -141.882487
DICPCG:  Solving for p_rgh, Initial residual = 6.66554354e-23, Final residual = 6.66554354e-23, No Iterations 0
time step continuity errors : sum local = 0.000137005676, global = 3.14480127e-05, cumulative = -141.882456
DILUPBiCG:  Solving for epsilon, Initial residual = 0.119912403, Final residual = 2.97545097e-19, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 0.997356728, Final residual = 3.52026066e-08, No Iterations 4
ExecutionTime = 4896.46 s  ClockTime = 4904 s

forces theForce write:
    Sum of forces
        Total    : (9.32326856e+23 0.0920065607 -1.60711805e+26)
        Pressure : (9.32326781e+23 0.0941689421 -1.60711805e+26)
        Viscous  : (7.47411626e+16 -0.00216238142 -2.4296042e+17)
    Sum of moments
        Total    : (-4.01779512e+24 3.86779306e+27 -2.33081714e+22)
        Pressure : (-4.01779511e+24 3.86779306e+27 -2.33081695e+22)
        Viscous  : (-6.0740105e+15 5.89375131e+18 -1.86852906e+15)


Courant Number mean: 0.00101005327 max: 0.744973995
Interface Courant Number mean: 2.50833444e-07 max: 0.0927142531
deltaT = 8.73833249e-15
Time = 12.48152

PIMPLE: iteration 1
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -1.91882256e-18  Max(alpha.water) = 1.00050606
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -1.84818658e-18  Max(alpha.water) = 1.00107257
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -1.78015334e-18  Max(alpha.water) = 1.00163869
Updating Boussinesq wave model for patch inlet
Updating shallowWaterAbsorption wave model for patch outlet
DICPCG:  Solving for p_rgh, Initial residual = 0.717370409, Final residual = 0.000186916172, No Iterations 2
time step continuity errors : sum local = 8.94336731e+14, global = -0.0785260696, cumulative = -141.960982
DICPCG:  Solving for p_rgh, Initial residual = 0.00316221348, Final residual = 7.17413295e-06, No Iterations 2
time step continuity errors : sum local = 2.79883007e+13, global = -0.0024559532, cumulative = -141.963438
DICPCG:  Solving for p_rgh, Initial residual = 2.97251623e-05, Final residual = 3.00371123e-08, No Iterations 5
time step continuity errors : sum local = 2.37052366e+11, global = 0.0635588623, cumulative = -141.899879
DILUPBiCG:  Solving for epsilon, Initial residual = 1, Final residual = 2.09460599e-08, No Iterations 28
DILUPBiCG:  Solving for k, Initial residual = 0.241911001, Final residual = 1.04959446e-09, No Iterations 10
bounding k, min: -3.05627363e+17 max: 3.29820016e+47 average: 1.22708212e+44
ExecutionTime = 4897.43 s  ClockTime = 4905 s

forces theForce write:
    Sum of forces
        Total    : (-7.03043443e+23 0.552046284 -1.03919052e+23)
        Pressure : (-7.03005298e+23 0.105959373 -1.03899035e+23)
        Viscous  : (-3.81447451e+19 0.44608691 -2.00164777e+19)
    Sum of moments
        Total    : (-2.5979763e+21 2.07342438e+24 1.75760861e+22)
        Pressure : (-2.59747589e+21 2.07296483e+24 1.75751324e+22)
        Viscous  : (-5.00411943e+17 4.59551807e+20 9.53618626e+17)


Courant Number mean: 2.08521425e+11 max: 3.69068888e+16
Interface Courant Number mean: 107316.023 max: 4.83529043e+11
deltaT = 1.53898535e-31
Time = 12.48152

PIMPLE: iteration 1
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -1.78015334e-18  Max(alpha.water) = 1.00163869
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -1.78015334e-18  Max(alpha.water) = 1.00163869
Updating Boussinesq wave model for patch inlet
MULES: Solving for alpha.water
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.193834545  Min(alpha.water) = -1.78015334e-18  Max(alpha.water) = 1.00163869
Updating Boussinesq wave model for patch inlet
Updating shallowWaterAbsorption wave model for patch outlet
DICPCG:  Solving for p_rgh, Initial residual = 1, Final residual = 0.0842359784, No Iterations 8
time step continuity errors : sum local = 2.37705522e-05, global = 4.14086539e-14, cumulative = -141.899879
DICPCG:  Solving for p_rgh, Initial residual = 5.11844107e-33, Final residual = 5.11844107e-33, No Iterations 0
time step continuity errors : sum local = 0.000645155463, global = 4.14087039e-14, cumulative = -141.899879
DICPCG:  Solving for p_rgh, Initial residual = 4.94251612e-33, Final residual = 4.94251612e-33, No Iterations 0
time step continuity errors : sum local = 0.000622980949, global = 4.14086442e-14, cumulative = -141.899879
DILUPBiCG:  Solving for epsilon, Initial residual = 0.101291878, Final residual = 1.67129654e-17, No Iterations 1
bounding epsilon, min: -9.00014567e+47 max: 1.09716542e+74 average: 7.27482569e+70
DILUPBiCG:  Solving for k, Initial residual = 0.999900355, Final residual = 6.97592886e-08, No Iterations 15
bounding k, min: -8.8532324e+34 max: 1.36702156e+61 average: 3.88712176e+57
ExecutionTime = 4898.28 s  ClockTime = 4906 s

forces theForce write:
    Sum of forces
        Total    : (1.88604209e+40 2.85303407e+16 1.38770322e+39)
        Pressure : (1.88604209e+40 2.85303407e+16 1.38770322e+39)
        Viscous  : (-7.49750031e+19 0.0711033385 1.45478639e+20)
    Sum of moments
        Total    : (3.46925806e+37 -2.19577983e+40 -4.71510522e+38)
        Pressure : (3.46925806e+37 -2.19577983e+40 -4.71510522e+38)
        Viscous  : (3.63696598e+18 -3.54626942e+21 1.87437508e+18)
The list of the commands I used are the same of the tutorial except for the fact I add the autoPatch and then I manually modify the boundary file with the empty type for the sides and the wall type for everything related to my bathymetry and dike.

Code:
blockMesh
surfaceFeatureExtract
snappyHexMesh -overwrite 
extrudeMesh
autoPatch 10 -overwrite
*manually changing of the name and patch type in constant/polyMesh/boundary*
copy the 0.orig folder in 0
setFields
decomposePar
mpirun -np 4 interFoam -parallel
I also tried running in serial but I didn't see a big difference


Please can you have a look to my case and help my to figure out what is wrong and how can I finish my simulations? I would be very grateful to you if you could do it.

Best regards,
Chiara



in this link you can find all my case https://www.dropbox.com/sh/d9r4tpok9...PRxSrxnpa?dl=0
ChiaraViola is offline   Reply With Quote

Old   July 24, 2019, 11:48
Default
  #285
New Member
 
Join Date: Oct 2018
Posts: 17
Rep Power: 7
Ramsay is on a distinguished road
Hi IHFOAM,

do you have any plans to implement the recommendations by Higuera in your next version?

https://arxiv.org/abs/1810.03492

Thanks

Last edited by Ramsay; July 24, 2019 at 18:38.
Ramsay is offline   Reply With Quote

Old   July 31, 2019, 03:50
Default Post-process of IHFoam
  #286
New Member
 
Matte Wang
Join Date: Sep 2018
Posts: 13
Rep Power: 7
Aunura is on a distinguished road
Hello, IHFoam

I am running the case of TUTORIAL 6: REGULAR WAVES INTERACTION WITH A FLOATING STRUCTURE (3D) on http://ihfoam.ihcantabria.com. Eventually, I have finished the calculation and get similar graphics as document mentioned. However, I am still confusing about the postProcessing after calculation.
1. How can I get six degrees of freedom of floatingObject from log.OverWaves?
2. What should I do if I want to obtain the wave height on every time step?
It seems that the IHFoam provides a function named freeSurface for postProcessing, but the result is a STL files. I don't know how to cope with it. Could you please give me some detailed information?

Best regards,
Aunura
Aunura is offline   Reply With Quote

Old   July 31, 2019, 04:13
Default
  #287
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Quote:
Originally Posted by Aunura View Post
Hello, IHFoam
Hi Aunura

Quote:
Originally Posted by Aunura View Post
However, I am still confusing about the postProcessing after calculation.
We will try to help you:
1) There are several threads in the forum where everything is explained; I have added just two of them:

How to plot pitch motion for free decay test?
Orientation tensor of 6DoF solver

2) You should add some free-surface sensors. Please, take a look to the system/controlDict of, for example, ~/OpenFOAM/OpenFOAM-v1812/tutorials/multiphase/interFoam/laminar/waveExampleStokesII

3) Open the stl's with paraview, you will be able to make a video of the free surface evolution during the simulation...or maybe transform them to .csv format, for example, and do some nice postprocessing.

Best Regards,
IHFOAM Team
__________________
http://ihfoam.ihcantabria.com/
IHFOAM Team is offline   Reply With Quote

Old   July 31, 2019, 06:14
Default
  #288
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Quote:
Originally Posted by ChiaraViola View Post
Please can you have a look to my case and help my to figure out what is wrong and how can I finish my simulations?
Hi Chiara, I have reproduced your case and I have realized that you have created a mesh with different refinement zones: as you are defining very different zones near the generation zone and in the inlet patch, this is not correct

You should first, create a mesh with no refinement (but with enough discretization), and run a preliminary simulation. Then, do some specific refinement near the free surface or near the dike wall. and run a realistic case.

Best Regards,
IHFOAM Team
__________________
http://ihfoam.ihcantabria.com/
IHFOAM Team is offline   Reply With Quote

Old   July 31, 2019, 09:16
Default Problems with StokesI in a 2D wave Flume
  #289
New Member
 
Lea Fehn
Join Date: Feb 2019
Location: Germany
Posts: 3
Rep Power: 7
Lea Lucia is on a distinguished road
Hey IHFOAM,


i am simulating relgular StokesI deep water waves (H=0,25m and T=5s) in a 2D wave flume with 20m water depth, but i do not get good results. There are crazy velocites in the water body an also the the wavehights are variing. I copied everything from the Turorial waveExampleStokesI in OpenFOAm v1712.


I already tried different meshes. Am i doing anything wrong?
I attach some pictures and the case folders


Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  plus                                  |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      wavesProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

inlet
{
    alpha           alpha.water;

    waveModel       StokesI;

    nPaddle         1;

    waveHeight      0.25;

    waveAngle       0.0;

    rampTime        5;

    activeAbsorption yes;

    wavePeriod      5;
}

outlet
{
    alpha           alpha.water;

    waveModel       shallowWaterAbsorption;

    nPaddle         1;
}


// ************************************************************************* //
Attached Images
File Type: jpg Bildschirmfoto vom 2019-07-31 15-10-09.jpg (109.3 KB, 35 views)
File Type: jpg Bildschirmfoto vom 2019-07-31 15-09-42.jpg (79.1 KB, 34 views)
Attached Files
File Type: zip system.zip (4.0 KB, 6 views)
File Type: zip 0.orig.zip (1.9 KB, 5 views)
Lea Lucia is offline   Reply With Quote

Old   August 2, 2019, 05:35
Default
  #290
New Member
 
Matte Wang
Join Date: Sep 2018
Posts: 13
Rep Power: 7
Aunura is on a distinguished road
Thank you, IHFoam. I have already got what I want using the method mentioned in these threads. However, I still have one question.

I have to deploy many free surface sensor to ensure the free surface I got smooth enough. You know, if I deploy a sensor every 0.1 meters in X direction while the length of water flume is up to 20 meters. It‘s too tedious for me to add them one by one in controlDict. Therefore, I want to know that is there any other method for me to deploy these sensors?
Aunura is offline   Reply With Quote

Old   August 2, 2019, 13:55
Default
  #291
New Member
 
Lea Fehn
Join Date: Feb 2019
Location: Germany
Posts: 3
Rep Power: 7
Lea Lucia is on a distinguished road
Hello again IHFoam-Team,


I would really appreciate your help bacuase I am writing my diploma thesis. Otherwise I will discuss the results that i got so far.


Have a nice weekend
and thanks in advanced


Lea
Lea Lucia is offline   Reply With Quote

Old   August 9, 2019, 04:50
Default
  #292
New Member
 
Chiara Viola
Join Date: Jun 2019
Posts: 7
Rep Power: 6
ChiaraViola is on a distinguished road
Quote:
Originally Posted by IHFOAM Team View Post

You should first, create a mesh with no refinement (but with enough discretization), and run a preliminary simulation. Then, do some specific refinement near the free surface or near the dike wall. and run a realistic case.
Hi IHFOAM Team, thank you so much for your answer! Sorry for my late reply, I was sick.

I tried several cell dimensions and my simulation worked only for cells of 8 cm or more (that means it's very unrealistic because I even can't see the waves and the overtopping).

Now I'm trying to refine for a realistic case but I don't know the procedure and how to do that. I tried to re-run blockMesh, I tried to re-run also snappy but with no results. I thought about refineMesh utility but the problem for me is that snappy keeps the non refined geometry so the angle between bathymetry and dike and also all the wall are not representing the real case with the right dimensions (the wall results warped and lower).

Could you please suggest me what should I do in order to refine and run the realistic case?

Best regards,

Chiara
ChiaraViola is offline   Reply With Quote

Old   August 16, 2019, 10:19
Default
  #293
New Member
 
Join Date: Oct 2018
Posts: 17
Rep Power: 7
Ramsay is on a distinguished road
Quote:
Originally Posted by Aunura View Post
Thank you, IHFoam. I have already got what I want using the method mentioned in these threads. However, I still have one question.

I have to deploy many free surface sensor to ensure the free surface I got smooth enough. You know, if I deploy a sensor every 0.1 meters in X direction while the length of water flume is up to 20 meters. It‘s too tedious for me to add them one by one in controlDict. Therefore, I want to know that is there any other method for me to deploy these sensors?
Hi Aunura,
Why don't you use this function in your controlDict instead of the line functions? It will give you .stl files of surface elevation through whole domain at each time step which you can plot with Matlab or import to and view with Salome.

HTML Code:
freeSurface
    {
        type            surfaces;
        functionObjectLibs
        (
          "libsampling.so"
        );
        writeControl    outputTime;
        outputInterval  1;
        surfaceFormat   stl;
        interpolationScheme cellPoint;
        surfaces
        (
          topFreeSurface
          {
            type isoSurface;
            isoField alpha.water;
            isoValue 0.5;
            interpolate true;
          }
        );
        fields
        (
          alpha.water
        );
    }
IHFOAM Team and yuno like this.
Ramsay is offline   Reply With Quote

Old   August 16, 2019, 10:59
Default
  #294
New Member
 
Join Date: Oct 2018
Posts: 17
Rep Power: 7
Ramsay is on a distinguished road
Hi Lea,

You can definitely get better answers from IHFOAM team but since I saw your problem please let me mention a couple of things.
1. You have only 5 grid points for your wave height (wave height=25cm, grid=6cm) which can be a source of decreasing wave height. Please try 10 or higher.
2. Please make the aspect ratio of your grids near the free surface as close as possible to 1. Here it seems that it is equal to (6/25)=0.25.
3. You have used default configuration such as maxCo, as well as other configurations in fvSchemes that are quite diffusive. Please go through the literature and change the schemes to less diffusive ones, but do not change them to too oscillating schemes.
4. It seems that your water depth and wave length indicate intermediate water. Unfortunately, active wave absorption has a little bit reflection in intermediate water and that can also be a cause of your problem, but that should not affect your results that much.
5. Your domain is too long, 160 m. Thus, with the default configurations you will lose wave height.
Since I am also an amateur in this field, the above recommendations can be wrong. Please wait for the IHFOAM team answer to make final decisions.
Regards




Quote:
Originally Posted by Lea Lucia View Post
Hey IHFOAM,


i am simulating relgular StokesI deep water waves (H=0,25m and T=5s) in a 2D wave flume with 20m water depth, but i do not get good results. There are crazy velocites in the water body an also the the wavehights are variing. I copied everything from the Turorial waveExampleStokesI in OpenFOAm v1712.


I already tried different meshes. Am i doing anything wrong?
I attach some pictures and the case folders


Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  plus                                  |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      wavesProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

inlet
{
    alpha           alpha.water;

    waveModel       StokesI;

    nPaddle         1;

    waveHeight      0.25;

    waveAngle       0.0;

    rampTime        5;

    activeAbsorption yes;

    wavePeriod      5;
}

outlet
{
    alpha           alpha.water;

    waveModel       shallowWaterAbsorption;

    nPaddle         1;
}


// ************************************************************************* //
dylan_OF likes this.
Ramsay is offline   Reply With Quote

Old   August 16, 2019, 16:18
Default
  #295
New Member
 
Join Date: Oct 2018
Posts: 17
Rep Power: 7
Ramsay is on a distinguished road
Hi IHFOAM Team,
I Hope you're doing well. I have a problem in my simulations from long time ago that I really do not know how to solve. The problem is that when I compare my theoretical surface elevation to the numerical one simulated with IHFOAM, the crests are similar to the theoretical results, however, troughs are most of the times higher than the theoretical results. Could you please give me a hint about the possible reasons behind this problem.

H=0.5 m
h=1.89 m
T=2.5 sec
Stokes I
wave maker location=28 m, model is shifted 28 m
For x=58 to x=86 is a sloped surface so the waves break and theoretical results my not be valid in that region. However, my question is about the x=28 m to x=58 m.
Attached Images
File Type: png 1.png (99.3 KB, 42 views)
Ramsay is offline   Reply With Quote

Old   August 23, 2019, 03:01
Default
  #296
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Hi Aunura,


Quote:
Originally Posted by Aunura View Post
Therefore, I want to know that is there any other method for me to deploy these sensors?
You can use Paraview to save each time step in .csv format, and then use matlab or python (for example) to analyze the data.

Regards,
IHFOAM Team
__________________
http://ihfoam.ihcantabria.com/
IHFOAM Team is offline   Reply With Quote

Old   August 23, 2019, 03:08
Default
  #297
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Hi Lea,

Quote:
Originally Posted by Lea Lucia View Post
Hey IHFOAM,
Am i doing anything wrong?
It seems that it might be caused because you are running your case as laminar. You should re-run it with the kEpsilon turbulence model, for example.

Please, take a look to any of our tutorials if you do not know how to do it:
http://ihfoam.ihcantabria.com/wp-con...M_Course_3.pdf

Best Regards,
IHFOAM Team
__________________
http://ihfoam.ihcantabria.com/

Last edited by IHFOAM Team; August 26, 2019 at 06:29.
IHFOAM Team is offline   Reply With Quote

Old   August 23, 2019, 03:14
Default
  #298
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Hi Chiara,

Quote:
Originally Posted by ChiaraViola View Post

Could you please suggest me what should I do in order to refine and run the realistic case?
There are multiple examples on internet about the use of blockMesh + snappyHexMesh.

I can recommend you any of ours:
- http://ihfoam.ihcantabria.com/wp-con...M_Course_4.pdf
- http://ihfoam.ihcantabria.com/wp-con...M_Course_5.pdf

Regards,
IHFOAM Team
__________________
http://ihfoam.ihcantabria.com/
IHFOAM Team is offline   Reply With Quote

Old   August 23, 2019, 03:23
Default
  #299
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Hi Ramsay,

Quote:
Originally Posted by Ramsay View Post
Could you please give me a hint about the possible reasons behind this problem.
It seems that you are using the wrong Wave Theory. For that specific wave height, water depth and period you should use Stokes 3rd order (that unfortunately we have not released yet).

Do you have the real movement of the wavepaddle? you can use it as the input.

Regards,
IHFOAM Team
__________________
http://ihfoam.ihcantabria.com/

Last edited by IHFOAM Team; August 29, 2019 at 03:50.
IHFOAM Team is offline   Reply With Quote

Old   September 1, 2019, 03:02
Default
  #300
New Member
 
Matte Wang
Join Date: Sep 2018
Posts: 13
Rep Power: 7
Aunura is on a distinguished road
Good idea. Thank you very much!

Another questions is a problem of debugging. Recently I want to debug OpenFOAM using gdb. Then, I turn on the WM_COMPILE_OPTION to Debug in bashrc, and compile the OpenFOAM again. However, it seems that something is wrong. The error message is:

Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1806 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : v1806
Arch : "LSB;label=32;scalar=64"
Exec : interFoam
Date : Sep 01 2019
Time : 14:45:29
Host : "cybrex"
PID : 7287
I/O : uncollated
Case : /home/cybrex/OpenFOAM/OpenFOAM-v1806/tutorials/multiphase/interFoam/laminar/waveExampleStokesII
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes

Reading g

Reading hRef
Calculating field g.h

No MRF models present

No finite volume options present
DICPCG: Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0
Starting time loop

Reading set description:
line1
line2
line3
line4
line5
line6
line7
line8

Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.011
Time = 0.011

PIMPLE: iteration 1
Selecting waveModel StokesII


--> FOAM FATAL ERROR:
Field<vector> f1(55) and Field<vector> f2(0)
for operation f1 = s & f2

From function void Foam::checkFields(const Foam::UList<T>&, const Foam::UList<Key>&, const char*) [with Type1 = Foam::Vector<double>; Type2 = Foam::Vector<double>]
in file /home/cybrex/OpenFOAM/OpenFOAM-v1806/src/OpenFOAM/lnInclude/FieldM.H at line 56.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-v1806/src/OSspecific/POSIX/printStack.C:234
#1 Foam::error::abort() at ~/OpenFOAM/OpenFOAM-v1806/src/OpenFOAM/lnInclude/error.C:282
#2 Foam::Ostream& Foam:perator<< <Foam::error>(Foam::Ostream&, Foam::err
#3 void Foam::checkFields<Foam::Vector<double>, Foam::Vector<double> >(Foam::UList<Foam::Vector<double> > const&, Foam::UList<Foam::Vector<double> > const&, char const*) in ~/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Debug/bin/interFoam
#4 void Foam::dot<Foam::Tensor<double>, double, (unsigned char)9, Foam::Vector<double> >(Foam::Field<Foam::innerProduct<Foam::Tensor<doub le>, Foam::Vector<double> >::type>&, Foam::VectorSpace<Foam::Tensor<double>, double, (unsigned char)9> const&, Foam::UList<Foam::Vector<double> > const&) at ~/OpenFOAM/OpenFOAM-v1806/src/OpenFOAM/lnInclude/FieldFunctions.C:775
#5 Foam::tmp<Foam::Field<Foam::innerProduct<Foam::Ten sor<double>, Foam::Vector<double> >::type> > Foam:perator&<Foam::Tensor<double>, double, (unsigned char)9, Foam::Vector<double> >(Foam::VectorSpace<Foam::Tensor<double>, double, (unsigned char)9> const&, Foam::UList<Foam::Vector<double> > const&) at ~/OpenFOAM/OpenFOAM-v1806/src/OpenFOAM/lnInclude/FieldFunctions.C:775
#6 Foam::waveModel::initialiseGeometry() at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveModel/waveModel.C:92 (discriminator 1)
#7 Foam::waveModel::readDict(Foam::dictionary const&) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveModel/waveModel.C:327 (discriminator 2)
#8 Foam::waveModels::waveGenerationModel::readDict(Fo am::dictionary const&) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveGenerationModels/base/waveGenerationModel/waveGenerationModel.C:98
#9 Foam::waveModels::irregularWaveModel::readDict(Foa m::dictionary const&) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveGenerationModels/base/irregularWaveModel/irregularWaveModel.C:86
#10 Foam::waveModels::regularWaveModel::readDict(Foam: :dictionary const&) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveGenerationModels/base/regularWaveModel/regularWaveModel.C:99
#11 Foam::waveModels::StokesI::readDict(Foam::dictiona ry const&) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveGenerationModels/derived/StokesI/StokesIWaveModel.C:222
#12 Foam::waveModels::StokesII::readDict(Foam::diction ary const&) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveGenerationModels/derived/StokesII/StokesIIWaveModel.C:168
#13 Foam::waveModels::StokesII::StokesII(Foam::diction ary const&, Foam::fvMesh const&, Foam:olyPatch const&, bool) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveGenerationModels/derived/StokesII/StokesIIWaveModel.C:155
#14 Foam::waveModel::addpatchConstructorToTable<Foam:: waveModels::StokesII>::New(Foam::dictionary const&, Foam::fvMesh const&, Foam:olyPatch const&) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/lnInclude/waveModel.H:181 (discriminator 2)
#15 Foam::waveModel::New(Foam::word const&, Foam::fvMesh const&, Foam:olyPatch const&) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveModel/waveModelNew.C:77
#16 Foam::waveModel::lookupOrCreate(Foam:olyPatch const&, Foam::fvMesh const&, Foam::word const&) at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/waveModel/waveModelNew.C:93
#17 Foam::waveAlphaFvPatchScalarField::updateCoeffs() at ~/OpenFOAM/OpenFOAM-v1806/src/waveModels/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchS
#18 Foam::fvPatchField<double>::evaluate(Foam::UPstrea m::commsTypes) in ~/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Debug/bin/interFoam
#19 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() in ~/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Debug/bin/interFoam
#20 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::correctBoundaryConditions() in ~/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Debug/bin/interFoam
#21 void Foam::MULES::explicitSolve<Foam::geometricOneField , Foam::zeroField, Foam::zeroField>(Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::zeroField const&, Foam::zeroField const&, double, double) in ~/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Debug/bin/interFoam
#22 ? in ~/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Debug/bin/interFoam
#23 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#24 ? in ~/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Debug/bin/interFoam
Aborted (core dumped)
Both OpenFOAM-v1812 and OpenFOAM v1806 will encounter this problem.Neverthelss, everything is Ok when I turn the WM_COMPILE_OPTION to Opt in bashrc. But I am unable to debug the OpenFOAM if I do so. In this case, I want to find a better solution.
graziosov likes this.
Aunura is offline   Reply With Quote

Reply


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
Divergence detected in AMG solver: k when udf loaded google9002 Fluent UDF and Scheme Programming 3 November 7, 2019 23:34
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 04:17
UDF velocity profile willroca Fluent UDF and Scheme Programming 2 January 10, 2016 03:13
Error messages atg enGrid 7 August 30, 2013 11:16
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 14:37


All times are GMT -4. The time now is 11:50.