|
[Sponsors] |
September 20, 2013, 11:55 |
udf for chemical reduction scheme
|
#1 |
Senior Member
christine
Join Date: Jul 2009
Location: europe
Posts: 125
Rep Power: 17 |
Hi everyone,
I am trying to use a reduced scheme mechanism in Fluent. My problem for the moment is to understand if Fluent reads my UDF or not. The udf is a DEFINE_NET_REACTION_RATE and it is calling a subroutine written in Fortran. The UDF (rate_driver.c) : DEFINE_NET_REACTION_RATE(boivin_4_steps, c, t, particle, p, temp, yi, rr, jac) { ckwyp_( n, p, temp, yi, rr ); } The ckwyp subroutine (boivin_4_steps.f): subroutine ckwyp(P, T, Y, WDOT) IMPLICIT DOUBLE PRECISION (A-H, O-Z), INTEGER (I-N) PARAMETER (IGLO=3,IREAC=12,KK=6) DIMENSION Y(*), WDOT(*) DIMENSION XM(IREAC), RF(IREAC), RB(IREAC), W(IREAC), WT(KK) DIMENSION RKF(IGLO),XCON(KK) DATA SMALL/1.D-50/ DATA RU/8.314510D3/ DATA WT/2.016, 1.008, 31.999, 18.015, 34.015, 28.013/ [.....] RETURN END So my question is : are my variables correctly declared? I'm a bit confused with C/Fortran...Written like this, does the DEFINE_REACTION_NET_RATE really calls the ckwyp subroutine? When compiling and loading the UDF, I have no problem (I've build the libudf directories (src, lnamd64, 2ddp ...), then put the correct makefile.udf and makefile.udf2 in the good directories....then compiled the fortran program with g77 ... then command make "FLUENT_ARCH"=lnamd64 ....no problem and no errors with that. But when my case runs in Fluent, I don't know if it really takes the UDF into account: my flame stops burning after 100 iterations... Any advice would be really nice !!! Thanks a lot Christine |
|
Tags |
fortran, reducted scheme, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to understand high resolution scheme and high order scheme | iilw1314 | Main CFD Forum | 7 | April 12, 2022 13:29 |
Implementation of QUICK scheme | Romuald Skoda | Main CFD Forum | 11 | November 6, 2017 22:20 |
Communication between UDF and Scheme | 3DmaniacSLDWRKS | Fluent UDF and Scheme Programming | 0 | August 16, 2011 13:54 |
2nd order upwind scheme (Fluent and CFX) | Far | FLUENT | 0 | May 22, 2011 02:50 |
How to combine UDF and Scheme? | ali hemmati | Fluent UDF and Scheme Programming | 3 | March 19, 2011 15:45 |