|
[Sponsors] |
February 5, 2018, 16:57 |
finding "free stream" velocity
|
#1 |
Member
Tyler Richardson
Join Date: Jun 2017
Posts: 30
Rep Power: 9 |
Hi,
I am not super familiar with Fluent scheming, but I do have a lot of experience within mechanical APDL scripting. I am trying to determine the "free stream velocity" of a series of pipe and channel flows in order to calculate an HTC. Currently I have a UDF that calculates the HTC by using C_U,C_V,C_W of (c0,t0) within DEFINE_HEAT_FLUX to determine the bulk velocity. This, as I understand is the velocity at the center of the cell adjacent to the wall - which is likely in the boundary layer. If I were to do this in mechanical APDL, what I would do is find the surface normal of the wall element, and propagate several elements inward to get the velocity, which may not scientifically be the free stream, but it would be better than what I have. In fact I could check element by element the velocity to see when it peaks or levels off. I am trying to recreate the same thing in Fluent Scheming, from what I have found so far, I can find the wall normal as so: F_AREA(A,f,t); real AMag=NV_MAG(A); A[0]=A[0]/AMag; A[1]=A[1]/AMag; A[2]=A[2]/AMag; and loop around the adjacent cell face as so: real x[ND_ND], xf[ND_ND]; int n; real T; C_CENTROID(x, c0, t0); c_face_loop(c0, t0, n) /* loops over all faces of a cell */ { tf = C_FACE_THREAD(c0,t0,n); /* face thread i of n */ f = C_FACE(c0,t0,n); /* face i of n */ F_CENTROID(xf, f, tf); /* face i centroid */ if Condition /* is face centroid further from wall than cell centroid? */ { c0 = F_C0(f, tf); if (c0 == c) /* is itself */ c0 = F_C1(f, tf); T = C_T(c0,t); break; } } Here, firstly I would like to know if the above makes sense (minus the condition) part. and secondly I'd like to know what means I can use to project the face centroids onto the unit normal such that I can evaluate which if the existing face is further from the wall from the wall face. I will likely need an if statement in there to keep the furthest face- and then repeat the entire loop the number of times I've inflated my mesh. Has anyone done anything like this or can provide some assistance to get closer to what I am trying to do? Thanks a lot! Tyler |
|
Tags |
free stream velocity, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Finding area weighted average velocity along the pipe | Tanjina | FLUENT | 0 | November 16, 2013 21:54 |
Finding velocity temperature etc at a particular pt in space | srinath | OpenFOAM Running, Solving & CFD | 5 | January 6, 2009 08:30 |
Velocity in Porous medium : HELP! HELP! HELP! | Kali Sanjay | Phoenics | 0 | November 6, 2006 07:10 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |