CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Dimension Error not while adding heat source with Heat Equation (https://www.cfd-online.com/Forums/openfoam-solving/123722-dimension-error-not-while-adding-heat-source-heat-equation.html)

himanshu28 September 19, 2013 10:29

Dimension Error not while adding heat source with Heat Equation
 
Hi,

I am trying to add Energy source in the turbulent energy equation given below,
Code:

{
alphat = turbulence->nut()/Prt;
alphat.correctBoundaryConditions();

volScalarField alphaEff
("alphaEff",
turbulence->nu()/Pr + turbulence->nut()/Prt
);

    fvScalarMatrix TEqn
        (
            fvm::ddt(T)
            + fvm::div(phi, T)
            - fvm::laplacian(alphaEff, T)
            - q/Cp1
        );

          TEqn.relax();
       
        TEqn.solve();
}

so if you check the dimension of the equation it is coming (kelvin/sec) , my source q is specified in terms of (j/sec) hence i divided it with the heat capacity Cp1(j/k) of my source and specified correct dimensions in the transport property as well >my solver is running properly if i remove this source term but when i am trying to run with this source term its giving me the following error.

Code:

Different dimensions for =
    dimensions : [0 2 -1 0 0 0 0] = [0 4 -3 0 0 0 0]


    From function dimensionSet::operator=(const dimensionSet&) const
    in file dimensionSet/dimensionSet.C at line 165.

i am not able to track this bug in the solver if somebody can help me on this i will be thankful

Regards
Himanshu :(

Antimony September 20, 2013 07:11

Hi,

Are you sure Cp1 is not the specific heat capacity? If it is specific heat capacity then the units would be J/(kg.K).

Also, isn't the unit of q W/m2?

Regards,

Antimony

himanshu28 September 20, 2013 07:18

Quote:

Originally Posted by Antimony (Post 452711)
Hi,

Are you sure Cp1 is not the specific heat capacity? If it is specific heat capacity then the units would be J/(kg.K).

Also, isn't the unit of q W/m2?

Regards,

Antimony

i referred the following article http://www.idurun.com/?p=556 to fit turbulent energy in my case. if you see the right hand side of the equation the dimensions you will find as (K/sec) and to justify the dimension i used q in (j/sec) and Cp1 in terms of heat capacity not specific heat capacity. so q u can assume here is in Watt only.


All times are GMT -4. The time now is 08:24.