CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Creating an initial field with a random disturbance (http://www.cfd-online.com/Forums/openfoam-solving/68756-creating-initial-field-random-disturbance.html)

mmahdinia September 30, 2009 17:46

Creating an initial field with a random disturbance
 
Hi everybody,

I am using the setFields utility to create an initial filed for a scalar. Is there a way to create a random disturbance with an specified amplitude (like 10 percent of the max value) in the initial scalar field mentioned above?

Your response would be of high value to me.

Thanks
Maani

lakeat October 7, 2009 10:35

IC is transient and temporary, why do you care about it?

mmahdinia October 7, 2009 10:53

Dear Daniel,

Generally that is true for steady state cases. But I was thinking about the modeling of the evolution of an unsteady case. I am aware that this unsteadiness will finally lead to a semi-steady case, but it is the beginning of the current that I am currently seeking about.

Thanks for the reply
Maani

lakeat October 7, 2009 22:50

Hi, you are welcome, There's a way for us in using channelOodles some years ago, which is now renamed as channelFoam, at that time Eugene gave us his perturbU utility, you can just download it and I think that's a good point for you to start.

bjj October 11, 2009 08:38

You may also use the foamCalc utility. This includes a randomise function. In your case do: foamCalc randomise <pertubation> <field> -time 0. This will create a new field in your /0 dir with a random pertubation.

Regards,
Bjarne

braennstroem October 12, 2009 08:27

Hi,

one way to get some kind of 'turbulence' as initial field is to use the velocity field from 'boxTurb'. From a dummy cube-mesh (which is bigger than your domain) you can map the velocity field to your case and/or add it to an existing solution.

Fabian

mmmn036 February 22, 2014 17:32

foamCalc only randomise vector field?
 
Hello,

I need to randomise a scalar filed before i start running my simulation. foamCalc gives me error when I randomise the scalar field, but it disturbes U (vector) perfectly. The error is:

--> FOAM FATAL ERROR:
Unable to process D
No call to randomise for fields of type volScalarField

Any body can help?

Thanks
Manjura


All times are GMT -4. The time now is 07:29.