CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

udf for chemical reduction scheme

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2013, 10:55
Default udf for chemical reduction scheme
  #1
Senior Member
 
christine
Join Date: Jul 2009
Location: europe
Posts: 125
Rep Power: 16
yorelchr is on a distinguished road
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
yorelchr is offline   Reply With Quote

Reply

Tags
fortran, reducted scheme, udf


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
how to understand high resolution scheme and high order scheme iilw1314 Main CFD Forum 7 April 12, 2022 12:29
Implementation of QUICK scheme Romuald Skoda Main CFD Forum 11 November 6, 2017 21:20
Communication between UDF and Scheme 3DmaniacSLDWRKS Fluent UDF and Scheme Programming 0 August 16, 2011 12:54
2nd order upwind scheme (Fluent and CFX) Far FLUENT 0 May 22, 2011 01:50
How to combine UDF and Scheme? ali hemmati Fluent UDF and Scheme Programming 3 March 19, 2011 14:45


All times are GMT -4. The time now is 12:10.