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

Mass flow dependent pressure profile.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2020, 20:26
Default Mass flow dependent pressure profile.
  #1
New Member
 
Join Date: Aug 2020
Posts: 1
Rep Power: 0
Pinxty is on a distinguished road
Hi All,

New here but trying to interpret a UDF to read mass flow rate at the outlet of a 25m long pipe and pass that on to a function for the pressure inlet.

Pressure (Pa) = -13.33 * flow rate (kg/s) +200

I am really struggling to get my UDF to even interpret. at current I am faced with a parse error at line 28 for the code below:

/************************************************** **************************
unsteady.c
UDF for specifying a transient pressure profile dependant on mass flow rate
************************************************** **************************/

#include "udf.h"
Domain *d;
Thread *t;
face_t f;
float q;

DEFINE_EXECUTE_AT_END(mass_flow_rate)
{
thread_loop_c(t,d)
{
q = F_FLUX(f,t);
}
}

DEFINE_PROFILE(fan_inlet,thread,position)
{
begin_f_loop(f,thread)
{
F_PROFILE(f,thread, position) = -13.33 * q + 200;
{
end_f_loop(f,thread)
}

Any help would be greatly appreciated.

Thanks
Pinxty is offline   Reply With Quote

Reply

Tags
flow rate, mass, parse error, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
boundary condition with pressure AND mass flow rate tsi07 FLUENT 3 April 14, 2022 12:32
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 16, 2020 23:44
Target Mass Flow Rate option for Pressure Outlet Tianyi STAR-CCM+ 11 October 23, 2019 06:56
choked mass flow value pamstad CFX 2 October 2, 2019 03:02
mass flow inlet and pressure outlet with target mass flow rate Zigainer FLUENT 13 October 26, 2018 05:58


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