CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Fields generated form functionObjects (https://www.cfd-online.com/Forums/openfoam-programming-development/242860-fields-generated-form-functionobjects.html)

ZeinabM May 16, 2022 08:17

Fields generated form functionObjects
 
Hello all,
So I am trying to calculate the velocity magnitude at certain positions so I am using probes functionObject. Before this, I used mag functionObject to calculate the velocity magnitude.

Now, when I am trying to use the probe on the new field Umag, the functionObject doesn't actually recognize it. This made me think that there might be a difference between the original fields and the fields calculated from postProcessing. I am curious to know the difference between them if there is any.

Thank you so much!

Saleh Abuhanieh May 17, 2022 05:00

Hi,


The generated field by the functionOject "mag" is not registered in the memory like the ones you may see them inside the OpenFOAM solvers.


That's why the probs functionObject could not see it.


Regards,
Saleh

ZeinabM May 17, 2022 16:14

Hello Saleh,
thank you for your reply. Since I am interested in OpenFOAM development. I was thinking about editing the mag function in order to register the field in the memory. I think it's going to be a good exercise. I need to understand how fields are added to the memory. If you can help me with explaining that or giving me a tutorial to watch or so. Thank you!

Saleh Abuhanieh May 18, 2022 12:44

Hi Zeinab,

You may check the objectRegistry documentation.

https://openfoamwiki.net/index.php/O...objectRegistry


The IOobject is used in all the OpenFOAM solvers. Check any createFields.H.

Then you may check the forces functionObject since the Cd and Cl can be used by another functionObjects.

I hope that was useful.

Regards,

Saleh


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