LHEEA / HOS-NWT

Numerical Wave Tank based on High-Order Spectral method
GNU General Public License v3.0
48 stars 25 forks source link

How to determine the value of n1, n2 and n3 in the 'common_vars.f90' #22

Open yayihhu opened 4 years ago

yayihhu commented 4 years ago

Hello,Thank you for sharing this source to the public .I'm using this model and I'm having some problems: when I simulated long time evolution from the case3-file , the wave elevations has been a marked decline and oblique rise, when I increase the n1 the phenomenon improved obviously but there are still a slight decline (Fig. 1 -2), I guess as the effect of n1 or n3 led to a decline or rise, but I did not find in your papers about how to determine the value of n1. I am looking forward to your reply

Fig1 Fig2

gducrozet commented 4 years ago

@yayihhu Sorry for my late reply.

At first, some questions: what is represented in your Figs. 1 & 2? Is it one direct output of the HOS-NWT model (for instance probes.dat)?

Then, can you provide the wave maker motion you input? It is possible to extract the temparl evolution of this wave maker motion as an output file (i_wmk in input file). It is possible that what you observe comes from a 'strange' wave maker motion.

Best regards,

Guillaume

yayihhu commented 4 years ago

Thank you for your sugestions. The figures are the ouput of the probes.dat, I think it's my problem ,little x-modes(n1=513) and high frequenciese(2Hz) in input file,which result in these phenomenons. Now I modified n1=1025, f=0.3~0.9Hz. But after days of trial and error, I have other questions about icase=3:

  1. How to determine the n1(what is mean 'number of modes/points'? modes per points or modes=points? ), n3 and mHOS?
  2. The parameters(like the ramp and typ_ramp) in wmk-cfg are all useful? and when the cfg don't agree with the input_HOS-NWT(Warning : Different basin width), which is decisive? 3.Connected to Q2, the beam(m) of the wavetank is half of the width of the wavetank?
yayihhu commented 4 years ago

Sorry,I've had some problems lately. When I run HOS-NWT with the wave-making file is shown in the attachment, the informations in the terminal window is inconsistent with the cfg file (in this case, the n1=8193, n2=1, n3=33, mHOS=3). How can I avoid this situation?

Hs4_Tp10.zip terminal window terminal window

gducrozet commented 4 years ago

At first, I advise you to look at the HOS-NWT publication for details about the parameters (even if the naming of variables may be slightly different). Some elements of answer:

  1. modes=points and n1 provides you the discretization of the domain in the x-direction. Similarly, n3 is the discretization used for the wave maker displacement. mHOS corresponds to the order of non-linearity for the solution of the wave propagation using HOS model. For the choice of parameters, usually one has to do a convergence study, since it depends on the level of accuracy you want to achieve. n1 has to be chosen with respect to the length of the domain in order to have around 30 points per wavelengths. n3 has to be chosen with respect to the shape of your wavemaker but usually n3=33 or 65 is sufficient. mHOS is chosen with resepct to the physical processes to be solved. It has to be chosen at least equal to 3 for non-linear simulations

  2. The easiest way is to set-up the same values! In some parts the input file may be used and in other parts it may be the cfg file. Then, I strongly advise to adjust to the same correct values.

  3. The beam of the tank is the total width

With respect to your last question, what is provided in the terminal are the dimensionless values of each parameter. In HOS-NWT the length scale is the water depth and the temporal scale is sqrt(L/g)

Best regards,

Guillaume.

yayihhu commented 4 years ago

Thanks for your detailed answers. I basically understand the meaning of n1, n2, n3, mHOS and the dimensionless. I'm sorry I have two more questions to ask you:

  1. I have read the two references you recommended on the website,but I still can't figure out the relationship between wave components and modes, I always thought components(the first value x in .cfg correspond to 2^x) are modes. May I ask the differences between components and modes?

  2. The orther question: n1≈30*Lx/Lmin (Lx: the lenght of the flume, Lmin: the minimun wave length in components) while I simulate the nonlinear evolutions of large scale (Lx~2000m), the n1 will be too high (~ 10^4) to run long time. In my case( Lx=2000, T_stop=1000, n1=4097), the elevation of probes see Fig.1(all probes), Fig.2(first probe) and Fig.3(fourth probe). Is the rise and fall of the wave elevation due to the small value of n1(4097<<10^4) or something else?

