Re: what is wrong with this code?can someone walk me through this?
- From: e p chandler <epc8@xxxxxxxx>
- Date: Wed, 26 Mar 2008 21:21:53 -0700 (PDT)
On Mar 26, 10:08 pm, madhu0...@xxxxxxxxx wrote:
i did not use any diagnostic program. i dont even know anything abt
it. i dont know anything abt fortran or coding..this is my project at
school thats due in 20days..cani run this code on any compiler, i mean
is it compatible with any? shud it return the same values on any
compiler?
pls bear with my silly questions, i am very stressed out abt this..
You CAN get your program to compile if you
1. remove leading spaces on each line
2. change
EXTERNAL FX, FY, DERIV_FX, DERIV_FY
to
EXTERNAL FX, FY
3. compile as free format source
DERIV_FX and DERIV_FY are variables NOT functions passed as arguments
to routines so there is no need to make them EXTERNAL.
Making the numerical changes suggested by others DOES not make any
difference in the output except for trailing digits for the value of
Stokes.
When I compiled and ran the program it printed:
*** Parameters read from file particle.par
***
The Stokes is equal to:
0.0006589939662307433
n_t= 1. y= 0.000023255106965997813
n_t= 0.995 y= 0.000023138831431167825
n_t= 0.990025 y= 0.000023023137274011985
n_t= 0.985074875 y= 0.000022908021587641927
n_t= 0.9801495006250001 y= 0.000022793481479703716
n_t= 0.9752487531218751 y= 0.0000226795140723052
n_t= 0.9703725093562657 y= 0.000022566116501943672
n_t= 0.9655206468094844 y= 0.000022453285919433955
n_t= 0.960693043575437 y= 0.000022341019489836785
Note that your value of Stokes is NOT between 0.1 and 2.0 as desired.
Maybe better input data will help. Maybe better values for other
constants will help.
Check the program listing against your formulas and equations. Verify
that your program is correctly transcribed.
Insert WRITE statements in the program to display the value of
variables as the program runs. Compare these to manual calculations.
What are reasonable ranges for the input variables? Try combinations
of LOW, MID and HIGH values for the input variables and see what you
get.
At this point there is no substitute for pouring over your program
listing and output with paper, pencil and a calculator.
With MINOR changes the program DOES compile. You don't have obvious
errors involving mismatched arguments to subroutines or common blocks
that do not match. You may have other
programming errors
logical errors
bad numerical behavior.
Other than the "Non-Fortran" flavor of your program, there is nothing
obviously wrong that jumps out except
goto 5
followed by
STOP. :-).
Good luck.
-- e
.
- Follow-Ups:
- Re: what is wrong with this code?can someone walk me through this?
- From: deltaseq0
- Re: what is wrong with this code?can someone walk me through this?
- From: c gordon liddy
- Re: what is wrong with this code?can someone walk me through this?
- From: Richard L Walker
- Re: what is wrong with this code?can someone walk me through this?
- References:
- what is wrong with this code?can someone walk me through this?
- From: madhu0319
- Re: what is wrong with this code?can someone walk me through this?
- From: e p chandler
- Re: what is wrong with this code?can someone walk me through this?
- From: madhu0319
- what is wrong with this code?can someone walk me through this?
- Prev by Date: Re: what is wrong with this code?can someone walk me through this?
- Next by Date: Re: what is wrong with this code?can someone walk me through this?
- Previous by thread: Re: what is wrong with this code?can someone walk me through this?
- Next by thread: Re: what is wrong with this code?can someone walk me through this?
- Index(es):
Relevant Pages
|
|