|
[Sponsors] |
April 5, 2008, 08:08 |
Read the density - fortran
|
#1 |
Guest
Posts: n/a
|
hi there,
please help. i think this is not a problem for the most user. but i do not know how to solve this. i have this loop inside my fortran file which describes a return variable. DO ILOC = 1,NLOC RET(ILOC,1) = 1004.4 + B*ARGS(ILOC,1) ENDDO now i want to influence that value by the density. how to read out the density out of the stack? i tried so much since weeks... getvar, user_getvar... nothing works. anyone a good idea? please please help! all the best ollimarc |
|
April 5, 2008, 12:55 |
Re: Read the density - fortran
|
#2 |
Guest
Posts: n/a
|
i=1 DO ILOC = 1,NLOC
RET(ILOC,1) = 1004.4 + B*ARGS(ILOC,1) newone(i)=density(f(RET(ILOC,1))) i=i+1 ENDDO |
|
April 5, 2008, 13:53 |
Re: Read the density - fortran
|
#3 |
Guest
Posts: n/a
|
hey rogerio,
thank you for your reply. but i do not know really how to use this. i want a real value inside of this loop like this i=1 DO ILOC = 1,NLOC RET(ILOC,1) = 1004.4 + B*ARGS(ILOC,1)+newone*0.1 ENDDO and this newone must be the actual density at that point. |
|
April 5, 2008, 14:05 |
Re: Read the density - fortran
|
#4 |
Guest
Posts: n/a
|
density has a name in cfx like time is t and temperature is T etc
i donīt know the name for density (give a look on tutorials of cfx5.6) cfx will pick up this value each time of your simulation, ok? |
|
April 5, 2008, 14:10 |
Re: Read the density - fortran
|
#5 |
Guest
Posts: n/a
|
this is a user CEL function and calculates throught all points in the mesh with the actual temperature (args..) and the then wanted density. i will try that again, thank you.
i must declare "newone(i)" as a real array. i tried "real newone(i)". but then i got the error message that this must be a dummy argument. since iam a newbie in this, i do not know how to do that. can you still help me with this? that would be very great!! thanks a lot! |
|
April 5, 2008, 14:12 |
Re: Read the density - fortran
|
#6 |
Guest
Posts: n/a
|
...and the compiler said that it has a problem with "f" and "density". must I declare that?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fortran 'list-directed I/O syntax error' (KIVA 3V) | ottbot | Main CFD Forum | 7 | June 11, 2013 13:09 |
Problem of UDF using fortran programs | hlsky | FLUENT | 0 | October 12, 2011 12:07 |
Problem of UDF including fortran programs | hlsky | Fluent UDF and Scheme Programming | 0 | October 12, 2011 11:47 |
Comparison between C/C++ and Fortran? | rick | Main CFD Forum | 45 | September 6, 2011 01:52 |
Variable Density Function | ryzd | FLUENT | 1 | August 25, 2011 15:16 |