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

Giving Random input through field function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2016, 02:58
Default Giving Random input through field function
  #1
Member
 
Polard
Join Date: Oct 2015
Posts: 31
Rep Power: 10
kamal tewari is on a distinguished road
Hi All

I am modelling noise cancellation in a duct and want to give random inputs through field functions as a (source of noise) is there any method/ command by which I can give random numbers?
kamal tewari is offline   Reply With Quote

Old   May 29, 2016, 03:51
Default
  #2
Senior Member
 
kevin alun
Join Date: Sep 2011
Location: Germany
Posts: 106
Rep Power: 14
marmot is on a distinguished road
you could use user coding or perhaps easier is to generate a table of random numbers and input this table into sccm+, I guess your table will be either or both a function of space and time, than you can create a field function based on the table. For the syntax just search in the help for field function reading tables.
marmot is offline   Reply With Quote

Old   May 31, 2016, 01:41
Thumbs up
  #3
Member
 
Polard
Join Date: Oct 2015
Posts: 31
Rep Power: 10
kamal tewari is on a distinguished road
Thanks It worked .

But the problem now I am encountering is while designing a controller. I need to give input based on the output received. Suppose I give a Random Input and I get some output then I need to process this output in Matlab and based on the output from matlab I need to give Input to the Star CCm+ . Could you please tell me how this could be implemented in STAR CCM+..
kamal tewari is offline   Reply With Quote

Old   May 31, 2016, 04:34
Default
  #4
Senior Member
 
kevin alun
Join Date: Sep 2011
Location: Germany
Posts: 106
Rep Power: 14
marmot is on a distinguished road
Complicated way is with a java macro, you run the simulation, stop, write output from sccm+, (somehow the java macro runs matlab, matlap-> output, update the input table in sccm+.

Another way is that you build a lookup table, perhaps you know the range of the output from sccm+, than you run matlab for this range of anticipated output from sccm+, matlab provides a table of results, this is now a table in sccm+. If my explanation did not make sense, just google "Lookup table"
marmot is offline   Reply With Quote

Old   June 7, 2016, 23:10
Default
  #5
Senior Member
 
Gajendra Gulgulia
Join Date: Apr 2013
Location: Munich
Posts: 144
Rep Power: 13
ggulgulia is on a distinguished road
hello,

if the user has the flexibility to create random number from java codes, then the random number generation code block can be embedded in the java macro itself. This will free the user to write another code to couple simulation with MATLAB.
ggulgulia 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
Field FUnction akshaybagi STAR-CCM+ 1 January 11, 2016 15:57
[OpenFOAM] Paraview 3.98 - errors when saving geometry file pajot ParaView 1 September 28, 2013 10:45
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 10:20
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21


All times are GMT -4. The time now is 01:46.