# Please help me with this fluid dynamics Fortran assignment

I was unable to participate my Fortran lectures given by my school and now they have send me two assignments to complete , I want some help from you people. This is my problem, can i get some help to make a Fortran program to this, i have no idea how to do that.

Please help me with these two questions. The below is a sample of the pdf but it won’t contain all the details that are inside the pdf , but below text may help you to understand about the problem.

The attached hydro code solves the one-dimensional equations of fluid dynamics using Godunov’s method. Its current capabilities include

• the Kurganov-Tadmor central scheme as an approximate Riemann solver,

• 1st-order step function reconstruction (default) or 2nd-order piecewise-linear recon-struct ion using the minmod slope limiter,

• a second-order time integration scheme,

• a choice of different boundary conditions.

The code uses a perfect-gas equation of state P = — 1)pc with -y = 5/3, The code contains comments, but there is no further documentation. Understanding the code based on what you have learned during the lectures is part of the assignment task.

1. Sound waves
(a) use the code to simulate a travelling sound wave in a periodic 1D domain E [0, 1] by adopting initial conditions of the form
p -I- A cx)] v = A Sin(27r.r) 7 — 1 P = Pr, [I -I- A— sin( 2.7rz)li
where pr, = 1. Make sure Po and €0 are set such that the sound speed coi = 1. Set A = 10-4, Use first-order step function reconstruction. Plot your solution for t E{0, 1, 2,3, in 5} in code units.

(b)

Repeat the calculation with A = 10-1, again usin.g first-order step function reconstruction. Compare the time to shock formation with what you expect from theory.

Can you please post the pdf elsewhere? I clicked on that link and it seems to lead to a phishing site.

sure but actually that’s not a phising site anyway what you prefer

Hi @yehanwasura, thank you, the link now works. Welcome to the site.

The best way forward I think is if you start writing your initial attempt and do your best, and then ask here when you get stuck. Do you know how to create a simple Fortran program, compile it and run it?

1 Like

@certik yes sure I know, and I really love Programming and I know Python as well but , today night is the last lecture so we must present our program , at least one problem. Otherwise I will get detention, please can you right a program for this and comment those special lines , I also have a book so I can refer it as well to study the code …

Hi Certik
yes sure I know, and I really love Programming and I know Python as well but , today night is the last lecture so we must present our program , at least one problem. Otherwise I will get detention, please can you right a program for this and comment those special lines , I also have a book so I can refer it as well to study the code …

ok no need of fortran codes, just explain me what should i do here, in just simply. Just using simple pseudo code or some what

Hi @yehanwasura and welcome!

Can you work through the quickstart tutorial on the Fortran website? It should get you far–it covers all the language elements that you need.

Alternatively, I have a free ~100-page ebook here that covers the basics and should be helpful as well.

1 Like