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

thermoPhysical: simulation crashes with perfectGas-rhoCoeffs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 24, 2017, 03:43
Default thermoPhysical: simulation crashes with perfectGas-rhoCoeffs
  #1
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
Dear CFDlers,

I hope you enjoy your christmas as I do.

I have a question with buoyantPimpleFoam. I think I resolve it some day. But may be, somebody knows a solution faster.

I simulate the mass transfer of a component which is active at a surface (electroplating). Instead of concentration (which I need to know) I use temperature: The equations are the same. buoyantPimpleFoam is suitable for this.

In the first step I calculated something with forced convection, a flow from a pump is directed to the surface (electrode). The results look fine. I use a temperature of 0 at the surface (all of the content of chemicals is consumed there) and a temperature (in my case concentration) of 1 in the inner of the fluid. The "1" represents the concentration of the free flow / main volume.

~

A more complicated case is the free convection: The flow is driven by the density difference. At the surroundings of the surface the fluid is lighter because one if the ingredient is removed by the reaction.

I first changed my simulation only in one detail. In the thermophysical properties I change

Code:
thermoType
{
:
     equationOfState rhoConst;
}

mixture {
        rho             1200; // Dichte
    }
}
to

Code:
thermoType {
:
    equationOfState perfectGas;
}

mixture {
:
    equationOfState  {
	rhoCoeffs<8> (1200 0 0 0 0 0 0 0);
    }
}
From my point of view this should change nothing: The density is constant 1200 kg/m³. In reality I would use

Code:
	rhoCoeffs<8> (1000 200 0 0 0 0 0 0);
which means at c=0 the density is the one of pure water, and with the chemical in it it is 20% higher.

The simulation runs fine with rhoConst. It crashes with perfectGas:

Code:
:
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = nan, Final residual = nan, No Iterations 1001
DILUPBiCG:  Solving for Uy, Initial residual = nan, Final residual = nan, No Iterations 1001
DILUPBiCG:  Solving for h, Initial residual = nan, Final residual = nan, No Iterations 1001
GAMG:  Solving for p_rgh, Initial residual = nan, Final residual = nan, No Iterations 1000
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = nan, global = nan, cumulative = nan
GAMG:  Solving for p_rgh, Initial residual = nan, Final residual = nan, No Iterations 1000


--> FOAM FATAL IO ERROR:
wrong token type - expected Scalar, found on line 0 the word 'nan'
Does somebody of you know what mistake I made?

Thank you for your help, Uwe.


The complete log:
Code:
buoyantPimpleFoam
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
|*---------------------------------------------------------------------------*|
|* OpenFOAM for Windows 17.02 (v1)                                           *|
|* Built by CFD Support, www.cfdsupport.com (based on Symscape).             *|
\*---------------------------------------------------------------------------*/
Build  : 3.0.x-495c0feff174
Exec   : C:\OpenFOAM\17.02\cygwin64\opt\OpenFOAM\OpenFOAM-3.0.x\platforms\cygwin64mingw-w64DPInt32Opt\bin\buoyantPimpleFoam.exe
Date   : Dec 24 2017
Time   : 07:38:44
Host   : "ALBIREO"
PID    : 9392
Case   : C:/OpenFOAM/17.02/uwe-3.0.x/run/AHull2dFreieKonvektion
nProcs : 1
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: max iterations = 100
    field "(p|U|k|epsilon)"     : relTol 0, tolerance 0.01

Reading thermophysical properties

Selecting thermodynamics package
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type laminar

Reading g

Reading hRef
Calculating field g.h

Reading field p_rgh

Creating field dpdt

Creating field kinetic energy K

No MRF models present

No finite volume options present

Radiation model not active: radiationProperties not found
Selecting radiationModel none
Courant Number mean: nan max: nan

Starting time loop

Courant Number mean: nan max: nan
deltaT = 0.00119048
Time = 0.00119048

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = nan, Final residual = nan, No Iterations 1001
DILUPBiCG:  Solving for Uy, Initial residual = nan, Final residual = nan, No Iterations 1001
DILUPBiCG:  Solving for h, Initial residual = nan, Final residual = nan, No Iterations 1001
GAMG:  Solving for p_rgh, Initial residual = nan, Final residual = nan, No Iterations 1000
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = nan, global = nan, cumulative = nan
GAMG:  Solving for p_rgh, Initial residual = nan, Final residual = nan, No Iterations 1000


--> FOAM FATAL IO ERROR:
wrong token type - expected Scalar, found on line 0 the word 'nan'

file: C:/OpenFOAM/17.02/uwe-3.0.x/run/AHull2dFreieKonvektion/system/data.solverPerformance.p_rgh at line 0.

    From function operator>>(Istream&, Scalar&)
    in file lnInclude/Scalar.C at line 93.

FOAM exiting
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   December 24, 2017, 11:42
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
I found a solution by myself. Instead of changing the behavior of rho only I switched to the all polynomial formulation:

Code:
thermoType {
    type            heRhoThermo;
    mixture         pureMixture;
    transport       polynomial;
    thermo          hPolynomial;
    equationOfState icoPolynomial;
    specie          specie;
    energy          sensibleEnthalpy;
}
I cannot use the Prandtl (Schmidt) number anymore, but have to get the thermal conductivity. Two keep thinking in Pr, simply use

\kappa = \frac{\eta c_p }{Pr}
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 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
Simulation crashes early, crashes hard... MtnRunBeachBum OpenFOAM Running, Solving & CFD 6 April 22, 2015 10:27
rhoPimpleFoam/cavity: crashes if simulation time is increased n4a0505 OpenFOAM Running, Solving & CFD 0 February 15, 2015 05:50
Problem - simulation crashes by changing flow velocity Harak OpenFOAM Running, Solving & CFD 19 February 13, 2015 00:26
heat transfer simulation in a tube with the variations of thermophysical properties Gary51075607 OpenFOAM 0 January 12, 2015 09:36
IcoFsiFoam simulation crashes when using a smaller timestep mathieu OpenFOAM Running, Solving & CFD 1 May 17, 2009 04:54


All times are GMT -4. The time now is 22:31.