CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   A question on parallelization in OF (http://www.cfd-online.com/Forums/openfoam/60762-question-parallelization.html)

ivan_cozza September 3, 2008 05:37

Hi to evrybody. I'm planning
 
Hi to evrybody.
I'm planning to write a postprocessing utility in OpenFoam that read the results from a steady RANS calculation and do something on it like a random perturbation in order to produce a time history. My question is:
If i decompose my mesh, can I run in parallel my application without do anything, like in a standard solver, or have I to do something different?

hjasak September 3, 2008 06:24

Hello, SInce you are only d
 
Hello,

SInce you are only doing local data manipulation, you application will run in parallel with no changes.

Enjoy,

Hrv

ivan_cozza September 3, 2008 10:44

Thank you so much Hrvoje! So,
 
Thank you so much Hrvoje!
So, if I understood, if I work cell-by-cell without looking for other cells data, the code is allready parallelized...
Wow...

ivan_cozza September 10, 2008 06:47

Now I have a second question:
 
Now I have a second question:
I have to access to the single cell-elements of the vol<type>Field list in order to set in there a random perturbation.
What I want to do is:
volScalarField Up;
for (label cellID=0, cellID<nTotCells, cellID++){
Up[cellID] += randomPerturbation;
}

Where cellID is the cell-number and Up[cellID] is the value of Up in the cell cellID.
How can I do it in OpenFOAM?
Thank you!


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