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

UDF previous time step parameters

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2012, 20:53
Default UDF previous time step parameters
  #1
New Member
 
Johnny
Join Date: Aug 2012
Posts: 3
Rep Power: 14
Johnyi is on a distinguished road
Hi,
Anyone CAN HELP ME TO SOLVE THE PROBLEM?
I am going to define a source to a cell zone. The source is a function of temperature of the previous time step. I wrote the UDF as follows:

include "udf.h"
DEFINE_SOURCE(heat_source,c,t,dS,eqn)
{
real x[ND_ND];
real source;
real tem1;
tem1=C_T_M1(c,t);
source=tem1/1000;
dS[eqn]=0.0;
return source;
}


and I successfully interpreted or complied it and loaded it and defined to the cell zone. however, when trying to run Fluent, It gave the information:
FLUENT received fatal signal (ACCESS_VIOLATION)

Can anybody tell me what's wrong?

Johnny
Johnyi is offline   Reply With Quote

Old   December 13, 2012, 18:20
Default
  #2
Member
 
vlg
Join Date: Jul 2011
Location: My home :)
Posts: 81
Rep Power: 18
villager is on a distinguished road
Maybe, you need look through "Cell Macros" section (Cell Variables in prev. versions) in UDF Manual.
"Important: Note that data from C_T_M1 is available only if user-defined scalars are defined. It can also be used with adaptive time stepping."
Define -> UDF scalars -> increase number...
Maybe these thoughts will help.

Last edited by villager; December 13, 2012 at 18:21. Reason: Misspelling
villager is offline   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
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 17, 2019 00:12
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56
directMapped problem panda60 OpenFOAM Bugs 4 July 8, 2010 11:23
Time step in transient simulation shib FLUENT 0 June 17, 2010 14:07
AMG versus ICCG msrinath80 OpenFOAM Running, Solving & CFD 2 November 7, 2006 16:15


All times are GMT -4. The time now is 20:07.