Best regards,

Liuyayi.

The attachments

case_example.zip

Fig1 Fig2 Fig3

gducrozet commented 4 years ago

Some elements of answer:

  1. There are two completely different notions: n1 corresponds to the horizontal discretization of the spatial domain. Since we are using pseudo-spectral method this is associated to the modal representation (number of modes) of the spatial domain and is consequently linked to the wavenumbers solved. On the other hand, the cfg file describes the temporal wave maker motion with the use of components understood as the different frequencies used to represent the wave maker motion. There is consequently not a direct link between those parameters. The link is actually obtained through the appropriate choice of horizontal discretization (i.e. the wave lengths you want to generate (which are link to the wave frequencies)).

  2. You need a sufficient number of points to get accurate results... Either you reduce the spatial and temporal extent of your study or you need to wait for the results to come out! Reducing too much the number n1 will results in wroing calculations so this is not a good option... You may be able to optimize the choice of parameters (n3, order of non-linearity of wave maker) to increase the efficiency but since it is case-dependent, you need to do small studies prior to do your complete calculations. By the way, what you observe on the wave probes is probably associated to the wave-maker motion you give as input (and not the choice of n1). This is low frequency components that you can try to filter before creating your .dat file (or you can use in the input file the nuc_low parameter once i_cut parameter is set to 1).

Best regards,

Guillaume

gducrozet commented 4 years ago

Edit, I have just seen that you sent the input file used and you only have three wave components, so this is actually another issue. What you observe at the start of the wavemaker, you probably generated a long wave, propagating at speed sqrt(g*h) and this is this wave that is recorded on your probes signals. So this is a physical effect that some authors have studied in the literature. I do not know if your set-up (wave-maker shape, etc.) is fixed. Otherwise, what may reduce this effect is:

Best regards,

Guillaume.

yayihhu commented 4 years ago

Through your answers,I basicly undertand the mean of components and modes/nodes. As the instability of the wave elevation, by means of longer time-ramp, I reduced the effect of a spurious long wave and the elevations are smoother. I think I need to study your articles carefully about the HOS-NWT. Thanks for your detailed answers.

Best regards,

Liuyayi.

yayihhu commented 4 years ago

Dear Guillaume: Thanks for your detailed answers before. I think I have basically mastered the customed wave making method from the .cfg file. But I encountered two new problems when I studied the kinematics of wave motion.

Best regards,

Liuyayi.

gducrozet commented 4 years ago

Dear Liuyayi,

Sorry for the delay, I thought I answered to those questions. Regarding your specific questions :

Best regards,

Guillaume

yayihhu commented 4 years ago

It's okay. Thank you for your specific answers. I have read the velpress routine, but there're still some issues I don't understand , which results from I'm poor at numerical analysis.

Best regards,

Liuyayi

gducrozet commented 4 years ago
  1. Inside the program, everything is indeed done dimensionless (with respect to water depth and gravity). The velocity calculation has been detailed here: https://tel.archives-ouvertes.fr/tel-00263596 (in french) and the preliminary results are available here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.660.3794&rep=rep1&type=pdf (see references herein)
  2. The method used for velocity calculation is not restricted to the mean free surface position, but can evaluate the kinematics up to the exact free surface location.
  3. Tecplot was initially used for graphical outputs (and the output files are currently designed for this program). Note that Grid2Grid is not a graphical program, it is just providing output files, that are to the VTK format and can possibly be used with Paraview.

Best regards,

Guillaume

yayihhu commented 4 years ago
 Thank you for your answers. I will read the references carefully (due to the network, the literature download has encountered some problems). 

Best regards,

Liuyayi

gducrozet commented 4 years ago

@yayihhu

Best regards,

Guillaume

yayihhu commented 4 years ago

@gducrozet

Thanks for your attached layout file. It's worked.

Best regards,

Liuyayi

gducrozet commented 4 years ago

@yayihhu

Best regards,

Guillaume

yayihhu commented 4 years ago

Best regards,

Liuyayi

yayihhu commented 4 years ago

@gducrozet