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

potentialFoam: request for volScalarField rho

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2015, 13:41
Default potentialFoam: request for volScalarField rho
  #1
Member
 
Join Date: Dec 2015
Posts: 67
Rep Power: 8
WhiteW is on a distinguished road
Hi, I'm trying to use potentalFoam in order to initialize the flow of an external aerodynamic.
The solver I want to use is rhoSimplecFoam and the analysis seems to work well with the setting I'm using.
However if I try to initilaize the flow with potentialFoam (using the comand "potentialFoam") I get the following error:

Code:
--> FOAM FATAL ERROR:

    request for volScalarField rho from objectRegistry region0 failed
    available objects of type volScalarField are

2
(
div(phi)
p
)


    From function objectRegistry::lookupObject<Type>(const word&) const
    in file /home/bedon/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198.

FOAM aborting

In fvSolution I have added the part:

Code:
potentialFlow
{
    nNonOrthogonalCorrectors 10;
}

Am I missing something?
Thanks!
WhiteW
WhiteW is offline   Reply With Quote

Old   December 6, 2015, 17:07
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 36
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

potentialFoam itself neither creates nor looks up rho volume scalar field and since your error messages are rather trimmed, I could try to guess, you are using fvOptions or functionObjects, which request rho field. Also it is possible that you are using boundary conditions for velocity or pressure that require rho field.
alexeym is offline   Reply With Quote

Old   December 7, 2015, 06:04
Default
  #3
Member
 
Join Date: Dec 2015
Posts: 67
Rep Power: 8
WhiteW is on a distinguished road
Hi, thanks for reply.
You are right, Im using both fvOptions and a p boundary that involves the use of rho. I report the 0/p file:


Code:
#include        "include/initialConditions"

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform $pressure;

boundaryField
{
       inflow
        {
                //typeA           zeroGradient;
                type            totalPressure;
                p0              uniform $totPressure;
                gamma           1.4;
                U               U;
                phi             phi;
                rho             rho;
                value           $internalField;
        }

        outflow
        {
                type            fixedValue;
                value           $internalField;
        }

#include "include/box"

        "(wall_fuselage|wall_nose)"
        {
                type            zeroGradient;
        }
So, if I woluld like to initialize the flow with potentialFoam, have I to change the boundary settings? And have I to changhe them back when the flowfield is initializated?
Thanks,
WhiteW
WhiteW is offline   Reply With Quote

Old   December 7, 2015, 06:21
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 36
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

You could either change boundary conditions (and remove fvOptions), initialize flow, revert changes; or create separate simplified case for potentialFoam and then use mapFields to map initialized flow field from potentialFoam case to your rhoSimplecFoam case.
alexeym is offline   Reply With Quote

Old   December 7, 2015, 13:00
Default
  #5
Member
 
Join Date: Dec 2015
Posts: 67
Rep Power: 8
WhiteW is on a distinguished road
Thanks alexeym, I'll try to use mapFields!
WhiteW is offline   Reply With Quote

Old   December 8, 2015, 05:28
Default
  #6
Member
 
Join Date: Dec 2015
Posts: 67
Rep Power: 8
WhiteW is on a distinguished road
Ok, I have run the potentialFoam in an incompressible setting (simpleFoam).
I have obtained the internalField in 0/U.
Now in the original folder (where then I'll use rhoSimplecFoam) I run:
mapField -consistent
Is it the right command? I'm not sure about the consistent option, the geometry it is the same (identical number of cells), however the Boundary conditions change..

WhiteW
WhiteW is offline   Reply With Quote

Old   December 8, 2015, 05:39
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 36
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

It should be something like:

Code:
mapFields -fields '(U)' -sourceTime latestTime <path-to-your-potentialFoam-case>
About -consistent flag: verify. If it works, OK proceed with the next simulation, if not, try without the flag, if it works, OK proceed with the next simulation. If both ways fail, post question.
alexeym is offline   Reply With Quote

Old   December 8, 2015, 13:04
Default
  #8
Member
 
Join Date: Dec 2015
Posts: 67
Rep Power: 8
WhiteW is on a distinguished road
Hi
the two folder I'm using are Base_potential (where I run the potentialFoam and I get the U with the initilaized internal field) and Base_potential2 (where I will run the rhoSimplecFoam.
I tried the command:

Code:
mapFields -fields '(U)' -sourceTime 0  /home/OF/Baseline_2.224_potential
However nothing seems to happen, the 0/U file is the same. I report the log of mapFields:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : mapFields /home/OF/Base_potential -consistent
Date   : Dec 07 2015
Time   : 22:32:04
Host   : "node7"
PID    : 123291
Case   : /home/OF/Base_potential2
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

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Source: "/home/OF" "Baseline_2.224_potential"
Target: "/home/OF" "Baseline_2.224_potential2"

Create databases as time
Case   : /home/OF/Base_potential
nProcs : 1

Source time: 0
Target time: 0

Create meshes

Source mesh size: 16487628      Target mesh size: 16487628


Consistently creating and mapping fields for time 0

Creating mesh-to-mesh addressing for region0 and region0 regions using cellVolumeWeight
Also running
Quote:
mapFields /home/OF/Base_potential -consistent
gives the same results.

Is there something wrong?
Thanks,
WhiteW
WhiteW is offline   Reply With Quote

Old   December 8, 2015, 16:32
Default
  #9
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 36
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Unfortunately I do not have OpenFOAM 2.3.0, yet I have 2.3.x and if I use pitzDaily potentialFoam's tutorial example and then pitzDaily case from rhoPimpleFoam/les, output is as follows (pf is folder with potentialFoam case):

Code:
daphne:pitzDaily$ pwd
$FOAM_RUN/pitzDaily
daphne:pitzDaily$ mapFields -fields '(U)' ../pf
...
Source mesh size: 12225	Target mesh size: 12225


Creating and mapping fields for time 0

Creating mesh-to-mesh addressing for region0 and region0 regions using cellVolumeWeight
    Overlap volume: 1.4516e-05
    interpolating U

End
And velocity field in pitzDaily is equal to pf case. I even can drop -fields flag, there is not much to map from potentialFoam.

Could you describe exact steps to reproduce your error? Maybe provide case folder archives.
alexeym is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 05:13
what does this verbose error mean? immortality OpenFOAM Running, Solving & CFD 1 February 6, 2013 17:47
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34
[OpenFOAM] Saving ParaFoam views and case sail ParaView 9 November 25, 2011 16:46
[OpenFOAM] Xwindows crash with paraview save srinath ParaView 1 October 15, 2008 10:37


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