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

UserFortran source problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 19, 2005, 11:03
Default UserFortran source problem
  #1
Karlis
Guest
 
Posts: n/a
Hi, take a look at this source! -actual density is not constant, but here GRV(j) is constant for every j..! Why?! How to get correct density values??

#include "cfx5ext.h"

dllexport(f_exp)

SUBROUTINE F_EXP( NLOC,NRET,NARG,RET,ARGS,CRESLT,CZ,DZ,IZ,LZ,RZ ) #include "MMS.h" #include "cfd_constants.h" #include "stack_point.h" C ------------------------------

INTEGER NLOC, NRET, NARG

CHARACTER CRESLT*(*)

REAL RET( 1:NLOC,1:NRET ), ARGS( 1:NLOC,1:NARG )

INTEGER IZ(*)

CHARACTER CZ(*)*(1)

DOUBLE PRECISION DZ(*)

LOGICAL LZ(*)

REAL RZ(*) C

CHARACTER*15 CFROMR

EXTERNAL CFROMR

CHARACTER*15 CFROMI

EXTERNAL CFROMI C

INTEGER II

CHARACTER*120 o

REAL valll, V1

__stack_point__ pGRAD_VAL

REAL GRV(NLOC)

o = 'XStikls.Density'

DO II=1,NLOC

CALL USER_GETVAR (o,CRESLT,pGRAD_VAL,CZ,DZ,IZ,LZ,RZ)

IF (CRESLT .NE. 'GOOD') THEN

CALL MESAGE( 'WRITE','ERROR' )

END IF

GRV = RZ(pGRAD_VAL)

RET(II,1:1) = GRV(II)

END DO

CALL MESAGE( 'WRITE','VAL='//CFROMR(GRV(1))//' '//CFROMR(GRV(NLOC/2)))

CRESLT = 'GOOD'

END
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
wmake compiling new solver mksca OpenFOAM Programming & Development 13 August 18, 2014 22:26
Source term problem in UEqn of simpleFoam fisch OpenFOAM Programming & Development 1 June 17, 2011 10:57
energy source problem fluboy Fluent UDF and Scheme Programming 2 January 10, 2010 09:56
Momentum source term problem kdarc OpenFOAM Running, Solving & CFD 3 February 11, 2009 08:52
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 03:43


All times are GMT -4. The time now is 09:33.