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

How to save velocity profile at the outlet?

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

Like Tree1Likes
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2017, 07:25
Default How to save velocity profile at the outlet?
  #1
New Member
 
Join Date: Jul 2016
Posts: 4
Rep Power: 9
ptorres is on a distinguished road
Hello,

I'm trying to get the velocity profile at the end of each iteration/time-step, so that I can make the inlet be the same.
Unfortunately, I only found out how to do it with Mass flow rate, and not the profile:

Code:
DEFINE_ADJUST(get_my_mass_flow,d)
{

#if !RP_HOST
  Thread *t = Lookup_Thread(d,zone_ID);
  face_t  f;
  real sum = 0.0;
  my_mass_flow = 0.5;
  

  /* Compute Mass Flow at Outlet */
  begin_f_loop(f,t)
  {
     my_mass_flow += F_PROFILE(f,t,i);
  }
  end_f_loop(f,t)
#endif

  my_mass_flow = PRF_GRSUM1(my_mass_flow);
  node_to_host_real_1(my_mass_flow);
}

DEFINE_PROFILE(apply_my_mass_flow,t,i)
{
   face_t f;
   begin_f_loop(f,t)
   {
     F_PROFILE(f,t,i) = my_mass_flow;
   }
   end_f_loop(f,t);
}
Is there anyway to do this for the velocity profile?
ptorres is offline   Reply With Quote

Old   December 18, 2017, 08:48
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Are you now writing a UDF to implement a periodic boundary condition? This is already included in Fluent, you don't have to write anything for this...
ptorres likes this.
pakk is offline   Reply With Quote

Old   December 18, 2017, 08:54
Default
  #3
New Member
 
Join Date: Jul 2016
Posts: 4
Rep Power: 9
ptorres is on a distinguished road
Hi pakk, thanks for the answer.
Unfortunately, I have two problems with that:

1-Being this periodic condition at the inlet and outlet, I can't seem to make this condition right, especcially because I have 2 inlets and 2 outlets, and the flow is oscillating, resulting in some high variations of both Mass flow and pressure gradient conditions, which must be established in the periodic conditions menu.

2-Since I have other periodic boundaries in the geometry, and in these the pressure gradient is always 0 (it's essentially just repeating the geometry sideways), I cannot create different periodic conditions for each periodic boundary, correct? At least I didn't find a way to make those conditions vary between boundaries.
ptorres is offline   Reply With Quote

Reply

Tags
profile, profile boundary, 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
Plot velocity profile along longitudinal axis of pipe jorgelmilan EnSight 8 July 7, 2018 14:30
outlet pressure Boundary settings -velocity streamline under ambient temp.conditions Vishnu_bharathi CFX 12 November 21, 2017 06:56
InterFoam - Validation for velocity profile in simple channel me.ouda OpenFOAM Running, Solving & CFD 0 October 19, 2015 06:42
[swak4Foam] groovyBC error: velocity profile (2D) >> what's wrong? vitorspadeto OpenFOAM Community Contributions 4 June 19, 2014 15:31
unable to get parabolic velocity profile with pimplefoam houkensjtu OpenFOAM 4 October 8, 2012 04:41


All times are GMT -4. The time now is 00:59.