Gas dispersion in air error message
Hello. This is my first post here (after some time lurking) so please be gentle.
I've recently picked up OF and am a novice to the tool. My case is dispersion of CH4 in an open environment exposed to wind. The domain is just an open box. So far I've set up a case with an inlet for wind from one of the sides, and a small inlet for gas at the floor. The scenario could be an offshore pipeline rupture from which gas(CH4 in my case) has leaked to the surface of the sea, and my task is to look at the dispersion of CH4 in air. So far the wind is working well, and I did configure the 'gas inlet' to a standard air inlet, just for starters. And up till now I've been using simpleFoam, taking pieces from motorBike and turbineSiting tutorials. Now here's my problem: I'm not able to implement the gas profile into my case. How to make the 'gas inlet' spew out gas instead of air? Any tutorial recommendations? I've been through several tutorials(ie. counterFlowFlame2D) but it has become a bit too much for me to handle. As mentioned, I am quite the novice, at best. Also, I recognize that I should throw simpleFoam, and instead use the likes of perhaps reactingFoam? Any help is greatly appreciated! Any help at all. If you want me to provide any info, I'll be happy to. Cheers, Lasse |
Gas dispersion in air error message
Hi. I'm running a reactingFoam case. kOmegaSST for turbulence, CH4 dispersion in air. no chemistry, no combustion. I get an error message that I'm not capable of interpreting, and was hoping maybe one of you guys were able to, or even if you could tip me on how to learn it. Anyways, here's the error:
Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" |
update
So I've discovered it's about "bad mathematics", such as dividing by zero etc.
I tried to turn turbulence off because I thought that might be the issue, but the error message remains the same. I'm also trying to debug with dbg, not that I really know how, just trying.. |
laminar
I changed the simulationType to laminar and now the error message changed, so definitely the original one is connected to turbulence. However, the new one looks like this:
Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" |
Greetings redhoax and welcome to the forum!
I've merged your first post into this thread, because it gives a very good background on what you're trying to achieve! Nonetheless, it would be helpful if you could share your case, or at least what steps you've taken to prepare said case. As for the latest error, it does indeed look strange, but very clear: something was divided by zero or infinite! If you feel that you will stumble into these issues very often, then I suggest you have a look into this wiki page: http://openfoamwiki.net/index.php/HowTo_debugging As for tutorial cases... the only ones I can think of are the "multiphase/twoPhaseEulerFoam" ones, but I'm not familiar enough with it to tell you that it is the solver you're looking for. Then there is this old thread: http://www.cfd-online.com/Forums/ope...g-gas-gas.html Best regards, Bruno |
Hello Bruno - and thank you for your response :)
I did discover those debugging pages late on friday, but haven't had the chance to test them out yet. I do not have the code available today, but I will certainly provide the case and explain my process of building it as soon as I have it before me. It's not supposed to be a two-phase problem. I have been recommended reactingFoam with reactions turned off. I guess this will enable later development (if I or anyone else see fit) with regards to implementation of ignition sources for possible combustion etc. Thank you for the link to that old thread. I'll look into it. Regards, Lasse |
rough work log
Im using OF21x and Salome 6.4.
Case setup is like this: I have a mesh from Salome. It's an open space with a 'platform' in it (4xcylinder for legs, 1xbox on top, and 1 last cylinder for gas leak inlet under platform). I imported this mesh into the motorBike tutorial. I thought this would be a good starting point. I've used simpleFoam. I got this to work. Air flow through domain, around and about platform structure: OK. Then I went on to get ABLConditions from the turbineSiting tutorial to form some sort of wind profile instead of a plain air inlet. Got this to work as well(I think..). It converged anyway and looked nice in paraFoam. Still solving with simpleFoam. The mesh also includes a cylindrical inlet at the bottom of the domain, centered under the platform. I've kept this as a 'wall' up until this point to keep it as simple as possible. Now I it's time to turn it into a patch and the inlet for CH4. And to move on I've been recommended reactingFoam without reactions (for various reasons, one being further case development). From here on I use the counterFlowFlame2D tutorial as working case (a copy of it, surely). I set chemistryProperties off and combustionProperties false. I set gravity to -9.81 and T to 293 for all. Case still runs. So now I decided to import my own mesh. The motorBike tutorial uses kOmegaSST, but counterFlowFlame2D uses kEpsilon. I'm not sure which one I should use in my case, but I figured usingkOmegaSST would be simplest for some reason(calculations?). So, trying to run it I first encountered the initial error, posted first here. So I set simulationType laminar; just to see if that was it. Then the second error I posted came up. This is roughly where I'm at now. I'll try to compile and debug. I just want to add that I'm trying with some other mesh also, I'll keep you posted. |
Hi Lasse,
You forgot to mention what specific values you are using for pressure! In addition, it would help to know what was the text prior to the stack dump! edit: what does checkMesh tell you about your own mesh? Best regards, Bruno |
steady state. specific value for pressure is set to 0 m^2/s^2.
Code:
internalField uniform $pressure; The mesh is made in Salome and is 100% tetrahedrons(used NetGEN algorithm). Results from checkMesh look like this: Code:
Checking geometry... EDIT: I should mention also that this means modifying reactingFoam into steadystate, as the tutorial case is transient. I would provide the entire case if you like. Upload to a website or zip and mail it? Regards, Lasse |
Hi Lasse,
:eek: Check your mesh units first!! Does your domain really have 600 x 300 x 120 meters? Quote:
But if it's meant to be in meters... you can use Dropbox or something similar ;). Best regards, Bruno |
Hehe. It is meant to be in meters. The reason for this is, apparently, it is customary to have 1-2 platform lengths in front and behind of the platform as domain dimensions. Something of the sort goes for width as well. Not quite the same for height, but you get it. should i downscale it a lot? :P
EDIT: https://www.dropbox.com/sh/z0h5xhr6qq10zth/ehvp0eSdRy?m TIL dropbox is sweet Lasse |
figured I'd post an overview of challenges going from last converged solution to the current version:
- kOmegaSST vs kEpsilon - SS vs transient - perhaps some BCs under 0/, not sure about this - atmBoundaryLayerInletVelocity (accepted in OF17 but not OF21. this has led me to temporarily changing inlet to a simple inlet of air with fixedValue u=2m/s) Lasse |
Hi Lasse,
I finally managed to take a quick look at your case and I spotted that you forgot to re-check the settings on the tutorial "combustion/reactingFoam/ras/counterFlowFlame2D". Some of the ones I managed to find/figure out:
A few more suggestions:
Bruno |
woah, thanks a lot!
i'll go through my case real thorough before i get back to you, but eventually i'll give you an update on my progress:) Lasse |
Hello. Just a short update.
I created a much simpler 2D case with blockMesh, 6mx1.2m. Working on implementing log velocity profile with swak4foam to replace the ablinlet used with simpleFoam. This turned out to be more difficult than expected. As usual :p I expect to finish this soon. I'll upload the case again when I've worked out the log profile and a few other details! Lasse |
I updated the case and shared it with you on Dropbox. At the moment I'm experimenting with different variables, such as wind inlet velocity and fuel rate, and trying to decide how to make the platform geometry.
Lasse |
Hi Lasse,
I received your Dropbox message about the share on my email. I'll try to look into it during the weekend. Best regards, Bruno |
Methane dispersion in air
Hi redhoax and Wyldckat,
It is interesting redhoax that I am in same situation as you. i am very new to OpenFOAM (and Linux as well) and am struggling to solve CH4 dispersion in ambient air. i tried to follow the below http://www.personal.psu.edu/dab143/O...ist_slides.pdf http://openfoamwiki.net/index.php/Fi...Solvers.tar.gz as this has a feasibility to extend to combustion. but the problem is I cannot execute edcSimpleFoam after my problem is set Why? :confused: |
meanwhile, redhoax please let me know if you have some breakthrough in solving your problem. your advice is highly valuable.
|
Greetings Vivek and welcome to the forum!
For the problem with edcSimpleFoam, please start a new thread for that topic. And don't forget to specify the OpenFOAM version you're using! @Lasse: Sorry, I won't be able to look into this before the 2nd of May :( Best regards, Bruno |
All times are GMT -4. The time now is 23:55. |