|
[Sponsors] |
[waves2Foam] how to use wave2Foam simulate wave precisely |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 30, 2014, 04:10 |
how to use wave2Foam simulate wave precisely
|
#1 |
Senior Member
|
Dear Everyone.
I am now using wave2Foam with OpenFOAM 2.2.2. but I got errors for simulate second order stokes wave for shallow water case, I wish some one can help me. I choose the domain as: Code:
X in [0,62] Y in [-0.5,6] still water depth =0.5 //under y=0. Code:
dx=0.002 for X in [-0.08, 0.08] // so within the surface elevation region I have 40 mesh cells. actually I did mesh refinement study with refine rate 2, so I tried , 20, 10 cells. and estimate the uncertainty in L2 norm is 2.7% for 40 cells in this range dy=0.05 // that means I have roughly 53 cells per wave length. Code:
waveType stokesSecond; Tsoft 2; depth 0.5; period 1.44; direction ( 1 0 0 ); phi 0; height 0.12; waveNumber (2.34995 0 0); omega 4.36332; debug true; inlet relaxation zone: Code:
relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType INLET; startX ( 0 -3 0 ); endX ( 3.43 0.2 1 ); orientation ( 1 0 0 ); } Code:
relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType OUTLET; startX ( 43.53 -3 0 ); endX ( 62 0.2 1 ); orientation ( 1 0 0 ); } Code:
ddtSchemes { default backward; } gradSchemes { default Gauss linear; grad(U) Gauss linear; grad(alpha1) Gauss linear; } divSchemes { div(rho*phi,U) Gauss limitedLinearV 0.99; div(phi,U) Gauss limitedLinearV 0.98; div(phi,alpha) Gauss MUSCL; div(phirb,alpha) Gauss interfaceCompression; div(rho*phi,k) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; div(rho*phi,epsilon) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p_rgh; pcorr; g Thanks lot! /Wei |
|
October 30, 2014, 14:29 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Good evening,
@Wayne: Try to switch to Euler. I do not have a good experience with higher order time stepping and VOF. Kind regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. Last edited by wyldckat; October 8, 2018 at 10:51. Reason: removed answer to another post that was on the main thread |
|
October 31, 2014, 01:55 |
|
#3 |
Senior Member
|
Hi Niels
Thanks for replying so soon. and I did the simulation again with the Euler scheme for time stepping. in my controlDict, I set Max Co=0.2, I observes that during the iteration, dt is roughly 0.004 s. here is the plot of time =18s. is it because of numerical dissipation? Thanks /Wei Last edited by wyldckat; October 8, 2018 at 10:51. Reason: removed quote, since the post is now right above it on the new thread |
|
October 31, 2014, 07:59 |
|
#4 | |
Senior Member
|
Again here is the comparison of two different time schemes at T=18s( so there is no reflection of the wave)
from this we can see even in the relaxation zone near inlet part, the wave are different. one lead to the growth of amptitute the other in the opposite direction. but. both has the same distortion of wave in the wave length direction. Quote:
|
||
October 31, 2014, 09:18 |
PostprocessingWaves2foam
|
#5 |
New Member
frederik stoll
Join Date: Aug 2014
Location: Hannover
Posts: 3
Rep Power: 12 |
p { margin-bottom: 0.25cm; line-height: 120%; } Dear Niels,
i am using waveFoam, too. Thank you very much for this tool. My Masterthesis is about sedimenttransport around structures due to wave/current interaction. At the moment i am working at a Reflexion analyses, to check, which dimensions of the Inlet/Outlet zone are the best to minimise or even avoid reflections. Unfortunately i do not understand how to use your reflectionAnalyses2DFFT. May you explain this to me? The waveflume: x-length: 25 m; 0-5: Inletzone; 20-25: Outletzone y-width: 0.25m z-depth: 0.75m waterdepth; 0.3 m air The cellsize is 3.5cm/0.5cm/1cm I used Stokes II for wavegeneration waveheight = 0,125 m wavelength = 4,74 m period = 2 sec I installed 150 wavegauges, with a distance of 0.161 m. The first gauge is located at 0.5m(close to the inlet) the last one at 24.5 m (close to the outlet) The surface elevation ist sampeld with 100Hz. The simulation timestep is about delta_t = 0.004 sec. The surfaceelevation fits the theory very well. This is all fine. I will attach you the postprocessingProperties and the results of the reflectionAnalyses2DFFT. How to choose the gauges I want to use for the reflectionanalyses ist not obvious to me. Furthermore I do not understand what kind of data is written into the files surfaceElevation_0_rightGoing_spectrum. Any help will be great. Best regards frederik |
|
October 31, 2014, 10:38 |
|
#6 |
Senior Member
|
Hi frederik:
can you show us the surface elevation plot? Last edited by wyldckat; October 7, 2018 at 14:59. Reason: removed large quote, since the post is now right above it on the new thread |
|
November 1, 2014, 06:27 |
|
#7 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Good morning,
Yes, the indices defined in postProcessingWaves are those indices in the input stream to be used in any given analysis, e.g. reflection analysis or the computation of power spectra. A match between location and index can be obtained, if you start with using the action: writeIndexLocation. Since you are using a regular wave (StokesSecond), I would suggest that you use the least squares reflection analysis tool. This is described in our paper Jacobsen et al. (2012) in the appendix. The frequency bins for the FFT-reflection analysis is due to the spectral averaging procedure that is employed for reflectionAnalysis2DFFT, i.e. a certain part of the time series is used for the reflection analysis, the time series is shifted (windowShiftFraction), and the reflection analysis is conducted again, etc. The average of all incident and reflected spectra are then outputted. Unfortunately, I do not have any reference for this, but the decomposition of the spectra follows Zelt and Skjelbreia (https://journals.tdl.org/icce/index....icle/view/4736). Furthermore, could I please ask you to assist Wayne, as you seem to have succeeded in what he is having problems with. Kind regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
November 1, 2014, 06:59 |
|
#8 | |
Senior Member
|
Hello Niels:
thanks a lot! besides, Do you have any benchmark case for testing the solver . I went through this thread, I saw two test for pure shallow water flume, which could be a good start point. but one of them only use 1 cells for wave height, which is not reasonable. the other in the #57, It already shows distortion of wave propagation for second order stokes wave propagating in a shallow water flume. besides even for that test case, there are only 3-4 wave in between the inlet and outlet relaxation zone. may not be enough. I appreciate if any of you can help me figure out how to predict the wave in shallow water flume precisely. /Wei Quote:
|
||
November 1, 2014, 14:47 |
|
#9 |
New Member
frederik stoll
Join Date: Aug 2014
Location: Hannover
Posts: 3
Rep Power: 12 |
Hello,
thank you very much Niels. Wei, you will find a plot attached. If you have any questions, don't hesitate to ask me. It will be a great pleasure for me to help you. A remark: as you can see the static-water-level is at 0.01 m. This is because i set the waterlevel in the waveproperties.input file to 0.01. In result the waterlevel is 0.76 m. I did concern this when i computed Stokes II. best frederik |
|
November 1, 2014, 23:39 |
|
#10 | |
Senior Member
|
Hello Frederick
thanks! your results looks really good and encouraging. would you please use sample utility in OpenFOAM to plot out the surface elevation at one certain time and show me you velocity plot in your numerical flume? here are the setup and results I tried to repeat what you have done geometry and mesh parameters: Code:
Lx=25m, Ly=0.75m(water)+0.3m(air), Lz=0.1m(2D, 1 cell with two empty bc) Nx=715, Ny=105 dx=3.5cm, dy=1cm dt=0.004s Code:
seaLevel 0; relaxationNames ( inlet outlet ); initializationName outlet; inletCoeffs { waveType stokesSecond; Tsoft 2; depth 0.75; period 2; direction ( 1 0 0 ); phi 0; height 0.125; waveNumber (1.32539 0 0); omega 3.14159; debug true; relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType INLET; startX ( 0 0 -1 ); endX ( 5 0 1 ); orientation ( 1 0 0 ); } } outletCoeffs { waveType potentialCurrent; U ( 0 0 0 ); Tsoft 2; relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType OUTLET; startX ( 20 0 -1 ); endX ( 25 0 1 ); orientation ( 1 0 0 ); } } I think it is a bit tricky to look at the time history since the discrepancy is fixed. while at surface elevation at whole flume show an "advection" effect of discrepancy to the downstream and for you case the wave length is around 4.5 meters, so roughly 3 waves are freely developed in the numerical wave flume,which may not enough to show the how does discrepancy evolve. figure_1.jpg figure_2.jpg here also I put my parameters with the same case, say geometry and mesh parameters of mine: Code:
Lx=46m, Ly=0.5m(water)+0.2m(air), Lz=0.1m(2D, 1 cell with two empty bc) Nx=2300, Ny=105 dx=2cm,dy=0.67 cm N_waveLength=134, N_waveHeight=18 (a bit smaller, but from the results seems not affect the wave height) waveProperties of mine: Code:
seaLevel 0; relaxationNames ( inlet outlet ); initializationName outlet; inletCoeffs { waveType stokesSecond; Tsoft 2; depth 0.5; period 1.44; direction ( 1 0 0 ); phi 0; height 0.12; waveNumber (2.34995 0 0); omega 4.36332; debug true; relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType INLET; startX ( 0 0 -1 ); endX ( 3 0 1 ); orientation ( 1 0 0 ); } } outletCoeffs { waveType potentialCurrent; U ( 0 0 0 ); Tsoft 2; relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType OUTLET; startX ( 43.55 0 -1 ); endX ( 46 0 1 ); orientation ( 1 0 0 ); } } figure_3.jpg /Wei Quote:
Last edited by waynezw0618; November 2, 2014 at 08:38. |
||
November 3, 2014, 04:54 |
|
#11 |
Senior Member
|
Hi Niels:
it is suggested to turn off hot start parameter Tsoft for regular wave? I am using it now, seems first several wave are relative to those then it may not follow the dispersion relation. so once these first several waves enter into the domain, they will be modulated. The energy are not balanced within these waves and remain in the flume. could it be due to this? /Wei Last edited by waynezw0618; November 3, 2014 at 06:42. |
|
April 29, 2015, 10:01 |
|
#12 | |
New Member
Julietta
Join Date: Nov 2014
Posts: 3
Rep Power: 12 |
Quote:
would it be possible to have a look at your fvSolution and fvSchemes files? I am also simulating waves but they don't quite match the theory yet as yours do... And I am lost in trying which parameters are having an influence on the wave quality. Your help will be greatly appreciated. Thanks, Julietta |
||
May 1, 2015, 01:00 |
|
#13 |
New Member
Pablo Montalvo
Join Date: Feb 2015
Location: Taiwan
Posts: 9
Rep Power: 11 |
Hello Julietta,
In what way the input doesn't match the output? Are you using the wave theories in waves2Foam or making a new one? I used the stokes second order at first and modified it, and noticed that the wave height did not match what I asked. I had to fiddle around the fv files quite a lot to improve the result. Changed the smoother, added relaxation factors, changed laplacian schemes. It is better but not perfect, I simulate waves in extreme conditions so I guess I have to tailor it. Still, Frederik, I am also interested in your answer! |
|
May 6, 2015, 10:28 |
|
#14 | |
New Member
Julietta
Join Date: Nov 2014
Posts: 3
Rep Power: 12 |
Quote:
I am using StokesI theory from the waves2Foam toolbox. Some plots of my result are attached. My inlet relaxation zone is 1 wave length (all the negative part) and the outlet relaxation zone is 0.5 wave length wave height: 0.55m wave length: 13.8m cells per wave height: 9 cells per wave length: 72 As I said, I have been playing around, but can't really get closer. Would you think that a finer grid might reduce the dissipation of the waves? Any idea why the waves are being 'streched' over the length of the tank? Thanks for your help! |
||
May 11, 2015, 22:44 |
|
#15 |
New Member
Pablo Montalvo
Join Date: Feb 2015
Location: Taiwan
Posts: 9
Rep Power: 11 |
@giu I have no idea why the waves do that, there is indeed some dissipation. Have you tried with a very low steepness? In your case say, same wavelength, wave height < 0.25? For the grid, I am not sure, your parameters do not indicate a coarse grid. I would look further into the fvSolution/fvScheme files and maybe use higher-order schemes. That's all I can say from my experience.
Last edited by wyldckat; October 7, 2018 at 14:59. Reason: removed answer to another post that was on the main thread |
|
May 13, 2015, 05:44 |
|
#16 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Good morning,
@Giu: Please consider, whether first order Stokes is even valid in your case. It is the common error that other users commit. Kind regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. Last edited by wyldckat; October 7, 2018 at 14:59. Reason: removed answer to another post that was on the main thread |
|
May 24, 2015, 11:21 |
|
#17 |
Member
Ali
Join Date: Oct 2013
Location: St John's Canada
Posts: 31
Rep Power: 13 |
Hi Julietta,
I am also using waves2Foam to simulate different wave height of different frequency. I have the same problem as you, I could not get a satisfactory wave profile for single .I couldn't figure out my mistake in script file. If you don't mind, can you share your experience? Ali |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure for wave height in an Water Wave Tank | Cluain | CFX | 8 | December 6, 2021 04:58 |
[waves2Foam] Waves2Foam Related Topics | ngj | OpenFOAM Community Contributions | 660 | August 20, 2018 13:39 |
detonation wave simulation | Krish | FLUENT | 15 | February 7, 2017 13:38 |
WAVE TANK star-ccm+ . wave height dampens. WHY? | muhsin | STAR-CCM+ | 3 | October 9, 2012 14:24 |
active wave absorb(about wave tank) | zhaochuangang | ANSYS | 0 | September 22, 2010 03:29 |