|
[Sponsors] |
NO_CONTROL, problem when solving the interFoam equations inside a single region |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Fabien Robaux
Join Date: Oct 2016
Posts: 51
Rep Power: 9 ![]() |
Hey foamers,
I'm currently trying to develop a solver based on chtMultiRegionFoam, I would like to solve the equations from interFoam in the fluids zones, for now I import fields following the logic of multiRegiondFoam, for example in createFluidFields.H: Code:
PtrList<volVectorField> U(fluidRegions.size()); ... U.set ( i, new volScalarField ( IOobject ( "U", runTime.timeName(), fluidRegions[i], IOobject::MUST_READ, IOobject::AUTO_WRITE ), fluidRegions[i] ) ); Code:
setRefCell ( p[i], p_rgh[i], pimple.dict(), pRefCell[i], pRefValue[i] ); when I comment the Code:
#define NO_CONTROL What is the use of NO_CONTROL, and why does it prevent pimple to be loaded? Moreover, from what I know from C++, the #define should have two operands, STRING and REPLACEMENT_STRING right? so NO_CONTROL is replaced by nothing? Thanks for your help Fabien |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7 ![]() |
Hey,
Thanks for asking this question as I could also learn something valuable for myself ![]() I hope this part of the code will help you reason about the problem (from createControl.H) Code:
#if defined(NO_CONTROL) #elif defined(PISO_CONTROL) #include "createPisoControl.H" #elif defined(PIMPLE_CONTROL) #include "createPimpleControl.H" #elif defined(SIMPLE_CONTROL) #include "createSimpleControl.H" #endif |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Fabien Robaux
Join Date: Oct 2016
Posts: 51
Rep Power: 9 ![]() |
Oh, thank you for answering,
This is strange that "CONTROL" has to do with Pimple (which is defined in fvSolutions) At the end, and because I don't completely get It, I have decided to use the PIMPLE dict located on the region directory (because I don't have a general mesh to construct a pimpleControl instance) The only thing in the "main" pimple (in system/fvSolution) will be the nOuterCorr, which, from what I understand, are common for all regions (at least in chtMultiRegionFoam). This number is imported manuallly without the use of a pimpleControl instance. Only I have to do in every loop over the regions (which involve a pimple) an include of Code:
pimpleControl pimple(fluidRegions[i]); if( pimple.dict().found( "nOuterCorrectors") ) { FatalError << "entry nOuterCorrectors is present in dictionnary of the subregion '" << fluidRegions[i].name() << "', It should be defined in the 'global' PIMPLE dict (in constant/fvSolutions)" << exit(FatalError); } Anyway with those method just hope that only the main loop that I will write manually will use nOuterCorrectors. Thanks again for your help! Last edited by frobaux; May 24, 2019 at 09:43. |
|
![]() |
![]() |
![]() |
Tags |
#define, interfoam, no_control, regions |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
chtMultiRegionSimpleFoam: maximum number of iterations excedeed. | Nkl | OpenFOAM Running, Solving & CFD | 19 | October 10, 2019 02:42 |
HeatSource BC to the whole region in chtMultiRegionHeater | xsa | OpenFOAM Running, Solving & CFD | 3 | November 7, 2016 05:07 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 05:24 |
Error while running rhoPisoFoam.. | nileshjrane | OpenFOAM Running, Solving & CFD | 8 | August 26, 2010 12:50 |
meshing F1 front wing | Steve | FLUENT | 0 | April 17, 2003 12:37 |