|
[Sponsors] |
January 27, 2019, 03:06 |
ChtMultiRegion changeDirectory
|
#1 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Hello,
I am new to Openfoam and I am interested in conjugate heat transfer. I try to reproduce a 2D case p.81 "https://upcommons.upc.edu/bitstream/handle/2117/98893/REPORT_260.pdf?sequence=2&isAllowed=y" It is one of the best step by step study that I found on the web concerning ChtMultiRegion preprocessing. I have an error with the command changeDictionary: --> FOAM FATAL ERROR: cannot find file "C:/PROGRA~1/BLUECF~1/ofuser-of5/run/CHT/0/botWall/dictionaryReplacement" It seems that I cannot generate the file dictionaryReplacement ... Some help will be very much appreciated, can someone have a quick look on my case, I have add an Allrun file to manage the case. Best regards Julien |
|
January 27, 2019, 15:54 |
|
#2 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Ok I solve myself my problem.
I use blue-cfd-core 2017 so there is some difference with the refernce document. Best regards |
|
January 27, 2019, 16:15 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick note: The thesis you are following mentions that they used OpenFOAM 2.4 and blueCFD-Core 2017 provides OpenFOAM 5, therefore it's not as much as a limitation on blueCFD-Core as it is the changes in OpenFOAM itself since then.
At most, I expect that you might have some issues regarding the field names "K" colliding with "k", but that should not occur in blueCFD-Core, given that the "K" files are addressed to as "K_"... or at least they should be... edit: I forgot to mention that when it doubt, please compare the tutorial cases that OpenFOAM provides in each version. For example:
__________________
Last edited by wyldckat; January 27, 2019 at 16:17. Reason: see "edit:" |
|
January 29, 2019, 10:05 |
|
#4 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Hello,
Thank you for your answer. I try now to modify the case. I simplify it with only 1 solid domain and region properties constant (not dependant of temperature). I follow the same way the thesis and integrate some modifications in fvscheme and fvsolution according to "http://www.wolfdynamics.com/wiki/OFtipsandtricks.pdf". Whitout these changes the simulation is stopped and I can't cleary see the ERROR message in the log: Code:
Solving for fluid region botAir Generating stack trace... Backtrace: ZN10StackTraceC1Ev [0x705c1465+0x25] module: C:\PROGRA~1\BLUECF~1\ThirdParty-5.x\platforms\mingw_w64GccDPInt32\lib\libstack_trace.dll ZN4Foam5error10printStackERNS_7OstreamE [0xff1c88+0x218] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libOpenFOAM.dll ZN4Foam6sigFpe13sigFpeHandlerEi [0xff2af3+0x33] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libOpenFOAM.dll (No symbol) [0x40468d] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\chtMultiRegionSimpleFoam.exe _C_specific_handler [0x7ffdd1487c58+0x98] module: C:\WINDOWS\System32\msvcrt.dll 0_chkstk [0x7ffdd1e9f7dd+0x11d] module: C:\WINDOWS\SYSTEM32\ntdll.dll RtlWalkFrameChain [0x7ffdd1e0d856+0x13f6] module: C:\WINDOWS\SYSTEM32\ntdll.dll KiUserExceptionDispatcher [0x7ffdd1e9e70e+0x2e] module: C:\WINDOWS\SYSTEM32\ntdll.dll ZN4Foam6divideERNS_5FieldIdEERKNS_5UListIdEES6_ [0xf97f65+0x25] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libOpenFOAM.dll ZN4Foam6divideINS_12fvPatchFieldENS_7volMeshEEEvRNS_14GeometricFieldIdT_T0_EERKS6_S9_ [0x6b6c57f0+0xb0] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libcompressibleTurbulenceModels.dll ZN4FoamdvINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS8_RKS7_ [0x6b7190cf+0x26f] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libcompressibleTurbulenceModels.dll ZNK4Foam27CompressibleTurbulenceModelINS_11fluidThermoEE2nuEv [0x6b759aa7+0x37] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libcompressibleTurbulenceModels.dll ZNK4Foam13laminarModels6StokesINS_18ThermalDiffusivityINS_27CompressibleTurbulenceModelINS_11fluidThermoEEEEEE5nuEffEv [0x6b743e2f+0x4f] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libcompressibleTurbulenceModels.dll ZNK4Foam19linearViscousStressINS_12laminarModelINS_18ThermalDiffusivityINS_27CompressibleTurbulenceModelINS_11fluidThermoEEEEEEEE13divDevRhoReffERNS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEE [0x6b756e5d+0x3d] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\lib\libcompressibleTurbulenceModels.dll (No symbol) [0x48638d] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\chtMultiRegionSimpleFoam.exe (No symbol) [0x4013f7] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\chtMultiRegionSimpleFoam.exe (No symbol) [0x40152b] module: C:\PROGRA~1\BLUECF~1\OpenFOAM-5.x\platforms\mingw_w64GccDPInt32Opt\bin\chtMultiRegionSimpleFoam.exe BaseThreadInitThunk [0x7ffdcf453034+0x14] module: C:\WINDOWS\System32\KERNEL32.DLL RtlUserThreadStart [0x7ffdd1e73691+0x21] module: C:\WINDOWS\SYSTEM32\ntdll.dll Best regards Last edited by wyldckat; January 29, 2019 at 20:48. Reason: Added [CODE][/CODE] markers |
|
January 29, 2019, 21:02 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer: So, with a bit of experience it's possible to spot the following error blobs:
|
|
January 30, 2019, 08:30 |
|
#6 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Hello,
Thank you for your support. Yes you are right I need to pratice a lot. point 4:I will modify my case for a turbulent flow in a future case test. point 5: In the initial (Allrun is not execute) 0/botAir folder and other 0/folders, it is normal that I have no coherent values. I use changeDictionary to update correctly the 0/folders (like it is done in the thesis). point 6: You are right I have missed the numerical value point 7: I will check again the BC Why I need to calculate both "p" and "p_rhogh"? I have a look in some of the other tutorials and it seems that it is the only case where I found "p_rhogh" calculated. And in the solver files of the thesis and of the chtMultiRegion tutorials, only "p_rhogh" is calculated not "p"! It is also srange for me that the unit dimensions of "p" and "p_rhogh" ([1 -1 -2 0 0 0] -> N/m2 or Pa) are not the same that "p" in other tutorials [0 2 -2 0 0 0] corresponding to "p/rho"). Best regards |
|
January 30, 2019, 20:12 |
|
#7 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answers:
Quote:
But it depends on the solver, so the sort-of simplest way is to check the source code... quoting from here: https://github.com/OpenFOAM/OpenFOAM...dFields.H#L171 Code:
p_rghFluid.set ( i, new volScalarField ( IOobject ( "p_rgh", runTime.timeName(), fluidRegions[i], IOobject::MUST_READ, IOobject::AUTO_WRITE ), fluidRegions[i] ) ); // Force p_rgh to be consistent with p p_rghFluid[i] = thermoFluid[i].p() - rhoFluid[i]*ghFluid[i]; This is something that there are plans to simplify this and only have one field that is truly necessary, so that sort of explains why you can find some solvers that only need one of the fields to start things with... but in other situations, the solvers simply don't use "p_rgh", e.g. simpleFoam. Quote:
Code:
site:www.cfd-online.com/forums/openfoam pressure units Well, there is this FAQ entry: https://openfoamwiki.net/index.php/F...ble_solvers.3F - which essentially sums it up |
|||
January 31, 2019, 18:43 |
|
#8 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Thank you for your support. It is a little bit clearer for me.
I have check my BC and there was a lot of errors in the thesis and mine also. I don't understand all nuances for BC particularly for pressure BC but I think that now it is consistent. My new problem is with kappaMethod in the T coupled BC compressible::turbulentTemperatureCoupledBaffleMix ed definition. I leave all the T coupled fluid and solid BC to :kappaMethod fluidThermo; and I have the following ERROR: Code:
*** Reading solid mesh thermophysical properties for region plate Adding to thermos Selecting thermodynamics package { type heSolidThermo; mixture pureMixture; transport constIso; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } Adding to radiations Radiation model not active: radiationProperties not found Selecting radiationModel none Adding fvOptions No finite volume options present Time = 1 Solving for fluid region botAir DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.000200286601, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.000114932439, No Iterations 3 --> FOAM FATAL ERROR: kappaMethod defined to employ fluidThermo method, but thermo package not available From function Foam::tmp<Foam::Field<double> > Foam::temperatureCoupledBase::kappa(const scalarField&) const in file turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C at line 171. FOAM exiting Best regards Last edited by wyldckat; February 3, 2019 at 17:06. Reason: Added [CODE][/CODE] markers |
|
February 1, 2019, 21:07 |
|
#9 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Hello,
I modify a little bit the fvSolution and fvScheme according to tutorials and now the case runs well in single and parallel. I am quite surprise when I see the results. I was thinking that the values that I fixe for T on BC "zeroGradient + value uniform 200" was only for initial values but it seems to fixe some Dirichlet constraints. Do I have to withdraw all the values put in the Bondaryfield file? Where the initial condition on the whole domain is writed? Code:
FoamFile { version 2.0; format ascii; class volScalarField; location "0/plate"; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 0 0 1 0 0 0 ]; internalField uniform 200; boundaryField { minX { type zeroGradient; value uniform 200; } maxX { type zeroGradient; value uniform 200; } defaultFaces { type empty; } plate_to_botAir { type compressible::turbulentTemperatureCoupledBaffleMixed; value uniform 200; Tnbr T; kappaMethod solidThermo; } plate_to_topAir { type compressible::turbulentTemperatureCoupledBaffleMixed; value uniform 200; Tnbr T; kappaMethod solidThermo; } } Last edited by wyldckat; February 3, 2019 at 17:07. Reason: Added [CODE][/CODE] markers and removed broken image link |
|
February 2, 2019, 13:57 |
|
#10 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer: Sorry, I won't have enough time in the next week or so to answer to the previous 2 posts you've made, so the my best suggestion is to take a side step and study a simpler example and work from there: https://openfoamwiki.net/index.php/G..._-_planeWall2D
Then do one step at a time towards the case you are trying to work on. |
|
February 2, 2019, 18:49 |
|
#11 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Hello,
Yes i have to do a new simpler example. I understood that it is well initial BC no Dirichlet, for T on BC "zeroGradient + value uniform 200". It was my mistake. I have plotted the convergence curves of my case with a command file I found on the forum: set logscale y set title "Residuals" set ylabel 'Residual' set xlabel 'Iteration' plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,\ "< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,\ "< cat log | grep 'Solving for h' | cut -d' ' -f9 | tr -d ','" title 'h' with lines,\ "< cat log | grep 'Solving for p_rgh' | cut -d' ' -f9 | tr -d ','" title 'p_rgh' with lines pause 1 It seems very perturbated and my case is not fully converged. Results are also not smooth close to the coupled interface between solid and fluid. Why the curves of Ux, Uy (2000 iterations) and later h (5000 iterations) are stopped ? It means that Ux,Uy and h are converged? I don't reach my tolerance 10-9... strange My fvSolution file for U and h for the fluid domains "(U|h)" -> What does it means U and h are solved in a coupling way? { solver PBiCG; preconditioner DILU; tolerance 1e-9; relTol 0.1; minIter 3; } p_rgh { solver PCG; preconditioner DIC; tolerance 1e-9; relTol 0.01; } SIMPLE { momentumPredictor yes; nNonOrthogonalCorrectors 2; pRefCell 0; pRefValue 100000; rhoMin rhoMin [1 -3 0 0 0] 0.2; rhoMax rhoMax [1 -3 0 0 0] 2; Maybe I need to use a more stable solver. Any advise on this point? Best regards |
|
February 3, 2019, 17:44 |
|
#12 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick questions/answers:
|
||
February 11, 2019, 18:56 |
|
#13 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
It works perfectly,
Thank you very much! Julien |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
chtMultiRegion + Adaptive Mesh Refinement | Dostoyefsky | OpenFOAM Programming & Development | 2 | February 21, 2022 03:16 |
Viewing results of chtMultiRegion in paraFoam | Scot | OpenFOAM | 2 | April 22, 2011 17:29 |
conductivity in chtMultiRegion | sven82 | OpenFOAM | 1 | November 19, 2010 06:16 |
turbulentTemperatureCoupledBaffle in chtMultiRegion | stawrogin | OpenFOAM | 0 | August 19, 2010 15:22 |
Mass transfer and chtmultiregion | Bufacchi | OpenFOAM Programming & Development | 0 | August 2, 2010 21:28 |