|
[Sponsors] |
multi region case - access field from another region |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 18 ![]() |
dear all!
i modified chtMultiRegionFoam including a radiation model in the fluid region. the radiation model, or better the BC of the radiation model, calculates a radiative wall heat flux Qr at every boundary and writes it out at the specified time steps. now i need to access Qr from the solid region, i.e. in the forAll(solidRegions, i)-loop (see solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C line 104) . first i tried to create a IOobject QrFluid in creatFluidFields with the MUST_READ option. but as it isn t updated in the code (and for now I don t know how to do it) it doesn t read the actual Qr field. i also tried to use the db().lookupobject<> function which returns a reference to the object registry like: Code:
const volScalarField& QrFluid = UFluid[j].db().lookupObject<volScalarField>("Qr"); Code:
--> FOAM FATAL ERROR: hanging pointer, cannot dereference From function PtrList::operator[] const in file /opt/openfoam171/src/OpenFOAM/lnInclude/PtrListI.H at line 108. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::error::abort() in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so" #2 in "/home/aa/OpenFOAM/aa-1.7.1/applications/bin/linux64GccDPOpt/yazdRadBC" #3 in "/home/aa/OpenFOAM/aa-1.7.1/applications/bin/linux64GccDPOpt/yazdRadBC" #4 __libc_start_main in "/lib/libc.so.6" #5 in "/home/aa/OpenFOAM/aa-1.7.1/applications/bin/linux64GccDPOpt/yazdRadBC" Aborted i greatly appreciate your comments! thx in advance!! aram |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 18 ![]() |
Quote:
Code:
radiation.set ( i, radiation::radiationModel::New(thermoFluid[i].T()) ); Code:
thermoFluid.set ( i, basicRhoThermo::New(fluidRegions[i]).ptr() ); Good luck, Mirko |
||
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 18 ![]() |
hey Mirko!
thanks a lot for your reply!! the chtMRF code where i added a radiation and combustion model actually works. i found some troubles (= numerical instability) when taking the radiative heat flux Qr for the cht-BC into account. hence, i want to try a new approach where Qr is applied as source term in the solid. the problem i described above happens cause i havn t understood yet how to dereference the fluid field pointer lists outside of the fluid-loop. the error message comes from: Code:
/opt/openfoam171/src/OpenFOAM/lnInclude/PtrListI.H at line 108 Code:
if (!ptrs_[i]) { FatalErrorIn("PtrList::operator[]") << "hanging pointer, cannot dereference" << abort(FatalError); } Code:
Info<< "QrFluid: " << UFluid[j].db().lookupObject<volScalarField>("Qr") << endl; any idea? i ll keep on digging and report!! cheers, aram |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 18 ![]() |
Aram,
OF2.0 chtMultiRegionFoam includes radiation. As for debugging, my approach is to copy the relevant solver or BC to my user directories, compile them, and then start adding print/Info statements to narrow down the cause of the error. Mirko |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
access to field data | sepp | OpenFOAM Programming & Development | 0 | February 15, 2011 09:13 |
solving multi case one after another automaticly | Alshroof | CFX | 2 | July 17, 2007 20:30 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 12:24 |
ACCESS VIOLATION during autosaving case file | Ryan | FLUENT | 1 | April 20, 2004 10:32 |
Multi Block case. | Constantinos Constantinou | FLUENT | 1 | October 26, 2001 02:00 |