CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

How to fix a value in the buoyanPimpleFoam solver?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 26, 2012, 06:15
Default How to fix a value in the buoyanPimpleFoam solver?
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
Dear all,

I am trying to add a constant field at the buoyantPimpleFoam (thank to the explicitSetValue feature) ad I did for the buoyantSimpleFoam (see here).

I modified the solver and you can find it attached.

When I try to use it, I get the following error:

Code:
lab@lab-laptop:~/Documenti/cases_OF/OF_case10_unsteady1_mod$ buoyantPimpleFoam_Epta 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec   : buoyantPimpleFoam_Epta
Date   : Mar 26 2012
Time   : 12:14:00
Host   : "lab-laptop"
PID    : 6720
Case   : /home/lab/Documenti/cases_OF/OF_case10_unsteady1_mod
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0


Reading g
Reading thermophysical properties

Selecting thermodynamics package hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
    Prt             1;
}

Calculating field g.h

Reading field p_rgh

Creating field dpdt

Creating field kinetic energy K

Creating field source list from sourcesProperties

Selecting source model type scalarExplicitSetValue
    Source: air_infinite
    - selecting cells using cellSet air_infinite
    - selected 2730 cell(s) with volume 1.2

Courant Number mean: 0 max: 0

PIMPLE: Operating solver in PISO mode


Starting time loop

Courant Number mean: 0 max: 0
deltaT = 0.072
Time = 0.072

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 9.37413e-07, No Iterations 33
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 7.89177e-07, No Iterations 32
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 9.68752e-07, No Iterations 23
DILUPBiCG:  Solving for h, Initial residual = 0.00105513, Final residual = 9.73831e-07, No Iterations 13
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/libc.so.6"
#3  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::calculate() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::correct() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#5  
 in "/home/lab/OpenFOAM/lab-2.1.0/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam_Epta"
#6  __libc_start_main in "/lib/libc.so.6"
#7  
 in "/home/lab/OpenFOAM/lab-2.1.0/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam_Epta"
Floating point exception
Could anyone help to solve it?

Thanks a lot,

Samuele
Attached Files
File Type: gz buoyantPimpleFoam_Epta.tar.gz (2.9 KB, 17 views)
samiam1000 is offline   Reply With Quote

Old   March 26, 2012, 10:21
Default
  #2
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 204
Rep Power: 12
kwardle is on a distinguished road
Looks to me like it is dying on the thermo.correct() line after the hEqn solution. Are you sure your initial conditions are correct/valid? For example, have you verified that your setup works with the standard buoyantPimpleFoam without sources?
Other than that, I have no experience with this thermo model so I can't really say much.
Good luck.
kwardle is offline   Reply With Quote

Old   March 27, 2012, 04:54
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
Dear Kent, Dear All,

first of all, thanks for answering.

Actually, I did try my case with the standard buoyantSimpleFoam solver and - tough a bit slow - it works.

Now it is a bit different: I've edited my solver (see attached) and I get this error: when I write
Code:
    sources.constrain(hEqn);
I get this error:
Code:
lab@lab-laptop:~/Documenti/cases_OF/OF_case10_unsteady1_mod$ buoyantPimpleFoam_Epta 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec   : buoyantPimpleFoam_Epta
Date   : Mar 27 2012
Time   : 10:50:08
Host   : "lab-laptop"
PID    : 5316
Case   : /home/lab/Documenti/cases_OF/OF_case10_unsteady1_mod
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0


Reading g
Reading thermophysical properties

Selecting thermodynamics package hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model kEpsilon
--> Upgrading k to employ run-time selectable wall functions
    Backup original k to k.old
    Writing updated k
--> Upgrading epsilon to employ run-time selectable wall functions
    Backup original epsilon to epsilon.old
    Writing updated epsilon
--> Creating mut to employ run-time selectable wall functions
    Writing new mut
--> Creating alphat to employ run-time selectable wall functions
    Writing new alphat
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
    Prt             1;
}

Calculating field g.h

Reading field p_rgh

