CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Could temperature/density profile (of discrete data not a function) be used at inlet?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2014, 02:16
Question Could temperature/density profile (of discrete data not a function) be used at inlet?
  #1
Member
 
Ben B. Huang
Join Date: Oct 2012
Posts: 54
Rep Power: 13
hwangpo is on a distinguished road
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.
hwangpo is offline   Reply With Quote

Old   March 13, 2014, 03:00
Default
  #2
Member
 
Peter
Join Date: Sep 2011
Location: Germany
Posts: 39
Rep Power: 14
PeMo is on a distinguished road
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
PeMo is offline   Reply With Quote

Old   March 13, 2014, 05:24
Default
  #3
Member
 
Ben B. Huang
Join Date: Oct 2012
Posts: 54
Rep Power: 13
hwangpo is on a distinguished road
Quote:
Originally Posted by PeMo View Post
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
thank u so much
hwangpo is offline   Reply With Quote

Old   March 13, 2014, 05:43
Default
  #4
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20
mvoss is on a distinguished road
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
mvoss is offline   Reply With Quote

Old   March 13, 2014, 06:27
Default
  #5
Member
 
Ben B. Huang
Join Date: Oct 2012
Posts: 54
Rep Power: 13
hwangpo is on a distinguished road
Quote:
Originally Posted by mvoss View Post
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
Yep.
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.
hwangpo is offline   Reply With Quote

Old   March 13, 2014, 07:47
Default
  #6
Member
 
Ben B. Huang
Join Date: Oct 2012
Posts: 54
Rep Power: 13
hwangpo is on a distinguished road
Quote:
Originally Posted by mvoss View Post
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
hey, Matthias Voß
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.
hwangpo is offline   Reply With Quote

Old   March 13, 2014, 08:40
Default
  #7
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20
mvoss is on a distinguished road
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.
mvoss is offline   Reply With Quote

Old   March 13, 2014, 09:05
Default
  #8
Member
 
Ben B. Huang
Join Date: Oct 2012
Posts: 54
Rep Power: 13
hwangpo is on a distinguished road
Quote:
Originally Posted by mvoss View Post
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.
Yep. You are absolutely right about the function method and I used it in that way before. Yet I am thinking about using profile B.C. instead of a function this time because the discrete data cannot be fitted well as a suitable function.

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.
hwangpo is offline   Reply With Quote

Old   March 13, 2014, 10:07
Default
  #9
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20
mvoss is on a distinguished road
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
5   15
10  10
15  5
20  20
and you create an Expression "mytestfunc" with test(x)
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
and you can produce VERY discrete functions. Even if your data is discrete you need to provide data in between.

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).
mvoss is offline   Reply With Quote

Old   March 13, 2014, 10:27
Default
  #10
Member
 
Ben B. Huang
Join Date: Oct 2012
Posts: 54
Rep Power: 13
hwangpo is on a distinguished road
Quote:
Originally Posted by mvoss View Post
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
5   15
10  10
15  5
20  20
and you create an Expression "mytestfunc" with test(x)
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
and you can produce VERY discrete functions. Even if your data it discrete you need to provide data in between.

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.
I really appreciate your help. I will follow your suggestion (resort to User Function with option 'Interpolation') and check this soon.
Thank you so much for your kindness.
hwangpo is offline   Reply With Quote

Reply


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
help with boundary profile in pressure inlet quiqui FLUENT 21 June 18, 2013 12:55
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
Inlet profile from 2D velocity and turbulence data Attesz OpenFOAM Pre-Processing 2 March 11, 2012 06:09
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23


All times are GMT -4. The time now is 15:40.