|
[Sponsors] |
test full code about conversation f77 to f90 pls, |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 20, 2017, 03:40 |
test full code about conversation f77 to f90 pls,
|
#1 |
New Member
bob
Join Date: Oct 2017
Posts: 18
Rep Power: 9 |
i have a code ,can you run it . with your compiler ,it was f77 i convent it to f90
seems have small mistake , i put .the original website for code : f77 and also put zip code for f90 f90 code: JOUKOWSKY.zip website of f77 code : http://www.laboratoridenvol.com/info...kowsky.en.html |
|
October 20, 2017, 04:02 |
|
#2 |
Senior Member
Join Date: Oct 2011
Posts: 242
Rep Power: 17 |
Hello,
I think you misunderstood the meaning of my answer in your previous thread . When I compile your new fortran file I have the following output: Warning: Deleted feature: End expression in DO loop at (1) must be integer To make it short, what this means is that real indexing is no longer supported by the current fortran standard. When you have DO i=a,b,c . a, b and c should be integer variables and not real variables as it is in your code. As such your new version is not fortan 90. I suggested you a way of modifying these loops in your previous thread. Nevertheless, your code compiles without warnings by forcing the compiler to deal with f77 instructions: gfortran -std=legacy JOUKOWSKY.f95 and the resulting coordinates file looks correct |
|
October 20, 2017, 04:23 |
|
#3 |
New Member
bob
Join Date: Oct 2017
Posts: 18
Rep Power: 9 |
thanks .but where i shoud put "gfortran -std=legacy JOUKOWSKY.f95"
which part of code,,you know im new in FORTRAN ..pls ..show me where .. if you talk with example and show .in real code i can understand better your mean thank u |
|
October 20, 2017, 05:08 |
|
#4 |
Senior Member
Join Date: Oct 2011
Posts: 242
Rep Power: 17 |
gfortran is a fortran compiler. So the command gfortran -std=legacy JOUKOWSKY.f95 compiles your file JOUKOWSKY.f95 into an executable. The option -std=legacy is an option which tells the compiler to take into account old fortran code.
If you are using linux, you execute this command into the terminal: gfortran -std=legacy JOUKOWSKY.f95 -o prog This will give you an executable called prog. You then execute the program with the command ./prog. |
|
October 20, 2017, 05:41 |
|
#5 | |
New Member
bob
Join Date: Oct 2017
Posts: 18
Rep Power: 9 |
Quote:
|
||
October 20, 2017, 06:14 |
|
#6 |
New Member
bob
Join Date: Oct 2017
Posts: 18
Rep Power: 9 |
whats wrong with my code , seems all need i done but still has error
look at it : NACA AIRFOIL DESIGN.zip also : base of 5-digit airfoil equations is also same with 4 digit airfoil and all is in this link : http://www.aerospaceweb.org/question...ls/q0041.shtml Last edited by batuning; October 20, 2017 at 15:02. |
|
October 20, 2017, 16:57 |
|
#7 |
Senior Member
Join Date: Oct 2011
Posts: 242
Rep Power: 17 |
There are many mistakes in your code, the basic structure itself would be for example like this:
PROGRAM example IMPLICIT NONE INTEGER, PARAMETER :: imax=10 REAL :: a,b,c ! scalars REAL :: d(imax) ! array CALL example_routine(imax,a,b,c,d) END PROGRAM example SUBROUTINE example_routine(imax,a,b,c,d) INTEGER :: imax REAL :: a,b,c REAL :: d(imax) END SUBROUTINE example_routine yt is an array but you declare it as a scalar. Look at the example above and also at the file JOUKOWSKY you attached in a prevous message. I can help you with specific questions regarding coding. But you should first make the effort of reading and learning the basics, there are many resources online to start with: http://pages.mtu.edu/~shene/COURSES/...F90-Basics.pdf http://nci.org.au/user-support/train...amming-basics/ |
|
October 21, 2017, 01:26 |
thank you
|
#8 |
New Member
bob
Join Date: Oct 2017
Posts: 18
Rep Power: 9 |
i do that you said ,
i have final code ,but i don't understand what is " np" ..if no need i can change it also why i dont see any result ..i need x and y code(numbers ) like this " X------------ Y 0.000000 -4.582653 - 0.000500 - 3.151760 - . . . " here the code: NACA AIRFOIL DESIGN.zip |
|
October 21, 2017, 06:26 |
|
#9 |
Senior Member
Join Date: Oct 2011
Posts: 242
Rep Power: 17 |
Hello, have a look to the example structure I put in my previous message. In the main program, you have to CALL the subroutine otherwise nothing happens. Something like this:
program airfoil IMPLICIT NONE INTEGER,PARAMETER :: np=10 REAL, DIMENSION(np):: xtop, ytop, xbot, ybot REAL, DIMENSION(np) :: x CALL MakeFoil(xbot,ybot,xtop,ytop,np,x) end program airfoil Please carefully check what you are doing in the code makes sense. At the end of the routine you print to the screen x. What is x ? Is it declared ? Is it given a value somewhere ? |
|
October 21, 2017, 06:32 |
|
#10 |
Senior Member
Join Date: Oct 2011
Posts: 242
Rep Power: 17 |
What is np ? What you want in the end are the coordinates x and y of your airfoil top and bottom. You airfoil obeys an equation of the form y(x). The exit variables are xtop( : ), ytop( : ), xbot( : ) and ybot( : ). The size of these arrays is np. So np is the number of points on the x axis, e.g. the resolution, the accuracy you get on the geometric description.
|
|
October 21, 2017, 06:36 |
|
#11 |
New Member
bob
Join Date: Oct 2017
Posts: 18
Rep Power: 9 |
thanks .
i repair the code ..seems no error ,.. the result numbers aren't true numbers i think ...i guess it should show numbers in 2 columns ..or 2 arrays or something like that ... like this : number----------number number----------number number----------number . . . whatever,the important thing is make true numbers and create that. that " print x " on my previous code was for test to show result ....was nothing serious i deleted it and put new one is the result numbers true? can you run in plotter?: result.zip here the final code : Attachment 59134 Last edited by batuning; October 21, 2017 at 17:09. |
|
Tags |
fortran 90, fortran code |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Looking for good Test Cases for Code Validation | Spacegirl1923 | Main CFD Forum | 4 | August 28, 2013 22:17 |
A new test harness for OpenFOAM | mbeaudoin | OpenFOAM Announcements from Other Sources | 0 | June 17, 2010 11:36 |
critical error during installation of openfoam | Fabio88 | OpenFOAM Installation | 21 | June 2, 2010 04:01 |
Compressible Viscous Code vaidation test cases? | Mohammad Kermani | Main CFD Forum | 2 | November 11, 1999 15:22 |
State of the art in CFD technology | Juan Carlos GARCIA SALAS | Main CFD Forum | 39 | November 1, 1999 15:34 |