|
[Sponsors] |
[waves2Foam] 5th Order Stokes Wave Initialization |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 14, 2015, 12:08 |
5th Order Stokes Wave Initialization
|
#1 |
Member
Join Date: Dec 2009
Posts: 49
Rep Power: 16 |
Ni Niels,
I want to initialized by simulation with a stokes 5th order theory over the whole domain. I want to shift the initial solution by specifying the phi value. However, it seems that I can't do it for the stokes 5th, the initialized solution is the same as when the phi is zero. It works without any problem for the 2nd order stokes theory though. Part of the waveProperties.input dictionary is as follows: Code:
relaxationNames ( inlet outlet ); initializationName inlet; pName p_rgh; inletCoeffs { waveType stokesFifth; Tsoft 0.00; depth 1.50; period 1.00; phi 3.1416; direction (1.0 0.0 0.0); height 0.10; stokesDrift 0.00; relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType INLET; startX ( -5.0 -99.0 -99.0); endX ( -4.0 99.0 99.0); orientation ( 1.0 0.0 0.0); } }; Kind regards, katakgoreng |
|
August 15, 2015, 04:42 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Good morning Katakgoreng,
Unfortunately I do not have access to the source code at the moment, but a bug is likely. You will get the quickest answer by looking into the source code yourself. According to the wiki 'phi' is accepted as a variable (even required). 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. |
|
August 17, 2015, 00:34 |
|
#3 |
New Member
Pablo Montalvo
Join Date: Feb 2015
Location: Taiwan
Posts: 9
Rep Power: 11 |
Hello Katakgoreng,
in StokesFifth.C, the cosine argument is defined for eta and U as Code:
scalar arg((k_ & x) - omega_*time); Code:
scalar arg((k_ & x) - omega_*time + phi_); |
|
August 17, 2015, 04:59 |
|
#4 | ||
Member
Join Date: Dec 2009
Posts: 49
Rep Power: 16 |
Quote:
I guess it is a bug as pointed out by Pablo. Quote:
Many thanks for pointing this out. I added phi to both eta & U routine, recompile & it works now. Kind regards, katakgoreng |
|||
August 17, 2015, 05:06 |
|
#5 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Good morning
Thank you for the bug-fixing to Pablo and Katakgoreng. I will put it on the list, so it is corrected, when I make the next update of the code. Small question: Have you written it as "+ phi" or "- phi" and is it behaving as expected in terms of the shift in the free surface, when you give a small value of phi; e.g. phi = 0.1 = displacement in the propagation direction? Could you please check this for me, now that you have it all up and running? Thank you and 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. |
|
August 17, 2015, 06:26 |
|
#6 |
Member
Join Date: Dec 2009
Posts: 49
Rep Power: 16 |
Hi Niels,
My implementation of phi for Stokes Fifth is as follows: Code:
scalar arg((k_ & x) - omega_*time + phi_); The plot of eta vs x for all cases (Stokes Fifth): I ran the same cases for Stokes 2nd Order and got the following result: Hmmm..I guess the implementation for stokes fifth should be -phi then.. Kind regards, katakgoreng |
|
August 17, 2015, 06:40 |
|
#7 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Thank you very much for this very clear analysis. I will adjust the stokesFifth theory with "-phi", when I am back at a computer with OF. This is a minor change, so the change will be communicated through the Wiki:
http://openfoamwiki.net/index.php/Co..._.28History.29 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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[IHFOAM] The IHFOAM Thread | Phicau | OpenFOAM Community Contributions | 392 | September 8, 2023 19:10 |
VOF wave getting damped. | arun7328 | STAR-CCM+ | 16 | July 8, 2019 16:06 |
Weird time step initialization behavior - Wave generation model | liadpaskin | CFX | 3 | July 11, 2015 07:21 |
weno upwind 5th order 1 d code | Chi | Main CFD Forum | 1 | March 11, 2007 23:44 |
4th and 5th Order TVD Runge-Kutta Methods | saygin | Main CFD Forum | 2 | January 30, 2006 12:45 |