View Issue Details

IDProjectCategoryView StatusLast Update
0001964OpenFOAMpublic2016-01-07 15:39
ReporterGRAUPS Assigned Tohenry  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformIntel64OSRHELOS Version6.6
Summary0001964: potentialFoam fails when a limitTemperature function is included in fvOptions
DescriptionWhen I try to initialize the velocity field with potentialFoam of a rhoSimpleFoam model that is using the limitTemperature function in fvOptions, potentialFoam stops running with an error (seen in the additional information section). When I remove the fvOptions file or the limitTemperature function, everything runs fine.


Steps To ReproducePlease find attached a modified squareBend OpenFOAM tutorial. I have added the necessary lines in fvSolution ect need to run potentialFoam.

1.) Run Allrun
2.) Check the log.potentialFoam file, you'll find the error
3.) Remove or rename the fvOptions file, remove log files
4.) Re-run Allrun
5.) Check the log.potentialFoam file, it finished successfully.
Additional InformationHere is the error produced by potentialFoam with the limitTemperature function defined.

--> FOAM FATAL ERROR:

    request for basicThermo thermophysicalProperties from objectRegistry region0 failed
    available objects of type basicThermo are
0()

    From function objectRegistry::lookupObject<Type>(const word&) const
    in file /apps/OpenFOAM/.builds/OF30/837527a/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198.

FOAM aborting
TagsfvOptions, potentialFoam, rhoSimpleFoam

Activities

GRAUPS

2016-01-06 23:22

reporter  

squareBend_mod.tar.gz (3,705 bytes)

henry

2016-01-07 08:10

manager   ~0005805

You cannot run potentialFoam with fvOptions specified to manipulate the temperature as this field does not exist in potentialFoam. If you need fvOptions specified for potentialFoam you will need to use a different file to that used for rhoSimpleFoam or if they are not needed for potentialFoam simply remove or move the fvOptions file.

GRAUPS

2016-01-07 13:53

reporter   ~0005807

Ok, I listed this as a bug because it's a regression from 2.4.x. In 2.4.x, potentialFoam read but seemed to ignore the temperature limits in fvOptions and ran properly (as it should, since it shouldn't care about temperature constraints). I expected the same behavior in 3.0.x.

You are correct, I can simply remove the fvOptions, run potentialFoam, replace it, and run rhoSimpleFoam. But this seems like more of a hack that I now need to place into the workflow to go from initialization to solve. I'm ok with it, but is there a reason for this regression?

henry

2016-01-07 14:06

manager   ~0005808

I ran your case in OpenFOAM-dev exactly as provided and specified and potentialFoam runs without error or warning:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : dev-119708e40132
Exec : potentialFoam
Date : Jan 07 2016
Time : 14:04:19
Host : "dm"
PID : 9704
Case : /home/dm2/henry/OpenFOAM/henry-dev/run/Bugs/potentialFoam/squareBend_mod
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
SetNaN : Initialising allocated memory to NaN (FOAM_SETNAN).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0

potentialFlow: Operating solver in PISO mode

Reading velocity field U

Constructing pressure field p

Constructing velocity potential field Phi

No MRF models present

Calculating potential flow
GAMG: Solving for Phi, Initial residual = 1, Final residual = 0.065945, No Iterations 4
GAMG: Solving for Phi, Initial residual = 0.000122505, Final residual = 6.04903e-06, No Iterations 3
GAMG: Solving for Phi, Initial residual = 5.98902e-06, Final residual = 2.50242e-07, No Iterations 3
GAMG: Solving for Phi, Initial residual = 2.50605e-07, Final residual = 2.34414e-08, No Iterations 3
GAMG: Solving for Phi, Initial residual = 2.34709e-08, Final residual = 9.33019e-09, No Iterations 1
GAMG: Solving for Phi, Initial residual = 9.33016e-09, Final residual = 9.33016e-09, No Iterations 0
GAMG: Solving for Phi, Initial residual = 9.33016e-09, Final residual = 9.33016e-09, No Iterations 0
GAMG: Solving for Phi, Initial residual = 9.33016e-09, Final residual = 9.33016e-09, No Iterations 0
GAMG: Solving for Phi, Initial residual = 9.33016e-09, Final residual = 9.33016e-09, No Iterations 0
GAMG: Solving for Phi, Initial residual = 9.33016e-09, Final residual = 9.33016e-09, No Iterations 0
GAMG: Solving for Phi, Initial residual = 9.33016e-09, Final residual = 9.33016e-09, No Iterations 0
Continuity error = 0.00295847
Interpolated velocity error = 0.000190895
ExecutionTime = 2.13 s ClockTime = 3 s

End

GRAUPS

2016-01-07 15:28

reporter   ~0005812

Ok... well, it fails in the latest version of 3.0.x with the error I indicated. So either there was a regression in the 3.0.x branch or there was a seperate commit to dev since the release of 3.0 that fixed it. I'd like this bug to be resolved in 3.0.x if possible.

I don't have an in order dev build right now, so your help in determining which commit fixed or broke it would be helpful. I will work on getting an updated dev build working on my end. Thanks for your support!

henry

2016-01-07 15:32

manager   ~0005813

I have made some substantial changes to the instantiation of fvOptions on OpenFOAM-dev to support fvOptions in model libraries such as for turbulence. It would not be appropriate to make the same changes to OpenFOAM-3.0.x as they do not relate to bug fixes.

However, fvOptions are not currently used in potentialFoam anyway so there is no need for them to be instantiated and I will remove them from potentialFoam in OpenFOAM-3.0.x which should resolve the problem you are having.

henry

2016-01-07 15:39

manager   ~0005814

Resolved by commit ba3e4eac79824b9d8cb5bc67e18ccb15312ea5c4

Issue History

Date Modified Username Field Change
2016-01-06 23:22 GRAUPS New Issue
2016-01-06 23:22 GRAUPS File Added: squareBend_mod.tar.gz
2016-01-06 23:24 GRAUPS Tag Attached: fvOptions
2016-01-06 23:24 GRAUPS Tag Attached: potentialFoam
2016-01-06 23:24 GRAUPS Tag Attached: rhoSimpleFoam
2016-01-07 08:10 henry Note Added: 0005805
2016-01-07 08:10 henry Status new => closed
2016-01-07 08:10 henry Assigned To => henry
2016-01-07 08:10 henry Resolution open => no change required
2016-01-07 13:53 GRAUPS Note Added: 0005807
2016-01-07 13:53 GRAUPS Status closed => feedback
2016-01-07 13:53 GRAUPS Resolution no change required => reopened
2016-01-07 14:06 henry Note Added: 0005808
2016-01-07 15:28 GRAUPS Note Added: 0005812
2016-01-07 15:28 GRAUPS Status feedback => assigned
2016-01-07 15:32 henry Note Added: 0005813
2016-01-07 15:39 henry Note Added: 0005814
2016-01-07 15:39 henry Status assigned => resolved
2016-01-07 15:39 henry Resolution reopened => fixed
2016-03-11 11:44 administrator Category 3.0.1 => (No Category)