CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Read the density - fortran

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 5, 2008, 07:08
Default Read the density - fortran
  #1
Ollimarc
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
  Reply With Quote

Old   April 5, 2008, 11:55
Default Re: Read the density - fortran
  #2
Rogerio Fernandes Brito
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

  Reply With Quote

Old   April 5, 2008, 12:53
Default Re: Read the density - fortran
  #3
Ollimarc
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.
  Reply With Quote

Old   April 5, 2008, 13:05
Default Re: Read the density - fortran
  #4
Rogerio Fernandes Brito
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?
  Reply With Quote

Old   April 5, 2008, 13:10
Default Re: Read the density - fortran
  #5
Ollimarc
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!
  Reply With Quote

Old   April 5, 2008, 13:12
Default Re: Read the density - fortran
  #6
Ollimarc
Guest
 
Posts: n/a
...and the compiler said that it has a problem with "f" and "density". must I declare that?
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 12:09
Problem of UDF using fortran programs hlsky FLUENT 0 October 12, 2011 11:07
Problem of UDF including fortran programs hlsky Fluent UDF and Scheme Programming 0 October 12, 2011 10:47
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 00:52
Variable Density Function ryzd FLUENT 1 August 25, 2011 14:16


All times are GMT -4. The time now is 23:29.