CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Creating an initial field with a random disturbance

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 30, 2009, 17:46
Post Creating an initial field with a random disturbance
  #1
Member
 
Join Date: Mar 2009
Posts: 46
Rep Power: 8
mmahdinia is on a distinguished road
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
mmahdinia is offline   Reply With Quote

Old   October 7, 2009, 10:35
Default
  #2
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
IC is transient and temporary, why do you care about it?
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   October 7, 2009, 10:53
Default
  #3
Member
 
Join Date: Mar 2009
Posts: 46
Rep Power: 8
mmahdinia is on a distinguished road
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
mmahdinia is offline   Reply With Quote

Old   October 7, 2009, 22:50
Default
  #4
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
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.
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   October 11, 2009, 08:38
Default
  #5
bjj
New Member
 
Bjarne Jensen
Join Date: Mar 2009
Location: Denmark
Posts: 7
Rep Power: 8
bjj is on a distinguished road
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
bjj is offline   Reply With Quote

Old   October 12, 2009, 08:27
Default
  #6
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 10
braennstroem is on a distinguished road
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
braennstroem is offline   Reply With Quote

Old   February 22, 2014, 18:32
Default foamCalc only randomise vector field?
  #7
New Member
 
Manjura Maula Md. Nayamatullah
Join Date: May 2013
Posts: 22
Rep Power: 4
mmmn036 is on a distinguished road
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
mmmn036 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16
Unknown error sivakumar OpenFOAM Pre-Processing 9 September 9, 2008 12:53
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09


All times are GMT -4. The time now is 22:05.