saving . . . saved openfoam dimensions error has been deleted. openfoam dimensions error has been hidden .
openfoam dimensions error
Title
Question
Hello everyone
Trust you are well

May you kindly assist me, I have modified an openfoam solver by adding a temperature equation.

                fvm::ddt((rho*Cp),T)
              + fvm::div((rho*Cp*phi),T)
              - fvm::laplacian(k,T) ==
                gamma*(visco.tau() && fvc::grad(U))
              + (1.0-gamma)*(1.0-beta)*(symm(fvc::grad(U)) && symm(fvc::grad(U)))
              - fvm::Sp(hc,Tw)+hc*T                
            );
where Tw is wall temperature and T fluid temperature

and these are dimension of coefficients used

rho            rho [1 -3 0 0 0 0 0]

gamma      gamma [0 0 0 0 0 0 0]

beta           beta [0 0 0 0 0 0 0]

k              k [1 1 -3 -1 0 0 0]

Cp             Cp [0 2 -2 -1 0 0 0]

hc             hc [1 0 -3 -1 0 0 0]

when I run the case file I keep getting this error

--> FOAM FATAL ERROR:
LHS and RHS of + have different dimensions
     dimensions : [1 -1 -3 0 0 0 0] + [0 0 -2 0 0 0 0]


    From function operator+(const dimensionSet& ds1, const dimensionSet& ds2)
    in file dimensionSet/dimensionSet.C at line 407.

Not sure how to resolve this issue, may you kindly assist me

thanks


OpenFOAM General None min None sec 26-08-21, 7:57 p.m. AM1

Answers:

Hi,

The formula looks wrong. The first 2 terms on the RHS have different units and addition of terms having different units, as also mentioned in the error message, isn't a valid mathematical operation. Please check the formula again.

Regards,
Ashley 
26-08-21, 9:50 p.m. ashleymelvin1193@gmail.com


Hi Ashley

Thank you for your assistance, indeed the formula was incorrect and there were other dimensioned parameters that I omitted. I have resolved the problem

Regards
28-08-21, 3:25 p.m. AM1


Log-in to answer to this question.