Could temperature/density profile (of discrete data not a function) be used at inlet?
Hey there,
Does it possible to use B.C. like discrete data in CFX? I modeled a thermal stratified reservoir in which temperature and density profiles are function of elevation, and now I would like to use dicrete points instead of the fitted curve in a similiar CFD model. How can I use it? Thanks a lot. |
This can be done via Fortran and Junction Box routine. Read chapter 18.8 in the Modeling Guide for how to read in table data and create a profile boundary
|
Quote:
|
You can also read in datatables to a function and use this function for a b.c. in CFX Pre directly.
Also check "2.9. Profile Boundary Conditions" in CFX/the Modeling Guide |
Quote:
Thank u very much. This is more useful for me as I do not know anything about Fortran. I am going in this way. Anyway, I will learn Fortran later. |
Quote:
Could you tell that in detail please? I've learned 'Profile Boundary Conditions', and still do not know what to do. Here is my problem: at INLET B.C., I have temperature, density and pressure varying with elevation/depth, which is nothing to do with (x, y); the profile of INLET exported from cfd-post contains points (x, y, z, ...) which is not consistent with my experiment data (my profiles just vary with z). How can I cope with this issue? I am thinking about providing all the measured points by hand, but I do not know what to do with x and y-position. Thank you very much for your time. |
When setting up the function you can copy/paste a large set of points into the schematic. So you need to provide density/temp/pressure wrt. z and use that function for all 3 components- since x,y are independent you can feed in your func(z) and get a profile wrt. z.
Maybe you can provide a small setup-case or a pic. if i am getting you wrong. |
Quote:
So I am thinking if it is possible to use profile B.C.(making my own B.C. file) to provide the infomation. And I am confused with how to create the B.C. profile(including discrete data not a function) because I do not have lots of spatial points with which the CFX solver to interpolate. Thank u so much. |
i donīt get it...
assume you have a User Function called "test" with Option "Interpolation(Data Input)" with argument Units [m] and Result Units [C] and the following discrete data set Code:
0 10 and then you plot the expression (which is the same as using it as a bc-profile/initial value) you get a zig-zag line. Between the points there will be a linear interpolation. If you want to get real steps you just add e.g. Code:
1e-6 15 OR create a sufficient function f(x) with higher order terms (e.g 5 --> ECXEL, MatLAB) from the given discrete data to smooth between your discrete data and use the mathematical function in the expression for the bc with z being your z-coordinate (test for division by 0 and clip between a min/max 1e-8 - 1e15 just to be sure nothing goes out of bounds). |
Quote:
Thank you so much for your kindness. |
All times are GMT -4. The time now is 11:46. |