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/)
-   -   Implemantation Temperature equation in interFoam (https://www.cfd-online.com/Forums/openfoam-solving/227928-implemantation-temperature-equation-interfoam.html)

claudiocorrea June 14, 2020 18:39

Implemantation Temperature equation in interFoam
 
Dears,

I implemented temperature equation in interFoam on openFoam 7. After making changes in incompressibleTwoPhaseMixture and immiscibleIncompressibleTwoPhaseMixture and to compile I did the same with interFoam. Everything went well, but when to run one case to check if the newInterFoam it was working right, this error appear and the simulation blow up.

PIMPLE: Iteration 1
smoothSolver: Solving for alpha.water, Initial residual = 0.999931, Final residual = 3.74251e-17, No Iterations 1
Phase-1 volume fraction = 1.23783e-19 Min(alpha.water) = 0 Max(alpha.water) = 1
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 1.23783e-19 Min(alpha.water) = -2.18953e-54 Max(alpha.water) = 1
smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 4.44102e-07, No Iterations 1
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 4.27562e-07, No Iterations 1
smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 4.44386e-07, No Iterations 1
GAMG: Solving for p_rgh, Initial residual = 1, Final residual = 9.64132e-05, No Iterations 1000
time step continuity errors : sum local = 2.85405e-12, global = -4.21617e-14, cumulative = -4.21741e-14
smoothSolver: Solving for epsilon, Initial residual = 0.000141116, Final residual = 5.0585e-11, No Iterations 1
smoothSolver: Solving for k, Initial residual = 1, Final residual = 4.73213e-07, No Iterations 1


--> FOAM FATAL ERROR:
incompatible dimensions for operation
[T[1 -3 -1 1 0 0 0] ] - [T[1 -1 -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/openfoam7/src/finiteVolume/lnInclude/fvMatrix.C at line 1270.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 void Foam::checkMethod<double>(Foam::fvMatrix<double> const&, Foam::fvMatrix<double> const&, char const*) in "/home/claudio/OpenFOAM/claudio-7/platforms/linux64GccDPInt32Opt/bin/newInterFoam"
#3 Foam::tmp<Foam::fvMatrix<double> > Foam::operator-<double>(Foam::tmp<Foam::fvMatrix<double> > const&, Foam::tmp<Foam::fvMatrix<double> > const&) in "/home/claudio/OpenFOAM/claudio-7/platforms/linux64GccDPInt32Opt/bin/newInterFoam"
#4 ? in "/home/claudio/OpenFOAM/claudio-7/platforms/linux64GccDPInt32Opt/bin/newInterFoam"
#5 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6 ? in "/home/claudio/OpenFOAM/claudio-7/platforms/linux64GccDPInt32Opt/bin/newInterFoam"
Aborted (core dumped)

Could someone tell me what´s going on?

geth03 June 17, 2020 04:58

the key error here is:
--> FOAM FATAL ERROR:
incompatible dimensions for operation
[T[1 -3 -1 1 0 0 0] ] - [T[1 -1 -3 0 0 0 0] ]

in your equation you have a dimension mismatch,
you try to substract kg*m*s^-3 from kg*m*s^-3*K.
can you show the equation with the dimensions please?

claudiocorrea June 17, 2020 12:18

5 Attachment(s)
Quote:

Originally Posted by geth03 (Post 774843)
the key error here is:
--> FOAM FATAL ERROR:
incompatible dimensions for operation
[T[1 -3 -1 1 0 0 0] ] - [T[1 -1 -3 0 0 0 0] ]

in your equation you have a dimension mismatch,
you try to substract kg*m*s^-3 from kg*m*s^-3*K.
can you show the equation with the dimensions please?

Hi Geth03

Thank you for your support.

Attached follow the files TEqn.H, createFields, incompressibleTwoPhaseMixture and immiscibleIncompressibleTwoPhaseMixture.

Regards

geth03 June 18, 2020 08:30

i checked your TEqn multiple times and i think the dimensions for each term is [T[1 -1 -3 0 0 0 0] ].
please note that in this case there is no temperature unit involved anymore,
so i don't know if the solution would then have any temperature unit out of thin air.

please correct me if i'm wrong.

claudiocorrea June 18, 2020 13:21

Quote:

Originally Posted by geth03 (Post 775012)
i checked your TEqn multiple times and i think the dimensions for each term is [T[1 -1 -3 0 0 0 0] ].
please note that in this case there is no temperature unit involved anymore,
so i don't know if the solution would then have any temperature unit out of thin air.

please correct me if i'm wrong.

Thanks for analyzing my data. I wil confirm the data I entered in the interFoam and reply to you next week.

claudiocorrea July 16, 2020 18:56

Quote:

Originally Posted by geth03 (Post 775012)
i checked your TEqn multiple times and i think the dimensions for each term is [T[1 -1 -3 0 0 0 0] ].
please note that in this case there is no temperature unit involved anymore,
so i don't know if the solution would then have any temperature unit out of thin air.

please correct me if i'm wrong.

I'm sorry for answering so late. You were right but I found my error. I didn't define kappa and Prandtl number in transportModel file. After this definition I got it to compile the new solver.

I haven't been able to simulate a case yet to check if solver is running fine.


All times are GMT -4. The time now is 23:03.