# [waves2Foam] Internal Solitary Wave

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 8, 2014, 10:50 Internal Solitary Wave #1 New Member   AI Join Date: Jun 2014 Posts: 17 Rep Power: 12 Dear Niels, Thank you for developing the waves2Foam tool box, very helpful. I'd like to simulate internal solitary wave in the ocean, the equations are very similar to the solitaryFirst theory you have in waves2Foam but with minor modifications to account for the small difference in densities of the upper and lower layers of the flow (1000 & 1025) and the depth of each layer. I was able to make the changes and run a test case but I can see velocities are initialized in the lower layer only. I was wondering if you can point me in the correct direction to be able to initialize the velocities in the top layer as well. I have used the following equations for the velocities in the waves theory ".C" file: scalar Z(returnZ(x)); scalar etaVal = eta(x,time); scalar Uhorz(0.0); if (Z < etaVal) Uhorz = (c0_/h2_)*((H_*(-1.0))/Foam:ow( cosh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_) ,2.0)); else Uhorz = (c0_/h1_)*(H_*1.0/Foam:ow( cosh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_) ,2.0)); scalar Uvert(0.0); if (Z < etaVal) Uvert = (c0_/h2_)*((H_*(-1.0))/Foam:ow( cosh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_) ,2.0)) * (Foam::tanh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_)) * (2*(Z +h2_)/ww_); else Uvert = (c0_/h1_)*(H_*1.0/Foam:ow( cosh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_) ,2.0)) * (Foam::tanh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_)) * (2*(Z +h1_)/ww_); return Uhorz*propagationDirection_ - Uvert*direction_; Thank you, Ahmed Last edited by sherif35; December 8, 2014 at 12:55.

 December 9, 2014, 04:04 #2 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Copenhagen, Denmark Posts: 1,901 Rep Power: 37 Hallo Ahmed, It is the relaxationScheme-classes that you have to look into. E.g. Code: waves2Foam/src/waves2Foam/relaxationZone/relaxationScheme/spatial Here, you will find that I have hard-coded that the velocity in the air vanishes, so modifying this classes (or creating a new), should solve your problems. Happy to hear feedback, if you can get it to work or not. I had never imagined that the toolbox would be used to study internal waves. 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.

February 26, 2023, 04:12
#3
New Member

ysh
Join Date: Nov 2022
Posts: 5
Rep Power: 3
Quote:
 Originally Posted by sherif35 Dear Niels, Thank you for developing the waves2Foam tool box, very helpful. I'd like to simulate internal solitary wave in the ocean, the equations are very similar to the solitaryFirst theory you have in waves2Foam but with minor modifications to account for the small difference in densities of the upper and lower layers of the flow (1000 & 1025) and the depth of each layer. I was able to make the changes and run a test case but I can see velocities are initialized in the lower layer only. I was wondering if you can point me in the correct direction to be able to initialize the velocities in the top layer as well. I have used the following equations for the velocities in the waves theory ".C" file: scalar Z(returnZ(x)); scalar etaVal = eta(x,time); scalar Uhorz(0.0); if (Z < etaVal) Uhorz = (c0_/h2_)*((H_*(-1.0))/Foam:ow( cosh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_) ,2.0)); else Uhorz = (c0_/h1_)*(H_*1.0/Foam:ow( cosh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_) ,2.0)); scalar Uvert(0.0); if (Z < etaVal) Uvert = (c0_/h2_)*((H_*(-1.0))/Foam:ow( cosh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_) ,2.0)) * (Foam::tanh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_)) * (2*(Z +h2_)/ww_); else Uvert = (c0_/h1_)*(H_*1.0/Foam:ow( cosh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_) ,2.0)) * (Foam::tanh(((-1.0)*c_*time + ((x - x0_) & propagationDirection_))/ww_)) * (2*(Z +h1_)/ww_); return Uhorz*propagationDirection_ - Uvert*direction_; Thank you, Ahmed
Dear Ahmed,
I wonder if you've been successful in simulating internal solitary wave in the ocean.If you succeed, would you please share your experience with me?
Any help would be appreciated.
Thank you,
Ysh

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Dronzer STAR-CCM+ 0 September 30, 2017 03:28 Ted Chu FLUENT 2 September 27, 2016 02:45 premal Main CFD Forum 0 April 15, 2014 09:31 Kourosh Hejazi Main CFD Forum 4 July 24, 2003 14:37 mehdi icho Main CFD Forum 0 July 2, 2002 04:35

All times are GMT -4. The time now is 01:30.