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/)
-   -   add an array of new variable to OpenFOAM (https://www.cfd-online.com/Forums/openfoam-programming-development/173871-add-array-new-variable-openfoam.html)

hsingtzu June 29, 2016 05:56

add an array of new variable to OpenFOAM
 
Hello

I would like to add heat sources to a model. The values of the heat sources are different in different cells. I would like to find a way that the solver looks for an array in a certain file for the heat sources in the internal field, and the heat sources in all boundaries are set to be zero.

Does anyone know how to make it, or has anyone done similar work?

Thanks

hsingtzu July 8, 2016 08:28

I propose a way that probably works.
Define a new variable "Q" for heat source, and then change the values in the internal field from Q[0] to Q[Q.size()].


All times are GMT -4. The time now is 23:57.