|
[Sponsors] |
December 18, 2017, 08:25 |
How to save velocity profile at the outlet?
|
#1 |
New Member
Join Date: Jul 2016
Posts: 4
Rep Power: 10 |
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); } |
|
December 18, 2017, 09:48 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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...
|
|
December 18, 2017, 09:54 |
|
#3 |
New Member
Join Date: Jul 2016
Posts: 4
Rep Power: 10 |
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. |
|
Tags |
profile, profile boundary, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plot velocity profile along longitudinal axis of pipe | jorgelmilan | EnSight | 8 | July 7, 2018 15:30 |
outlet pressure Boundary settings -velocity streamline under ambient temp.conditions | Vishnu_bharathi | CFX | 12 | November 21, 2017 07:56 |
InterFoam - Validation for velocity profile in simple channel | me.ouda | OpenFOAM Running, Solving & CFD | 0 | October 19, 2015 07:42 |
[swak4Foam] groovyBC error: velocity profile (2D) >> what's wrong? | vitorspadeto | OpenFOAM Community Contributions | 4 | June 19, 2014 16:31 |
unable to get parabolic velocity profile with pimplefoam | houkensjtu | OpenFOAM | 4 | October 8, 2012 05:41 |