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]
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.
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
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
Regards,
Ashley
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
Login to add comment