View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000678 | OpenFOAM | Bug | public | 2012-11-06 16:21 | 2012-11-07 11:18 |
Reporter | Assigned To | henry | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | AMD Athlon X2 | OS | CentOS | OS Version | 6.3 |
Summary | 0000678: settlingFoam crashes with boundary condition uniformFixedValue for alpha | ||||
Description | Using 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 Reproduce | Crashing 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 Information | Workaround 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 | ||||
Tags | No tags attached. | ||||
|
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 |