Dear all,
I am running a scalarCodedSourceCoeffs in fvOptions of chtMultiRegionSimpleFoam solver for the heat source addition. There are two solid regions, one of which has a heat source. I have the code presented below.
1. In the codeAddSup, the temperature values are looked up using volScalarField and lookupObject, where I believe that the Internal Field temperature values are extracted from cell Centres.
[const volScalarField& T = mesh_.lookupObject("T");]
//Temp field extracted from cell centres.
2. The heat source which is calculated from the solidSolver.H is providing me an error when I do not multiply with cell Volumes. Also, if I multiply the temperature difference term with the cell volumes, I am getting a very small change since cell volumes is too small with the range of 1e-8 which is understood since the volume is very small. But, the code does not have any effect on the simulation and does not show any variation with or without heat source.
[ const scalarField& V = mesh_.V(); // List of cellVolumes scalarField& hSource = eqn.source(); //defining source
3. Code for heat source in fvOptions after extracting T and V values.
forAll(T,i) { hSource[i] -= (37 - T[i])*[V[i]]; };
With respect to these, I wanted to know,
1. How exactly the source term is calculated from the solidSolver.H? 2. Is there any way we could extract the internal temperature face centre values or nodal values? 3. Is there any other way we could define the heat Source from the cell Temperatures so that fvOptions takes into account?
I have attached a picture of GeometricField values that are placed in OpenFoam. From the picture, it can be seen that the internal Field are present in cell centres, face centres and at nodal points.
Please help me out with this.
Please feel free to ask extra information related to this.