|
[Sponsors] |
December 19, 2018, 10:30 |
Analyzing my mistakes (chtMultiRegionFoam)
|
#1 |
New Member
Join Date: Sep 2018
Location: Saarbrücken, Germany
Posts: 9
Rep Power: 8 |
Hey everone,
I managed to get my chtMultiRegionFoam case "runnable" since I last posted on this forum - or at least I thought so. I could use your help with analyzing the case and the mistakes I made. Please keep in mind that I'm trying to teach myself OpenFoam for a project, so my mistakes are probably quite stupid =) I have attached the latest case file to my post and you can read about what I'm trying to do in this post. The current problem: The solver is able to load every input file, yet it crashes after calculating the enthalpy of the first solid region with an "nan" error (.txt attached in case file). So far, I was not able to find an answer to this problem on this forum. What I tried so far was reducing deltaT in the controlDict, which did not work. Then I tested the case with radiation turned off and played around with maxCo and relaxation factors for h and hFinal as well. But maybe I haven't set those values the right way. Could the problem originate from wrong boundary conditions? I'm sure there are mistakes in my boundary conditions, but I can't even progress towards a "complete" simulation and trouble-shoot the results. Also, for the current problem I don't have an error message to work with... =/ I would be glad for any hints. Thanks for your help in advance! 0.zip constant.zip system.zip log_crash_nan.txt |
|
December 19, 2018, 16:09 |
|
#2 | |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
I am unable to start your case. I am perplexed that you can though
A few hints. Drop the changeDictionary stuff. Make sure every boundary has a boundary condition. For example: Open your case in paraview (paraFoam -builtin). Look at the ACC region. It has 4 boundaries Quote:
E.g You specify a flow rate at the inlet. ACC_to_nitrogen is the outlet hence zeroGradient for U. Everything else is a wall. You do however not set a pressure at the outlet ACC_to_nitrogen. zeroGradient on all patches for p_rgh and fixedValue for temperature at all walls. This can't work. Do i have the correct files? |
||
December 19, 2018, 18:45 |
|
#3 | |||
New Member
Join Date: Sep 2018
Location: Saarbrücken, Germany
Posts: 9
Rep Power: 8 |
Hey Bloerb, thanks for your reply!
Quote:
Forgot to mention I deleted the large polyMesh folders in constant so the file size stays within the upload size limit... I'm sorry about that! So either you can execute blockMesh and then splitMeshRegions -cellZones -overwrite, or I could send you a Dropbox Link/E-Mail instead. Quote:
Quote:
I looked into the boundary files in the polyMesh folders I mentioned before. Inlet & oulet are defined as patch, every "system boundary" is a wall and the internal boundaries between the regions are set as mappedWall. Is "mappedWall" the way it should be? blockMesh didn't let me define internal faces when I build my geometry in blockMeshDict. The outlet of my whole system is the bottom annulus of the nitrogen region. The pressure at the inlet and at ACC_to_nitrogen is unknown and I want to model the pressure drop across the ACC textile with Darcy-Forchheimer (see fvOptions in ACC). To achieve this, I wanted to set a velocity at the ACC inlet and an ambient pressure at the nitrogen outlet (the bottom annulus) and let the solver calculate all pressures in ACC and nitrogen. I wanted to use calculated as pressure bc for every boundary except the outlet. Have I been on the wrong track? Apart from that I accidentally have set the bc of p at the outlet in the nitrogen region as calculated. I changed that to fixedValue now. (Nothing changed yet when I run the solver, the problem persists.) Yeah, the fixed temperature is intentionally set! In reality, the "ACC region" is an activated char coal textile, which is electrically heated on constant ~250°C. Therefore I considered the ACC region isothermal and used fixedValue. Additionally I placed fixedTemperature in fvOptions. Was that a wrong approach? Last edited by ThunderstruckGER; December 19, 2018 at 18:49. Reason: Clarity |
||||
December 22, 2018, 15:11 |
|
#4 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
This does not make sense: Leave p at calculated and set a fixed value for p_rgh
|
|
December 23, 2018, 17:14 |
|
#5 | |
New Member
Join Date: Sep 2018
Location: Saarbrücken, Germany
Posts: 9
Rep Power: 8 |
Quote:
Additionally I deleted all comments in my code, removed wildcards as user Bloerb suggested and checked all bc again with the aid of the multiRegionHeater tutorial case. However, this did not have any impact on the error message. But, after a lot of trial and error and multiple dead ends, I was able to eventually solve my problem! As I suggested in my original post, my mistake was very stupid. The optional settings "thicknessLayers" and "kappaLayers" in the boundary conditions of my solids were set at zero - instead of deleting them from the code. This resulted in the "nan/not a number" problem when the solver tried to calculate the enthalpy of the solids. |
||
January 27, 2019, 15:31 |
Solid regions not heating up and high number of iterations for p_rgh in fluid region
|
#6 |
New Member
Join Date: Sep 2018
Location: Saarbrücken, Germany
Posts: 9
Rep Power: 8 |
Hey everyone,
After the problem leading to the simulation crashing has been corrected, I've run into a few other problems. The solver was able to calculate ~60 seconds and then failed (timesteps of the calculation got as small as e-12 seconds @ maxCo=1) due to a problem with the boundary conditions in the "air"-region. The "air"-region's purpose is to model the convection of the ambient air outside of my cylinder. I managed to solve that by setting the boundary conditions of p_rgh to fixedFluxPressure instead of fixedValue. Yet, the solver needs 1000 iterations in that region for p_rgh which seems quite high to me and slows down the simulation. Am I still wrong about the boundary conditions in that region, or is that the correct way to set them? Anyways, the solver is now able to calculate the needed 600 seconds without crashing! Then, another problem emerged when I looked into the temperatures. Not a single region is heating up somewhat realistically. The "nitrogen"-region reached about 310-370K after 600 seconds. The temperature itself is already absurdly low, since the nitrogen is flowing through the "ACC"-region, which is set at fixed 523K. But also, the temperature gap between the cells is way too high and does not make any sense. The "coating"-region heated up to about 310K, but nothing at all happened at the other regions. I tried setting the boundary conditions for T in the "nitrogen"-region on a value of 523K, sort of as if the module was preheated. By doing this, I also tried to rule out the possibility of the fluid-fluid boundary to be the source of the problem. This lead to the internal field of the "coating"-region heating up more realistically, but "steel" and "air" are still left at constant 300K. I have no idea if what I did there is even physically reasonable, or complete nonsense. But, obviously it does not thermophysically make sense to apply that "workaround" to the other regions, too. So I'm kinda stuck with this problem. I have tried analyzing my files again and compared them to the tutorial case. I can't find any obvious mistakes and got no approach how to solve this. First, I was so happy to see the simulation running. But upon closer look, this seems to be a train wreck of a simulation I've uploaded the complete case files of the two versions mentioned above here. Maybe you could take a look into them? Again, thanks in advance. I would appreciate any help! Edit I think it's worth mentioning that the following temperature output is given at the steel_to_coating boundary for the latest timestep. Maybe you have an idea why this is happening. Code:
steel_to_coating { type compressible::turbulentTemperatureCoupledBaffleMixed; refValue nonuniform List<scalar> 50 ( 345.19299 399.5114 403.97051 412.30316 364.06796 330.25678 328.39206 328.94288 332.58578 342.03977 333.59269 330.2005 331.30204 334.51619 345.02305 338.01482 334.37978 335.07695 338.7749 349.22986 342.0182 337.32768 337.38229 341.38834 352.46732 346.17461 340.18645 339.75424 343.70123 355.47383 351.1891 343.74118 342.71983 346.68532 359.12619 357.43231 348.05081 346.20291 350.36067 363.75169 364.87789 353.19016 350.29909 354.73818 369.1634 373.10082 359.99065 356.20266 360.56087 374.82201 ) ; refGradient uniform 0; valueFraction nonuniform List<scalar> 50 ( 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 1.4977913e-05 1.49789e-05 1.4979223e-05 1.49789e-05 1.4977913e-05 ) ; value nonuniform List<scalar> 50 ( 300.27603 300.5203 300.57291 300.58401 300.37779 300.16858 300.17517 300.18128 300.20014 300.23294 300.17702 300.16416 300.16942 300.19036 300.23892 300.19955 300.18421 300.18798 300.21092 300.2603 300.22119 300.20098 300.2016 300.2257 300.27789 300.24386 300.21758 300.21526 300.23927 300.29458 300.27133 300.23799 300.23219 300.25634 300.31486 300.30573 300.263 300.25249 300.27752 300.34056 300.34726 300.29316 300.27677 300.30295 300.37102 300.39225 300.33009 300.30859 300.33419 300.40263 ) ; Tnbr T; thicknessLayers List<scalar> 1(0.001); kappaLayers List<scalar> 1(0.0005); kappaMethod solidThermo; kappa none; alphaAni Anialpha Last edited by ThunderstruckGER; January 28, 2019 at 11:01. Reason: Additional information |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
heat transfer, multiple regions, chtMultiRegionFoam? | Ohlzen-Wendy | OpenFOAM Pre-Processing | 13 | February 8, 2022 08:17 |
Error in thermophysical properties (chtMultiRegionFoam) | mukut | OpenFOAM Pre-Processing | 28 | November 23, 2021 07:34 |
Error in chtMultiRegionFoam | kirankarki | OpenFOAM | 6 | August 21, 2018 09:00 |
Simulation of a sample in a furnace w/ chtMultiRegionFoam | sergimart7 | OpenFOAM Running, Solving & CFD | 7 | August 12, 2015 07:48 |
chtmultiregionFoam error | oilsok | OpenFOAM Running, Solving & CFD | 1 | June 12, 2014 12:19 |