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

DEFINE_PROFILE for every timestep

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 14, 2019, 05:10
Default DEFINE_PROFILE for every timestep
  #1
New Member
 
Join Date: May 2018
Posts: 29
Rep Power: 7
CFDJonas is on a distinguished road
Hello again everybody,

I'm currently developing a UDF containing a DEFINE_PROFILE macro. Within that I want to set the mass flow of a mass-inlet boundary condition dependent to the current time of a transient simulation.

The problem is, that for my simulation the macro/UDF does not seem to be executed every timestep. Take the following UDF as an example. When I compile & hook this UDF to my mass flow within the boundary condition and then run the simulation, the test message is never shown in the console. It is only shown once after loading the udf (and I think there the value is set once to 0.3). But afterwards the UDF does not seem to be executed again (if I bring in the time dependence with CURRENT_TIME the changes are thus not applied to the actual inlet value)

Code:
DEFINE_PROFILE(massinlet_profile, t, i)
{
    Message("TEST MESSAGE TEST MESSAGE \n");
    face_t f;
    begin_f_loop(f, t)
    {
        F_PROFILE(f, t, i) = 0.3;
    }
    end_f_loop(f, t)
}
Thanks in advance, I hope that andybody has an idea what is going wrong here!
CFDJonas is offline   Reply With Quote

Old   February 14, 2019, 21:06
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
DEFINE_PROFILE(massinlet_profile, t, i)
{
   
    face_t f;
 Message("TEST MESSAGE TEST MESSAGE \n");
    begin_f_loop(f, t)
    {
        F_PROFILE(f, t, i) = 0.3;
    }
    end_f_loop(f, t)
}
best regards
AlexanderZ 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
Adaptive timestep settings ROY4 CFX 0 June 16, 2018 05:13
error with smaller timestep ? Thomas MADELEINE FLUENT 0 August 8, 2016 13:02
Modifying sonicFoam to run with variable timestep - strange results dalaron OpenFOAM Programming & Development 1 September 2, 2013 07:21
Restart 2-way FSI with different timestep? Lance CFX 10 April 17, 2013 00:37
Timestep and Pressure Correction Relationship in SIMPLE rks171 Main CFD Forum 23 May 4, 2012 01:04


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