Fortran 1D Shallow Water Wave in FORTRAN using LAX WENDROFF Method

AI Thread Summary
The discussion focuses on simulating a 1D shallow water wave in FORTRAN using the Lax Wendroff Method, specifically addressing the challenge of implementing a reflective boundary condition at a wall. The user experiences a crash when the generated wave reaches the wall and seeks guidance on appropriate boundary conditions for variables h and A. Previous attempts using HNP1(1)=HNP1(2) and ANP1(1)=ANP1(2) were unsuccessful. Additional insights highlight that wave behavior upon reflection can vary based on the distance between the wave source and the reflecting surface, affecting wave interference patterns. The thread emphasizes the need for clarity on the variables and equations involved to resolve the boundary condition issue effectively.
Aun Muhammad
Messages
14
Reaction score
0
Hey everyone,

I’m trying to simulate a 1D Shallow Water wave in FORTRAN using the Lax Wendroff Method. The case is fairly simple. I have a wave generator on one end of a water pool and a wall boundary on another. The waves start traveling towards the wall and are ‘reflected off’ the wall. The problem which I’m facing is the Boundary Condition on the wall.

My generated wave starts traveling towards the wall and once it reaches the wall, my solution crashes. I need an appropriate ‘reflective boundary condition’ at the wall. As you guys already know, the Lax Wendroff Method employs a half time step. The governing PDE’s are attached in the image. The discretised equations are also attached.

Since h and A are the unknowns we are dealing with, I need the following BC at the wall:

HNP102(1)=? !1/2 Time Step, denotes n
ANP102(1)=? !plus half

and

HNP1(1)=? !full time step, denotes n
ANP1(1)=? !plus 1.

I read a similar code where
HNP1(1)=HNP1(2)
ANP1(1)=ANP1(2) was used but in my case it did not work.
 

Attachments

  • D2B028C8-4DF8-44DA-820C-B19CC329FA90.jpeg
    D2B028C8-4DF8-44DA-820C-B19CC329FA90.jpeg
    13.6 KB · Views: 562
  • F53685CF-7C30-41A0-9F81-6FC8812BB6CB.jpeg
    F53685CF-7C30-41A0-9F81-6FC8812BB6CB.jpeg
    13.6 KB · Views: 631
Technology news on Phys.org
What is your question?
 
The question is that what must be an appropriate 'reflective boundary condition' at the wall to simulate the reflection of the shallow water wave?
 
Aun Muhammad said:
Since h and A are the unknowns we are dealing with, I need the following BC at the wall:

HNP102(1)=? !1/2 Time Step, denotes n
ANP102(1)=? !plus half

and

HNP1(1)=? !full time step, denotes n
ANP1(1)=? !plus 1.

I read a similar code where
HNP1(1)=HNP1(2)
ANP1(1)=ANP1(2) was used but in my case it did not work.
This isn't very explanatory -- we have no idea what HNP102, ANP102, HNP1 and ANP1 are supposed to represent. In addition, the text in the two images you posted is too small to be legible, so those images aren't much help, either.

The behavior of a wave when it hits a reflecting surface depends on the number of wavelengths between the wave source and the reflecting surface. If the distance between source and reflector is an integral number of half-wavelengths, the reflecting wave will be out of phase with the following incoming wave, producing destructive wave interference. If the incoming wave hits the reflector at a high or low point, the reflection produces constructive reinforcement, resulting in a wave with twice the amplitude. It's been a long while since I've thought about this stuff, so I believe my explanation is correct.
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
I am trying to run an .ipynb file and have installed Miniconda as well as created an environment as such -conda create -n <env_name> python=3.7 ipykernel jupyter I am assuming this is successful as I can activate this environment via the anaconda prompt and following command -conda activate <env_name> Then I downloaded and installed VS code and I am trying to edit an .ipynb file. I want to select a kernel, via VS Code but when I press the button on the upper right corner I am greeted...
Back
Top