Creating field dpdt

Creating field kinetic energy K

Creating field source list from sourcesProperties

Selecting source model type scalarExplicitSetValue
    Source: air_infinite
    - selecting cells using cellSet infinite_air
    - selected 2730 cell(s) with volume 1.2

Courant Number mean: 0 max: 0

PIMPLE: Operating solver in PISO mode


Starting time loop

Courant Number mean: 0 max: 0
deltaT = 0.12
Time = 0.12

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 9.76351e-07, No Iterations 43
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 9.9149e-07, No Iterations 41
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 9.41257e-07, No Iterations 27
Ok qui - test 1 (file hEqn.H)

DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 9.89139e-07, No Iterations 46
Ok qui - test 2 (file hEqn.H)

#0  Foam::error::printStack(Foam::Ostream&)^C
lab@lab-laptop:~/Documenti/cases_OF/OF_case10_unsteady1_mod$
Any idea?
Attached Files
File Type: gz buoyantPimpleFoam_Epta.tar.gz (3.0 KB, 4 views)

Last edited by samiam1000; March 27, 2012 at 06:02. Reason: I forgot the attachement
samiam1000 is offline   Reply With Quote

Old   April 2, 2012, 04:59
Default
  #4
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
Dear Kent, Dear All,

I still have some problems with the buoyantPimpleFoam_Epta.

It is very strange, since I have done the same modification I did with the steady solver.

When I run it, trying to impose the velocity, I get this error message:
Code:
lab@lab-laptop:~/Documenti/cases_OF/OF_case09_steady_vs_unsteady/unsteady_mod$ buoyantPimpleFoam_Epta 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec   : buoyantPimpleFoam_Epta
Date   : Apr 02 2012
Time   : 10:45:33
Host   : "lab-laptop"
PID    : 4310
Case   : /home/lab/Documenti/cases_OF/OF_case09_steady_vs_unsteady/unsteady_mod
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0


Reading g
Reading thermophysical properties

Selecting thermodynamics package hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
    Prt             1;
}

Calculating field g.h

Reading field p_rgh

Creating field dpdt

Creating field kinetic energy K

Creating field source list from sourcesProperties

Selecting source model type vectorExplicitSetValue
    Source: air_infinite
    - selecting cells using cellSet air_infinite
    - selected 2730 cell(s) with volume 1.2

Courant Number mean: 0.000552417 max: 5.02789

PIMPLE: no residual control data found. Calculations will employ 2 corrector loops


Starting time loop

