CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Implemantation Temperature equation in interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2020, 18:39
Default Implemantation Temperature equation in interFoam
  #1
New Member
 
Cláudio Corrêa
Join Date: Aug 2016
Posts: 10
Rep Power: 9
claudiocorrea is on a distinguished road
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:rintStack(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:perator-<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?
claudiocorrea is offline   Reply With Quote

Old   June 17, 2020, 04:58
Default
  #2
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
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?
geth03 is offline   Reply With Quote

Old   June 17, 2020, 12:18
Default
  #3
New Member
 
Cláudio Corrêa
Join Date: Aug 2016
Posts: 10
Rep Power: 9
claudiocorrea is on a distinguished road
Quote:
Originally Posted by geth03 View Post
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
Attached Files
File Type: h createFields.H (2.8 KB, 10 views)
File Type: h immiscibleIncompressibleTwoPhaseMixture.H (3.3 KB, 7 views)
File Type: c incompressibleTwoPhaseMixture.C (6.1 KB, 8 views)
File Type: h incompressibleTwoPhaseMixture.H (5.1 KB, 7 views)
File Type: h TEqn.H (304 Bytes, 19 views)
claudiocorrea is offline   Reply With Quote

Old   June 18, 2020, 08:30
Default
  #4
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
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.
geth03 is offline   Reply With Quote

Old   June 18, 2020, 13:21
Default
  #5
New Member
 
Cláudio Corrêa
Join Date: Aug 2016
Posts: 10
Rep Power: 9
claudiocorrea is on a distinguished road
Quote:
Originally Posted by geth03 View Post
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 is offline   Reply With Quote

Old   July 16, 2020, 18:56
Default
  #6
New Member
 
Cláudio Corrêa
Join Date: Aug 2016
Posts: 10
Rep Power: 9
claudiocorrea is on a distinguished road
Quote:
Originally Posted by geth03 View Post
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.
claudiocorrea is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding temperature equation to porousSimpleFoam David_010 OpenFOAM Programming & Development 9 February 14, 2018 01:22
Problem with Velocity Poisson Equation and Vector Potential Poisson Equation mykkujinu2201 Main CFD Forum 1 August 12, 2017 13:15
SimpleFoam and Temperature Equation Pat84 OpenFOAM Running, Solving & CFD 5 June 16, 2014 00:43
Adding temperature equation to twoPhaseEulerFoam nikhil5490 OpenFOAM Programming & Development 0 April 30, 2014 13:28
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27


All times are GMT -4. The time now is 11:06.