CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

How to set the inlet velocity profile with fluctuations in Gaussian distribution

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By LuckyTran
  • 1 Post By ping
  • 1 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2020, 12:38
Default 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: 6
GaryPei is on a distinguished road
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
GaryPei is offline   Reply With Quote

Old   May 11, 2020, 18:53
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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.
GaryPei likes this.
LuckyTran is offline   Reply With Quote

Old   May 11, 2020, 21:13
Default
  #3
New Member
 
gen pei
Join Date: Aug 2019
Posts: 10
Rep Power: 6
GaryPei is on a distinguished road
Dear LuckyTran,

Thank you so much for the insights. I guess I will try to use the table generated by Matlab.

Regards,
Gary
GaryPei is offline   Reply With Quote

Old   May 12, 2020, 02:56
Default
  #4
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
ping is on a distinguished road
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
GaryPei likes this.
ping is offline   Reply With Quote

Old   May 12, 2020, 04:02
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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. =)
GaryPei likes this.
LuckyTran is offline   Reply With Quote

Old   May 12, 2020, 04:12
Default
  #6
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
ping is on a distinguished road
glad to remind you and the feature has been there for at least a decade after looking at some old c++ ucode of mine
ping is offline   Reply With Quote

Old   May 18, 2020, 22:38
Default
  #7
New Member
 
gen pei
Join Date: Aug 2019
Posts: 10
Rep Power: 6
GaryPei is on a distinguished road
Dear Ping,

Thank you so much for your reply. It is extremely helpful!

Regards,
Gen Pei
GaryPei is offline   Reply With Quote

Reply

Tags
dns, inlet boundary condition, turbulent inflow, velocity fluctuations


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
UDF inlet velocity profile mismatch with Fluent ChristineL Fluent UDF and Scheme Programming 15 November 25, 2016 06:45
simpleFoam: Non-uniform mesh near inlet & outlet causes incorrect velocity profile? Zaphod'sSecondHead OpenFOAM Running, Solving & CFD 0 January 28, 2015 05:17
[swak4Foam] Scale discrete inlet velocity profile with groovyBC cboss OpenFOAM Community Contributions 1 June 20, 2010 13:02
Inlet Velocity in CFX aeroman CFX 12 August 6, 2009 18:42
maintaining a logarithmic velocity distribution Morten Andersen CFX 1 January 8, 2007 11:37


All times are GMT -4. The time now is 13:54.