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

Udf velocity inlet profile with multiphase mixture (ansys fluent)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2020, 20:12
Smile Udf velocity inlet profile with multiphase mixture (ansys fluent)
  #1
New Member
 
Engineering_Student
Join Date: Nov 2020
Posts: 2
Rep Power: 0
md_lidia is on a distinguished road
We are two undergraduate students seeking for help!!!

We are trying to simulate a laminar flux through a 3D pipe (25 cm long, 2 cm of diameter) consisting of a multiphase flux (air and water). We want to implement a UDF for the velocity inlet consisting of several time-dependent square pulses.

In our ideal scenario, the pipe is initially full of air and water is injected from the inlet periodically (every injection is a square pulse) and the amount of water decreases with each interval. To do so, we have written the following code, but it does not seem to work.


COULD ANYONE HELP PELASE?? HOW CAN WE SOLVE IT???

THANK YOU VERY MUCH IN ADVANCE!

--------------


#include "udf.h

DEFINE_PROFILE(inlet_velocity, t, i)
{
real current_time;
face_t f;
current_time = CURRENT_TIME;

begin_f_loop(f, t)
{
if ((current_time < 2) | (current_time > 9 & current_time<14) | (current_time > 21 & current_time<25) | (current_time > 32 & current_time<37) | (current_time > 44 & current_time<49))
{
F_PROFILE(f, t, i)=0;
}
else if (current_time >= 2 & current_time<=9)
{
F_PROFILE(f, t, i)=1*0.08;
}

else if (current_time >= 14 & current_time<=21)
{
F_PROFILE(f, t, i)=0.75*0.08;
}

else if (current_time >= 25 & current_time<=32)
{
F_PROFILE(f, t, i)=0.5*0.08;
}

else if (current_time >= 37 & current_time<44)
{
F_PROFILE(f, t, i)=0.25*0.08;
}
}
end_f_loop(f, t)
}
md_lidia is offline   Reply With Quote

Old   November 24, 2020, 08:48
Default
  #2
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28
Gert-Jan will become famous soon enough
Use CFX. No need to use Fortran. Just add a few equations to the simulations and off you go.
Gert-Jan is online now   Reply With Quote

Old   December 12, 2020, 02:23
Default
  #3
Member
 
Dnyanesh Mirikar
Join Date: Jul 2019
Posts: 35
Rep Power: 7
DnyanMiri is on a distinguished road
Try named expressions feature provided by Ansys and you may end up solving your problem. Let me know if you want any help further.
DnyanMiri is offline   Reply With Quote

Reply

Tags
ansys fluent, multiphase mixture model, 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
[OLAFLOW] The OLAFLOW Thread Phicau OpenFOAM Community Contributions 459 September 12, 2024 12:47
A CFX-POST error (ver 14.5.7) wangyflp88 CFX 2 July 22, 2017 01:17
Ansys Fluent 17 UDF Velocity Profile Update. Phil-M Fluent UDF and Scheme Programming 4 October 17, 2016 10:05
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 02:27
logarithmic velocity profile for velocity inlet in Fluent amarendernag FLUENT 3 August 25, 2012 06:44


All times are GMT -4. The time now is 15:51.