CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Other] Numerical wave tank simulating linear waves with cyclic boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2024, 08:18
Default Numerical wave tank simulating linear waves with cyclic boundary conditions
  #1
New Member
 
abdulsalam musaad
Join Date: Mar 2024
Posts: 8
Rep Power: 2
AbdoMusaad is on a distinguished road
Hi everyone! i am new to OpenFoam (first Thread).

I am trying to simulate a 2D Numerical wave tank with cyclic boundary conditions for the inlet and the outlet. i started from the stokes 1 example of OpenFoam v2306. in the example the waves are generated at the inlet.


So, my problem now is how can i create the waves without the waveAlpha condition at the inlet? should i create a nonuniform alpha.water , p_rgh , U files? and how can i do that in a practical way? i tried running the stokes 1 example until it reaches a developed stage, then change the boundary conditions in the fields files. but i could not make it to work and it is not ideal for my intended use. ideally i want to impose the theoretical stokes 1 solution and see how much the numerical solution will deviate form the theoretical solution due to spatial and temporal discretisation excluding the wave generation and absorption errors.


sorry if it is a basic question.



it would be very helpful if you can provide me with examples. Thanks in advance.
AbdoMusaad is offline   Reply With Quote

Old   March 31, 2024, 16:07
Post posting my solution for reviewing
  #2
New Member
 
abdulsalam musaad
Join Date: Mar 2024
Posts: 8
Rep Power: 2
AbdoMusaad is on a distinguished road
I am posting my solution to this problem for reviewing, suggestions and hopefully the benefit of others. Note that i am not 100% sure if this is the best and most correct way to do it. but it looks fine from what i saw.



what i did basically is initializing the VOF (alpha) and the velocity at time zero using codeStream and let openfoam deal with calculating the pressure. i relied on "water wave mechanics for engineering and scientists" as a reference for the theoretical equations of the velocity and water surface shape.


Cheers
Attached Files
File Type: zip stokesIAnalyticalCyclicalBC.zip (19.4 KB, 5 views)

Last edited by AbdoMusaad; March 31, 2024 at 17:12.
AbdoMusaad 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
v10 pimpleFOAM: Rotational cyclicAMI boundary conditions face Weight going to 0 nialloneill OpenFOAM Running, Solving & CFD 2 January 23, 2024 18:53
psi in the rhoThermo class cryabroad OpenFOAM Running, Solving & CFD 10 October 21, 2020 06:09
CFD analaysis of Pelton turbine amodpanthee CFX 31 April 19, 2018 19:02
Radiation interface hinca CFX 15 January 26, 2014 18:11
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44


All times are GMT -4. The time now is 02:53.