CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Modify existing velocity field (https://www.cfd-online.com/Forums/openfoam/129408-modify-existing-velocity-field.html)

wzx1989221 February 4, 2014 14:49

Modify existing velocity field
 
Dear foamers,

Does anyone know that how I can add random number to an existing velocity filed?

I used funkySetFields to initialise a random velocity filed for my simulation, after it has run for some time, I want to restart the simulation by adding random number to the velocity field I've already got. Is there any way to achieve that?

Hope anyone can give me a hint. Thank you very much.

Best regards,
Tony

nimasam February 5, 2014 08:21

you can modify your solver in createFields, then after where it reads velocity you can add some thing like U=U + U*rand()

wzx1989221 February 5, 2014 09:48

Hi Nima,

Thanks for the reply. I just wonder if I modify the solver, would the velocity field always be like that? Since I just want to modify the existing field and put it to run again, do you have any ideas about that?

Thank you very much.

Regards,
Tony

nimasam February 5, 2014 09:50

if you change only creatFields.H, then it would be only in first iteration


All times are GMT -4. The time now is 13:12.