Courant Number mean: 8.24029e-05 max: 0.75
deltaT = 0.0298336
Time = 0.0298336

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
buoyantPimpleFoam_Epta: malloc.c:4630: _int_malloc: Assertion `(unsigned long)(size) >= (unsigned long)(nb)' failed.
Aborted
Attached you can find the last version of the solver I modified.

Could you help?

Thanks a lot,

Samuele
Attached Files
File Type: gz buoyantPimpleFoam_Epta.tar.gz (3.0 KB, 1 views)
samiam1000 is offline   Reply With Quote

Old   April 3, 2012, 05:56
Default
  #5
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
Here the 2 solvers.

buoyantSimpleFoam works properly, buoyantPimpleFoam doesn't. Any idea?

Thanks a lot,

Samuele
Attached Files
File Type: gz buoyantPimpleFoam_Epta.tar.gz (3.1 KB, 5 views)
File Type: gz buoyantSimpleFoam_Epta.tar.gz (2.8 KB, 5 views)
samiam1000 is offline   Reply With Quote

Old   April 3, 2012, 06:31
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,215
Blog Entries: 35
Rep Power: 94
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Samuele,

Unfortunately I'm not experienced enough yet to be able to simply look at a modified solver source code and indicate where the problem might be.

I'm not sure if I would be able to point out the problem with examples cases either... But for other people with a bit more experience, it would be good if you also provided an example case for each solver, so anyone can do some trial-and-error in figuring out what's wrong with it!

Best regards,
Bruno
__________________
___
I'll be at OFW11 in Portugal
wyldckat is offline   Reply With Quote

Old   April 3, 2012, 06:37
Default
  #7
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
This is the link to my case. I provide only the case that I need to solve using buoyanyPimpleFoam_Epta, since buoyanySimpleFoam_Epta works properly.

Thanks a lot
Samuele
samiam1000 is offline   Reply With Quote

Old   April 3, 2012, 10:42
Default
  #8
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 204
Rep Power: 12
kwardle is on a distinguished road
You example case is missing polyMesh/sets and does not run. You have not included a topoSetDict so I am not sure how you are setting this. Seems like you mentioned some way to set this from you cellZone. Please instruct.
kwardle is offline   Reply With Quote

Old   April 3, 2012, 10:57
Default
  #9
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
Ooops, sorry.

Let me upload a new case, then.

As far as topoSetDict is concerned, I do not need it.

In buoyantSimpleFoam_Epta I run (successefully!) the case without that file.

Here you can download the new case.

Thanks a lot,

Samuele
samiam1000 is offline   Reply With Quote

Old   April 3, 2012, 11:12
Default
  #10
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 204
Rep Power: 12
kwardle is on a distinguished road
Runs with no problem on my machine. Based on the malloc error you are seeing, probably it is linking to the wrong library somewhere and you need to recompile it. Try to wclean and then wmake again the solver and see if it works.

BTW, I also ran with 8 cores no problems.

Last edited by kwardle; April 3, 2012 at 11:13. Reason: add info
kwardle is offline   Reply With Quote

Old   April 3, 2012, 11:20
Default
  #11
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
Sorry,

my solver with this case works because you don't have any source applied.

The point is that when you add the sourcesProperties file in the constant folder something strange happens.

You could try, copying this text in an empty file and saving it as sourcesProperties in the constant folder:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      sourcesProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

air_infinite
{
    //type            vectorExplicitSetValue;
    type            scalarExplicitSetValue;
    active          true;
    timeStart       0;
    duration        100;
    selectionMode   cellSet;
    cellSet         air_infinite;

    //vectorExplicitSetValueCoeffs
    scalarExplicitSetValueCoeffs
    {
        volumeMode      absolute; //specific
        injectionRate
        {
            //U              (0 0.2 0);
	    h              278000;
        }
    }
}
Could you kindly try?

Thanks a lot,

Sam
samiam1000 is offline   Reply With Quote

Old   April 3, 2012, 12:18
Default
  #12
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 204
Rep Power: 12
kwardle is on a distinguished road
Looks like the problem is with thermo.correct(). Perhaps there is some reason this does not work with sources? Unfortunately I have no experience with this specific class of solvers.
kwardle is offline   Reply With Quote

Old   April 4, 2012, 02:55
Default
  #13
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
Hi Kent and thanks again for answering.

Actually, if you look at the buoyanSimpleFoam_Epta (attached here!), you can see that it is the same and that the sources can work with the thermo.correct.

It's strange: it works with the steady case, but it doesn't with the unsteady.

Does anyone have an idea?

Thanks,

Sam
Attached Files
File Type: gz buoyantSimpleFoam_Epta.tar.gz (2.8 KB, 6 views)
samiam1000 is offline   Reply With Quote

Old   April 5, 2012, 04:09
Default
  #14
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 10
samiam1000 is on a distinguished road
Hey Kent, Hey all,

pardon the question, but what about thermo.correct? Which files are linked to this line and what it does?

Thanks a lot,

Samuele
Attached Files
File Type: gz buoyantPimpleFoam_Epta.tar.gz (3.1 KB, 1 views)
File Type: gz buoyantSimpleFoam_Epta.tar.gz (2.8 KB, 2 views)

Last edited by samiam1000; April 5, 2012 at 07:09.
samiam1000 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
A New Solver for Supersonic Combustion nakul OpenFOAM 6 March 30, 2014 03:00
A New Solver for Supersonic Combustion nakul OpenFOAM Announcements from Other Sources 18 February 19, 2013 08:48
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


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