CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Can someone help to check this code on Roe solver (https://www.cfd-online.com/Forums/main/218288-can-someone-help-check-code-roe-solver.html)

cfdnewb123 June 14, 2019 21:20

Can someone help to check this code on Roe solver
 
The code is found here,
https://ir.cwi.nl/pub/10964/10964D.pdf

I am trying to write my own code for Roe solver on Matlab and I have been using this paper as a guide. However when I run the code from this paper on Fortran 95, it ran into some floating point error. As I am not familiar with Fortran, I am wondering whether can someone help me check the validity of the code over here.

I am working on the Sod shock tube in particular.

FMDenaro June 15, 2019 03:34

Quote:

Originally Posted by cfdnewb123 (Post 736319)
The code is found here,
https://ir.cwi.nl/pub/10964/10964D.pdf

I am trying to write my own code for Roe solver on Matlab and I have been using this paper as a guide. However when I run the code from this paper on Fortran 95, it ran into some floating point error. As I am not familiar with Fortran, I am wondering whether can someone help me check the validity of the code over here.

I am working on the Sod shock tube in particular.


First, depending on the compiler, use all the options to debug the code. Disable all optimizations and use the checkbound for arrays and other setting for the floating points errors in the link procedure

cfdnewb123 June 15, 2019 04:20

Quote:

Originally Posted by FMDenaro (Post 736330)
First, depending on the compiler, use all the options to debug the code. Disable all optimizations and use the checkbound for arrays and other setting for the floating points errors in the link procedure

I am sorry I don't really get this as I am still new to Fortran. I am using FTN95 (https://www.silverfrost.com/). I have try to debug the code but as I am using this paper as I guide, it is really hard for me to know whether the code is correct or not.

FMDenaro June 15, 2019 04:23

Quote:

Originally Posted by cfdnewb123 (Post 736332)
I am sorry I don't really get this as I am still new to Fortran. I am using FTN95 (https://www.silverfrost.com/). I have try to debug the code but as I am using this paper as I guide, it is really hard for me to know whether the code is correct or not.




If you compile correctly the source code, there is no conflict in the FTN95 language. You need to check the error in the run-time procedure.
Use the specific debug options in compiling the source, see here https://www.silverfrost.com/ftn95-he...lassified.aspx


All times are GMT -4. The time now is 13:24.