|
[Sponsors] |
August 22, 2018, 14:09 |
Unsteady Inlet Velocity Boundary Condition
|
#1 |
New Member
Antoine Aad
Join Date: Apr 2011
Posts: 10
Rep Power: 15 |
I am writing a UDF to define an unsteady velocity profile at an inlet of a domain. I will show a sample of the code and explain what am I looking for.
#include "udf.h" DEFINE_PROFILE(unsteady_velocity, t, i) { face_t f; real t = CURRENT_TIME; real velocity = V_e real pressure = P_stat Domain *domain; Thread *c_thread; thread_loop_overset_c(c_thread, domain) /*loops over all cell threads participating in overset */ /*interfaces in the domain */ { V_e = SQRT(Ux^2 + Uy^2 + Uz^2) P_stat } begin_f_loop(f, thread)/*begin calculation*/ { F_PROFILE(f, thread, position) = (cst*V_e + cst*(P_stat + 3500*t) - x_wall_shear_stress(cylindrical_wall) - static_pressure(cylindrical_wall) - (cst- cst*t)*cst); } end_f_loop(f, thread) } I want to calculate the velocity at the inlet as seen by the f_loop; cst is a constant number, V_e is the velocity at a fluid interface, P_stat is the static gauge pressure at that interface too inside my global domain, moreover calculating the x-wall shear stress on a cylindrical wall inside the global domain with the static pressure at this cylindrical wall also. t is the real-time or time step of the transient simulation. I am using the pressure-based coupled algorithm. My request is: how to properly code this velocity equation? |
|
October 4, 2018, 13:31 |
|
#2 | |
Member
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
Linear Velocity Inlet Boundary Condition in Openfoam | shahilc | OpenFOAM Pre-Processing | 1 | February 27, 2016 04:00 |
Time dependant pressure boundary condition | yosuke1984 | OpenFOAM Verification & Validation | 3 | May 6, 2015 07:16 |
Velocity inlet boundary condition for porous medium | Chander | CFX | 3 | March 11, 2012 22:18 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |