- #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.\
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.\