|
[Sponsors] |
Creating an initial field with a random disturbance |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 30, 2009, 18:46 |
Creating an initial field with a random disturbance
|
#1 |
Member
Join Date: Mar 2009
Posts: 46
Rep Power: 17 |
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 |
|
October 7, 2009, 11:35 |
|
#2 |
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21 |
IC is transient and temporary, why do you care about it?
__________________
~ Daniel WEI ------------- Boeing Research & Technology - China Beijing, China |
|
October 7, 2009, 11:53 |
|
#3 |
Member
Join Date: Mar 2009
Posts: 46
Rep Power: 17 |
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 |
|
October 7, 2009, 23:50 |
|
#4 |
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21 |
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 ------------- Boeing Research & Technology - China Beijing, China |
|
October 11, 2009, 09:38 |
|
#5 |
New Member
Bjarne Jensen
Join Date: Mar 2009
Location: Denmark
Posts: 7
Rep Power: 17 |
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 |
|
October 12, 2009, 09:27 |
|
#6 |
Senior Member
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19 |
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 |
|
February 22, 2014, 18:32 |
foamCalc only randomise vector field?
|
#7 |
Member
Manjura Maula Md. Nayamatullah
Join Date: May 2013
Location: San Antonio, Texas, USA
Posts: 42
Rep Power: 12 |
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 |
|
March 20, 2016, 22:55 |
|
#8 |
Member
Pavan
Join Date: Jan 2016
Posts: 53
Rep Power: 10 |
Manjura has fixed this problem.
Go to the file $FOAM_SRC/postProcessing/foamCalcFunctions/field/randomise.C Go to line 95 which says: if (fieldHeader.headerOk()) and paste the following lines in the body of the function: writeRandomField<scalar> ( fieldHeader, pertMag, rand, mesh, processed ); cd ../.. wmake libso then the 'randomise' utility will work for scalar fields also. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |
Unknown error | sivakumar | OpenFOAM Pre-Processing | 9 | September 9, 2008 13:53 |
Convergence moving mesh | lr103476 | OpenFOAM Running, Solving & CFD | 30 | November 19, 2007 15:09 |