View Issue Details

IDProjectCategoryView StatusLast Update
0000678OpenFOAMBugpublic2012-11-07 11:18
Reporteruser539Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformAMD Athlon X2OSCentOSOS Version6.3
Summary0000678: settlingFoam crashes with boundary condition uniformFixedValue for alpha
DescriptionUsing settlingFoam with tutorial case dahl or any other case where boundary condition uniformFixedValue is used on a patch for alpha causes a crash. This seems to be because the BC for alpha is copied to Alpha for which the scalar equation in settlingFoam is solving. During this copying certain attributes of uniformFixedValue get lost, which cause the error:

--> FOAM FATAL ERROR:
object is not allocated

    From function Foam::autoPtr<T>::operator->()
    in file /home/linnemann/OpenFOAM/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/autoPtrI.H at line 153.

FOAM aborting


Error occurs when executing alphaEqn.H line 13, where using the BC of Alpha which have been copied incorrectly from alpha.
Steps To ReproduceCrashing can be reproduced with the code (added anywhere after createFields.H)
    Info<< Alpha.boundaryField();
or especially
    Info<< Alpha.boundaryField()[ID];
where ID is the ID of the patch with BC uniformFixedValue.
Additional InformationWorkaround in 2 steps:
1. createFields.H, Definition of Alpha: Changing IOobject::NO_READ to IOobject::READ_IF_PRESENT
2. case directory/0: Creating Alpha (by copying alpha) with proper values

BC uniformFixedValue:
http://www.openfoam.org/version2.1.0/boundary-conditions.php
TagsNo tags attached.

Activities

henry

2012-11-07 11:18

manager   ~0001766

It is a problem to map complex BCs between variable consistently and in this case it would be easier to simply read Alpha rather than alpha and derive alpha from Alpha with "calculated" BCs in order to support arbitrarily complex BCs on Alpha.

I have pushed this change to OpenFOAM-2.1.x:
commit 098cc8061c6414b48b555397bc0d884a29e75d1b

Issue History

Date Modified Username Field Change
2012-11-06 16:21 user539 New Issue
2012-11-07 11:18 henry Note Added: 0001766
2012-11-07 11:18 henry Status new => resolved
2012-11-07 11:18 henry Resolution open => fixed
2012-11-07 11:18 henry Assigned To => henry