|
[Sponsors] |
May 28, 2016, 03:58 |
Giving Random input through field function
|
#1 |
Member
Polard
Join Date: Oct 2015
Posts: 31
Rep Power: 11 |
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? |
|
May 29, 2016, 04:51 |
|
#2 |
Senior Member
kevin alun
Join Date: Sep 2011
Location: Germany
Posts: 106
Rep Power: 15 |
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.
|
|
May 31, 2016, 02:41 |
|
#3 |
Member
Polard
Join Date: Oct 2015
Posts: 31
Rep Power: 11 |
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+.. |
|
May 31, 2016, 05:34 |
|
#4 |
Senior Member
kevin alun
Join Date: Sep 2011
Location: Germany
Posts: 106
Rep Power: 15 |
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" |
|
June 8, 2016, 00:10 |
|
#5 |
Senior Member
Gajendra Gulgulia
Join Date: Apr 2013
Location: Munich
Posts: 144
Rep Power: 13 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
Field FUnction | akshaybagi | STAR-CCM+ | 1 | January 11, 2016 16:57 |
[OpenFOAM] Paraview 3.98 - errors when saving geometry file | pajot | ParaView | 1 | September 28, 2013 11:45 |
[swak4Foam] installation problem with version 0.2.3 | Claudio87 | OpenFOAM Community Contributions | 9 | May 8, 2013 11:20 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |