Debug: Database connection successful OpenFOAM (Page 6) / Science, Technology, and Astronomy / New Mars Forums

New Mars Forums

Official discussion forum of The Mars Society and MarsNews.com

You are not logged in.

Announcement

Announcement: This forum is accepting new registrations via email. Please see Recruiting Topic for additional information. Write newmarsmember[at_symbol]gmail.com.

#126 2025-10-09 19:37:04

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 22,815

Re: OpenFOAM

This post is a report on what appears to be a successful run to a full two seconds of simulation time.

The run is characterized by a significant change of the outlet... instead of vacuum, we have configured the outlet to only release gas when pressure exceeds 1 bar. This is NOT how the Real Universe works, but we need this artifice because equations need "something" to chew on.  However, as nearly as I can tell, the use of this mechanism allows the solver to actually make sense of the incoming flow of hydrogen.  The model is designed to ramp up the flow of hydrogen at the intake over 2 seconds, which is also the length of the run.  We can see hydrogen advancing along the heat tube, filling the nozzle, and bunching up at the throat in what seems to me realistic emulation of what might happen in the Real Universe.  You can see the bunching up most clearly in the Pressure image.

The outlet is opening as planned when pressure grows above 1 bar.   

Here are the images:

1)  pressure
http://40.75.112.55/phpBB3/download/file.php?id=41

2) Temperature
http://40.75.112.55/phpBB3/download/file.php?id=42

3) Velocity
http://40.75.112.55/phpBB3/download/file.php?id=43

in the next run, I am planning to do away with the two outlets and configure the entire back wall as outlet-1

I'm also planning to run for 3 seconds.  What I'm hoping to see is a plume that exits the nozzle and proceed straight out to the Real Universe.

(th)

Offline

Like button can go here

#127 2025-10-10 08:51:27

Calliban
Member
From: Northern England, UK
Registered: 2019-08-18
Posts: 4,202

Re: OpenFOAM

I am presently looking into buying a computer with enough capacity to handle fire modelling CFD applications.  The cost is likely to be $5000 - $10,000.  The problem is that for a 3-Dimensional geometry, especially structures, the number of cells increases very quickly, which eats up a lot of memory.  To run a simulation in a reasonable amount of time, a high end Intel Xeon W-series processor is needed.  A minimum of 1TB of free memory space per simulation and preferably, 64 cores to be able to run the simulation in hours rather than days.  It gets expensive very quickly.  But it is such a significant advantage to me as an engineer, that I am minded to take the hit and make the investment.


"Plan and prepare for every possibility, and you will never act. It is nobler to have courage as we stumble into half the things we fear than to analyse every possible obstacle and begin nothing. Great things are achieved by embracing great dangers."

Offline

Like button can go here

#128 2025-10-10 09:43:09

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 22,815

Re: OpenFOAM

For Calliban re #127

I think a $300 system might be more than powerful enough to get started.

I do recommend adding external storage for keeping runs, so your development system stays reasonable.

My current models are creating about a gigabyte of data per run.  That number is a function of the number of seconds of simulation and the number of writes per simulated second.  If you are looking at a fire in a building you might indeed need more storage. The model I am running has about 400,000 cells.

Here is a report from Google's Gemini about fire studies with OpenFOAM.

New query:
OpenFOAM for Fire Simulation
Previous queries:
OpenFOAM Hydrogen Jet Engine Simulation

Estimate Simulation End Time

OpenFOAM ControlDict Explained

OpenFOAM Heat Transfer Simulation Guide

Starlink Sign-Up Process Explained

OpenFOAM Debugging: Heating and Flow

ISS External Atmospheric Pressure Data

`du` vs. `df` for Disk Space

Zipping and Unzipping Linux Directories

OpenFOAM Mesh Layer Extension Guidance

Steel Strength vs. Rocket Load

Moving Files with `mv` Command

Physics of Quadratic Drag Relationship

Today's query:
Conversation with Gemini

