|
[Sponsors] |
How to set the inlet velocity profile with fluctuations in Gaussian distribution |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 11, 2020, 13:38 |
How to set the inlet velocity profile with fluctuations in Gaussian distribution
|
#1 |
New Member
gen pei
Join Date: Aug 2019
Posts: 10
Rep Power: 7 |
Dear All,
I am trying to perform a DNS of the flow over a flat plate (turbulent boundary layer) using StarCCM+. For the inlet BC, I want to superimpose the time-varying velocity fluctuations in Gaussian distribution on the mean velocity profile. I am just wondering what the best way is to do it in StarCCM+? I can think of two ways that may do the trick, but really need your help to refine the ideas. Please correct me if I made mistake. 1) Using the field function to define the velocity as a function of time. But I am not sure if it is possible to set the fluctuations in Gaussian distribution in StarCCM+. I searched for it at Steve Portal and seems there is no functions/operators can do something like the normal distribution function. 2) Using the Table (x,y,z,t). This approach definitely can work but may be relatively troublesome. I am thinking of using Matlab to generate the whole time-varying velocity profile through the simulation time and import it to the StarCCM+. It should work but seems quite inconvenient as the DNS requires extremely small time step, and the table can easily has large size. I am wondering if you have any better ideas or advice for this. I really need your insights. Thank you! Regards, Gary |
|
May 11, 2020, 19:53 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66 |
Indeed there is no rng in Star field functions. You have to use a table.
An alternative might be to use a .java macro which gives you access to functions in java-land. But I still have no clue how to give random vectors in space and time. If you are doing no-SGS LES/DES, you have the synthetic turbulence generator which accomplishes the same feat. |
|
May 11, 2020, 22:13 |
|
#3 |
New Member
gen pei
Join Date: Aug 2019
Posts: 10
Rep Power: 7 |
Dear LuckyTran,
Thank you so much for the insights. I guess I will try to use the table generated by Matlab. Regards, Gary |
|
May 12, 2020, 03:56 |
|
#4 |
Senior Member
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20 |
i would be doing it as a c user function since libraries will also be available in c and it will be very fast and better than a massive imported table
|
|
May 12, 2020, 05:02 |
|
#5 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66 |
That's honestly a much better idea. It completely crossed my mind since it's a (relatively) newer feature that I haven't used yet.
From the tree diagram, Tools=> User Code and you can import a library. You should be able to yoink a code from somewhere with relative ease. Knowing this, now I am excited because there are a bunch of functions I've been wanting to code for Star. =) |
|
May 12, 2020, 05:12 |
|
#6 |
Senior Member
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20 |
glad to remind you and the feature has been there for at least a decade after looking at some old c++ ucode of mine
|
|
May 18, 2020, 23:38 |
|
#7 |
New Member
gen pei
Join Date: Aug 2019
Posts: 10
Rep Power: 7 |
Dear Ping,
Thank you so much for your reply. It is extremely helpful! Regards, Gen Pei |
|
Tags |
dns, inlet boundary condition, turbulent inflow, velocity fluctuations |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF inlet velocity profile mismatch with Fluent | ChristineL | Fluent UDF and Scheme Programming | 15 | November 25, 2016 07:45 |
simpleFoam: Non-uniform mesh near inlet & outlet causes incorrect velocity profile? | Zaphod'sSecondHead | OpenFOAM Running, Solving & CFD | 0 | January 28, 2015 06:17 |
[swak4Foam] Scale discrete inlet velocity profile with groovyBC | cboss | OpenFOAM Community Contributions | 1 | June 20, 2010 14:02 |
Inlet Velocity in CFX | aeroman | CFX | 12 | August 6, 2009 19:42 |
maintaining a logarithmic velocity distribution | Morten Andersen | CFX | 1 | January 8, 2007 12:37 |