Simulating Pressure Transient(FORTRAN 95)

  • Thread starter Tom0395
  • Start date
  • Tags
    Pressure
In summary, the speaker is working on a project to simulate pressure surges in pipelines and is seeking help with identifying an issue in the second code. There are two scenarios being focused on: instantaneous valve closure with a step function and gradual valve closure with a linear function. The codes for both programs are provided. The speaker is not having any issues with Program 1, but Program 3 is showing a straight line trend for downstream pressure when it should be a mirror image. They are seeking help and wondering if they should post elsewhere.
  • #1
Tom0395
1
0
Hi,

I am currently working on a project to simulate pressure surges in pipelines, and I was hoping if someone could point out what is wrong with the second code.

There are 2 scenarios that I am focusing on right now, one is where the valve closes instantaneously and the closure function is a step. Please refer to P1.jpg which is attached, and ignore the valve on the right. The second is for gradual valve closure with the same scenario as P1.jpg, and the closure function is linear as seen in C1.jpg. The codes for both programs are given in Program1.txt and Program3.txt respectively.

For Program 1, I am not having any problems, but for Program 3, the upstream pressure is okay while downstream pressure trend is a straight line when it should have been something close to a mirror image along x axis.

Really appreciate your help here. Thanks.

Regards,
Tom

PS. I was wondering if I should post this somewhere instead. If i should please let me know! Thank you.\
 

Attachments

  • P1.jpg
    P1.jpg
    6.2 KB · Views: 463
  • c1.jpg
    c1.jpg
    25.3 KB · Views: 450
  • Program1.txt
    5.6 KB · Views: 462
  • Program3.txt
    8.4 KB · Views: 468
Engineering news on Phys.org
  • #2
Thanks for the post! Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post?
 

FAQ: Simulating Pressure Transient(FORTRAN 95)

What is FORTRAN 95 and why is it used for simulating pressure transients?

FORTRAN 95 is a programming language commonly used for scientific and engineering applications, including simulating pressure transients. It is specifically designed for complex mathematical and scientific computations, making it well-suited for simulating dynamic systems such as fluid flow and pressure changes.

What are the steps involved in simulating pressure transients using FORTRAN 95?

The steps for simulating pressure transients using FORTRAN 95 typically include defining the system properties, setting up the equations to be solved, writing the code in FORTRAN 95, compiling the code, and running the simulation. The output of the simulation can then be analyzed to understand the pressure changes over time.

How accurate are simulations of pressure transients using FORTRAN 95?

The accuracy of the simulation depends on the quality of the input data and the complexity of the system being simulated. FORTRAN 95 is a powerful language that allows for precise mathematical calculations, but it is still important to validate the results of the simulation against real-world data to ensure accuracy.

Can FORTRAN 95 be used to simulate pressure transients in different types of systems?

Yes, FORTRAN 95 can be used to simulate pressure transients in a variety of systems, including pipelines, oil and gas reservoirs, and hydraulic systems. It can also be used to model different types of fluids, such as gases and liquids, and factors such as temperature and viscosity can be incorporated into the simulation.

Are there any limitations or challenges when using FORTRAN 95 for simulating pressure transients?

One potential limitation is the steep learning curve for those who are not familiar with FORTRAN or programming in general. Additionally, the accuracy of the simulation can be affected by the assumptions and simplifications made in the model. It is important to carefully consider the input data and validate the results to ensure the simulation accurately represents the real-world system.

Similar threads

Back
Top