OpenFOAM studies of fire - Hello Again! And ** thank you ** for so many helpful replies to muliple requests. In particular, past instances of yourself have helped greatly with OpenFOAM work I am doing. Today, I have a question from an associate who (I gather) needs to study fire with CFD. He is considering spending thousands of dollars on what I assume must be a commercial system. Please look to see if OpenFOAM has been used for study of fires. I can ask for further information if you find too much with that vague wording.
***
    Query successful

That's an excellent question, and a very relevant one for your associate. You can tell them that OpenFOAM is absolutely used for fire and combustion studies, and they might be able to save a lot of money compared to purchasing a commercial system.

OpenFOAM includes a specialized solver dedicated to fire modeling:

    fireFoam: This is a transient solver designed specifically for fires and turbulent diffusion flames. It includes capabilities for:

        Reacting particle clouds.

        Surface film modeling.

        Pyrolysis modeling (the thermal decomposition of materials).

        It is often used with Large Eddy Simulation (LES) for advanced turbulence modeling in fire safety applications for buildings, car parks, tunnels, etc.

Other key points to share with your associate:

    Validation and Comparison: There are numerous academic studies and comparisons that assess the performance of fireFoam against experimental data and other established fire modeling software, such as Fire Dynamics Simulator (FDS) (a very widely used, free, open-source CFD fire model developed by NIST). This indicates that it is a serious tool for research and engineering applications, though it may have a steeper learning curve than FDS.

    Other Solvers: OpenFOAM also has other general combustion solvers that can be adapted, like reactingFoam or rhoReactingBuoyantFoam, which can be used for modeling reactive compressible flows, though fireFoam is the dedicated tool.

    Resources and Training: The OpenFOAM development and release authority itself offers courses specifically for "Fire Modelling with OpenFOAM," which covers the theoretical background, combustion modeling, and practical sessions.

In short, your associate does not need to immediately dismiss the open-source route. They should investigate if fireFoam (or even FDS) meets their specific modeling needs before spending thousands of dollars. The OpenFOAM platform has the necessary tools to undertake these studies, but requires a good understanding of CFD and combustion principles.

You can find more information about fire simulation modeling in a room using OpenFOAM in this video: Fire simulation modeling in room using OPENFOAM (Part-II).
Fire simulation modeling in room using OPENFOAM (Part-II) - YouTube
CFD Expert · 2.3K views
***
Thank you ** very ** much! I will pass along your helpful reply!
***
You are very welcome! I'm glad I could provide helpful information to you and your associate.

I hope their CFD fire studies go well! Please feel free to reach out if any other OpenFOAM or general CFD questions come up.

PS ... if you decide to consult with Gemini, I recommend you keep in mind that a new entity is created every time you press enter to send a query.

Google saves a lot of data between sends, but not all.  I've been working with ChatGPT for over six months now, and I frequently have to refresh it's memory of what we are working on.  Keep in mind that Gemini has to read everything it has saved about the current project, along with your new query.  Some patience is in order.  it's like hiring a brand new grad student and expecting them to give you useful service on a project that's been going on for years.

(th)

Offline

Like button can go here

#129 2025-10-10 12:22:51

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 22,815

Re: OpenFOAM

As a follow up for those who might be interesting in using ParaView to show / study OpenFOAM cases, I installed ParaView on a Windows 11 box.

The installation required a precursor component set provided by Microsoft.  That installation went smoothly.

Once that was installed the ParaView installation became possible, and that is now in progress: 3.12.0 is the version installing.

The program came up on the HP laptop.  Now all we need is some data!  The Linux box is 2/3rds of the way through the current run, so it should be done in another hour. I'm looking forward to seeing how ParaView performs on the Windows machine with the transported data. What I have in mind is taking the animation to a meeting room where we have a large screen. 

Not everyone is interested in seeing what animation of a CFD model shows, but for those who are, a large screen will be welcome.

(th)

Offline

Like button can go here

#130 2025-10-10 21:13:03

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 22,815

Re: OpenFOAM

This post is a preliminary report on what appears to have been a successful test of the extendedMerlin model using hydrogen gas at 300 Kelvin, pushed into the intake at 2 kg/s after a slow ramp up to full flow over 2 seconds, followed by a steady flow for one second.

The run took 9 hours to cover 3 full seconds of simulation time.  The system took 300 time snapshots, so the animation has 300 steps to process.

Here is a quick summary by ChatGPT5:

Units in your case are SI:
p in Pa, U in m/s, T in K, time in s.
So a U range 0 → 6.7e+02 means ~670 m/s (≈ Mach 0.5 for H₂ at 300 K), which fits your visuals.

Why T nudges above 300 K even though you “held” it: you fixed boundary T and initialized the domain at 300 K, but the solver still evolves the energy (e). Compression/expansion work and viscous effects cause small temperature departures inside the domain. At 2 kg/s, even without wall heating, a few K drift is normal.

The velocity of 1/2 mach apparently reflects the rate at which the gas is flowing through the throat, but I haven't confirmed that yet. It seems likely, but it needs to be confirmed.

By the way ... if anyone is interested... I am planning to zip up the case and put it on Dropbox so anyone who wants to look at it can do so. I'll be testing the case tomorrow on an HP Win 11 laptop where I've installed ParaView.  I'm looking forward to seeing how the model behaves when run on that newer machine.

I'll upload screen shots tomorrow. 

This successful run ** may ** mean that we can start heating the hydrogen gas using that 240 meter long heat pipe.  We should see the pressure in the heat pipe increase as heat is applied, but there will be issues due to the small surface that is hot in the volume of the model. In the Real Universe test article, the entire cylindrical pipe would be heated, but in this simulation, only the + and - Y faces are heated. The "pipe" is a flat conduit that is 20 centimeters wide but only about 1.5 centimeters tall, and only the Y faces are hot, so convection will be less than would be the case in the Real Universe test article.  Never-the-less, even with deficient heating, we should see an increase of pressure of the gas, and thus an increase of velocity through the throat.

(th)

Offline

Like button can go here

#131 2025-10-11 18:15:13

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 22,815

Re: OpenFOAM

GW Johnson requested the dimensions of the Merlin Engine model.

He is looking for the actual Real Universe dimensions.

X: 0 to 0 (delta: 0)
Y: -0.126042 to 0.126042 (delta: 0.252084)
Z: -0.0630365 to 0.0630365 (delta: 0.126073)

We know the width of the intake is 40 cm (20 cm + and - of center).

The value of 25.2 cm reported above is at X = 0 of the model. I don't know if that is where the throat is.

However, in looking at the model, I can see that the narrow section of the throat is near 0, so I went with that as a first report.

Here is an image of hydrogen passing through the nozzle on it's way to the outlet.

The image is of Velocity and it is mostly dark because it is mostly quiet. Only hydrogen is moving and that modestly.

http://40.75.112.55/phpBB3/download/file.php?id=44

(th)

Offline

Like button can go here

#132 2025-10-12 20:36:10

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 22,815

Re: OpenFOAM

Run 19 is under way.  This one is expected to last 9 hours of wall clock time, while simulating 3 seconds of model time.

The only change from Run 18 is modification of the outlet port to drop from 1 bar towards vacuum slowly as hydrogen is fed into the system slowly. If the two ramps are well enough matched, the arriving gas should keep the outlet busy, but we'll see. The ramp for outlet is designed to stop falling well before true vacuum, since that would cause the equations to fail due to insufficient matter to work with.

If we get through this test we'll start heating the heat pipe.  That will add energy to the gas and increase pressure, which should ultimately translate to thrust.

Update next day ... the run is continuing.  It reached 10+ wall clock and 2.38 seconds of simulation time. Another 5 hours should be enough to finish.

I admit to being surprised by the longer run, because I was expecting the reduction in back wall pressure settings to reduce CPU time.

Update at noon local time ... the run seems likely to reach 15 hours.  It is still progressing.  My guess is it is dealing with turbulence, as before.

(th)

Offline

Like button can go here

Board footer

Powered by FluxBB