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

Problem: Updating temperature file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2020, 04:53
Default Problem: Updating temperature file
  #1
Member
 
Philipp
Join Date: Feb 2019
Posts: 35
Rep Power: 7
Phigo90 is on a distinguished road
Hi,


I am working with the InterCondensatingEvaporatingFoam. I am trying to do some changes because for my case it is not "physical enough".
My problem is that the Output in the logSolver is not useful.
I am just learning C++, so I am not a Professional for now.


However, in the solver there is a reference for the temperature field in the beginning:
volScalarField& T = thermo->T();

In the eEqn.H the energy-equation is set up and solved. Based on this field, the temperature is calculated by the following line and thus the protected variable T_ is updated:

thermo->correct();

I've added another correct(alCheck,enCheck,Check,nmbrfaces) function, which calculates the temperature field in a different way (the original version leads to negative values for the temperature since the calculation for mixed cells (0<alpha<1) doesnt make sense). In my version T_ is also updated, I just changed the way how it is calculated.

Now to the problem:
If I check the logSolver, for example at Time=0.001 the temperature is not negative but already to low. For later times the log-file says that the min(T) is negative, which is in contrast to my T-Output (No vlaue lower than 76K, which is physical since I am simulating a cryogenic cooling case).


In Paraview the temperature field of the "newVersion" has a minimum value of 76K, which is physical. At later times no negative values can be oberseved. So everything seems to be well. If I check the logSolver-file the Output says:

min/max(T) = 21.6713, 673
GAMG: Solving for p_rgh, Initial residual = 0.01893, Final residual = 0.000186089, No Iterations 9
GAMG: Solving for p_rgh, Initial residual = 0.0123978, Final residual = 9.10196e-05, No Iterations 10
GAMG: Solving for p_rgh, Initial residual = 0.00364705, Final residual = 3.43957e-05, No Iterations 10
GAMG: Solving for p_rgh, Initial residual = 0.00118128, Final residual = 1.14063e-05, No Iterations 10
GAMGPCG: Solving for p_rgh, Initial residual = 0.000417309, Final residual = 8.1684e-10, No Iterations 16
ExecutionTime = 107.56 s ClockTime = 110 s

Courant Number mean: 0.155013 max: 1.04568
deltaT = 1.38462e-06
Time = 0.001

After thermo->correct(alCheck,enCheck,Check,nmbrfaces) the following lines are written in the eEqn.H:
En=thermo->he();
Info<< "min/max(T) = " << min(T).value() << ", "
<< max(T).value() <<endl;

To say it in words: The En is updated based on e_, which is a protected Variable of the class. The Info Variabel is just the Output of the minimum and maximum value of the temperature. I do not understand why the minimum value should be negative at Time=0.001, because the temperature is not negative for all cells.


So I do not understand what is the different between T in eEqn.H and the updated T_ in correct(), because T is just a Reference...Hopefully I have illustrated my problem well. Thanks in advance.
Phigo90 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
[OpenFOAM.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 5 January 17, 2023 16:05
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 05:18
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44


All times are GMT -4. The time now is 21:14.