CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   incompatible Dimensions with Melting Solver (https://www.cfd-online.com/Forums/openfoam/222543-incompatible-dimensions-melting-solver.html)

Evi November 28, 2019 06:56

incompatible Dimensions with Melting Solver
 
Hello,

I tried to compile a solver I used with OF 3.4 with OFv1906. With 3.4 it worked fine, now it tells me that the dimensions are incompatible.
Code:

Calculating scalar transport22222

--> FOAM Warning :
    From function void Foam::timeControl::read(const Foam::dictionary&)
    in file db/functionObjects/timeControl/timeControl.C at line 94
    Reading "/mnt/c/Users/ac134577/OpenFOAM/Test2/system/controlDict.functions.T"
    Using deprecated 'outputControl'
    Please use 'writeControl' with 'writeInterval'
Reading set description:
    Line_x_y0z0



--> FOAM FATAL ERROR:
incompatible dimensions for operation
    [T[0 0 -1 1 0 0 0] ] + [T[0 2 -3 0 0 0 0] ]

    From function void Foam::checkMethod(const Foam::fvMatrix<Type>&, const Foam::fvMatrix<Type>&, const char*) [with Type = double]
    in file /opt/OpenFOAM/OpenFOAM-v1906/src/finiteVolume/lnInclude/fvMatrix.C at line 1349.

The solver looks like this:

Quote:

{
fvScalarMatrix TEqn
(
fvm::ddt(cp, T) // fvm::ddt(cp, T)
+ fvm::div(phi*fvc::interpolate(cp), T) //+ fvm::div(phi*fvc::interpolate(cp), T) + fvm::div(phi, T)
+ hs*4.0*exp(-pow(4.0*(T-Tmelt)/(Tl-Ts),2))/Foam::sqrt(3.1415)/(Tl-Ts)*fvm::ddt(T)
+ hs*4.0*exp(-pow(4.0*(T-Tmelt)/(Tl-Ts),2))/Foam::sqrt(3.1415)/(Tl-Ts)*(U & fvc::grad(T))
- fvm::laplacian(lambda/rho, T)//- fvm::laplacian(lambda/rho, T)
);

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

alpha = 0.5*Foam::erf(4.0*(T-Tmelt)/(Tl-Ts))+scalar(0.5);

cp = alpha*cpL+(1.0-alpha)*cpS;
lambda = alpha*lambdaL+(1.0-alpha)*lambdaS;
//nu = alpha*nuL+(1.0-alpha)*nuS;
//rhok = 1.0 - Foam::max(beta*(T - Tl),0.0);
//DC = DCl*Foam::pow(1.0-alpha,2)/(Foam::pow(alpha,3)+DCs);
}
And the transportPropertiesFile looks like this:

Code:

DT              DT      [ 0 2 -1 0 0 0 0] 112e-05;        //ALu 112 e-05        //Stahl 8.8e-06
rho            rho      [ 1 -3 0 0 0 0 0] 2710; // Dichte
lambda          lambda  [1 1 -3 -1 0 0 0] 235; // Wärmeleitfähigkeit  Alu 235, Stahl 80 --> 1 1 -3 -1 0 0 0-->(2)1 1 -1 0 0 0 0
cp              cp      [  2 -2 1 0 0 0] 38.2; // Wärmekapazität    0 2 -2 1 0 0 0
T_evap          T_evap  [ 0 0 0 1 0 0 0 ] 2743; // evaporation temperatur, Alu 2743, Stahl 3273
lambdaS                        lambdaS        [1 1 -3 -1 0 0 0] 235;                // WLF Solid
lambdaL                        lambdaL        [1 1 -3 -1 0 0 0] 235;                // WLF Liquid
cpS                cpS                [  2 -2 1 0 0 0] 38.2; // Wärmekapazität
cpL                  cpL                [  2 -2 1 0 0 0 ] 38.2; // Wärmekapazität
hs                  hs [0 2 -2 0 0 0 0] 208700;       
nuL            nuL [0 2 -1 0 0 0 0] 2.97e-07;
nuS            nuS [0 2 -1 0 0 0 0] 2.97e-07;
Ts              Ts [0 0 0 1 0 0 0] 1357.62;
Tl              Tl [0 0 0 1 0 0 0] 1357.7;
beta            beta [0 0 0 -1 0 0 0] 1.2e-4;
DCl            DCl [0 0 -1 0 0 0 0] 1.6e06;
DCs            DCs [0 0 0 0 0 0 0] 1e-03;

I tried changing the dimensions to check which of the dimensions it is, but whatever I change I can't figure out where the actual Problem ist. Can anyone tell me what I do wrong?
Thank you in advance!


All times are GMT -4. The time now is 15:07.