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

increase

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2021, 09:09
Default increase
  #1
New Member
 
R. Evon
Join Date: Nov 2021
Posts: 2
Rep Power: 0
Seven7 is on a distinguished road
Hi everyone,

I'm looking for a water tap to attach on a mass flow inlet of a multiphase simulation (No air from the tap). I'm not familliar with UDF programming (this one would be my first one).

I have found an example as basic:


#include "udf.h"

DEFINE_PROFILE(inlet_mf,th,i)
{
face_t f;
begin_f_loop(f,th)
{

if(CURRENT_TIME <= 10.0)
F_PROFILE(f,th,i) = 14.0;
else if(CURRENT_TIME <=10.0 && CURRENT_TIME >40.0)
F_PROFILE(f,th,i) = xxx.0;
else
F_PROFILE(f,th,i) = 2100.0;
}
end_f_loop(f,th);
}


by the xxx in the UDF I would like to open the tap linear, like in the attached picture.

is this easyer to do with Enter the Expressions Directly into the Fluent UI or ist this a typical UDF task?

Seven7
Attached Images
File Type: jpg water_tap.jpg (28.5 KB, 5 views)
Seven7 is offline   Reply With Quote

Old   December 14, 2021, 08:20
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
for this statement
Code:
else if(CURRENT_TIME <=10.0 && CURRENT_TIME >40.0)
F_PROFILE(f,th,i) = xxx;
instead of xxx you need linear equation
y= kx + b
where you need to find k and b , but y = 14 if x = 10 sec and y = 2100 if x = 40 sec
__________________
best regards


******************************
press LIKE if this message was helpful
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
Fluent meshing: increase the max octree memory Ames FLUENT 1 November 9, 2021 09:58
cd increase but cl remains constant as AOA increase - possible? quarkz OpenFOAM Post-Processing 0 October 8, 2020 04:43
Increase in flow rate decrease in Outlet pressure. trovilb1 System Analysis 1 December 5, 2017 08:22
Extremely Small Constant Increase of Heat Transfer Coefficient With Concentration Shomaz ul Haq CFX 6 July 9, 2017 09:06
How can I increase Heat Transfer at Domain Interf? B.Simon CFX 3 October 28, 2008 19:53


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