Please enable molflowCLI to export all moments' physical quantities in time-dependent simulation

Hello Marton,

Recently, I use VacuumCOST to simulate the pressure changes inside a vacuum chamber. My model is divided into two stages. In the first stage, the model is closed with no pumps, and NEG is used to maintain its pressure for months. In the second stage, the model is placed in a low-pressure environment, and a hole is opened to evacuate the gas.

Based on my understanding, VacuumCOST can perfectly handle the first stage simulation but cannot simulate the second stage. This is because the post-processing code for vacuumcost only extracts moment=0 (constant flow) data from the XML file, while my second-stage simulation is time-dependent with no iteration.

I tried to write a script to extract data for all moments from the XML file and post-process it like VacuumCOST, but I failed. It was too difficult for me. I then thought of a compromise: using MolflowCLI to export the facets’ coordinates and all moments’ physical quantities, then rebuilding a 3D model and creating a GIF with pressure changes. However, MolflowCLI can only export the quantities at moment=0 (constant flow) using the * writeFacetQuantities* command in time-dependent simulations.

To better address my problem, I would like to request the following features for MolflowCLI:
1. Enable MolflowCLI to export physical quantities for all moments.
2. Enable MolflowCLI to export the physical quantities separately.

Thanks in advance!

Best regards.

Hello Wang,

Our idea for the Molflow “package” is the following:

  1. Molflow graphical interface for most users, which can solve most simple, and some time-dependent problems, and has convenience functions, like plotting and color-coded textures
  2. molflowCLI for advanced users who want to do automation
  3. The Python interface for Molflow files, which allows to extract phsyical data and modify the geometry or the physics
  4. Vacuumcoost, which does iterative simulations. It was written by a post-doc who has left Cern, and we don’t develop it anymore, except for bug fixes to keep it alive.

molflowCLI, as being addressed for advanced users, does not have convenience functions, as development would be redundant. (One exception is the export of physical quantities and the physical parameter setting). I have instead recently developed a different tool, for all users who want to read and modify Molflow XML files.

I recommend to use instead the Python XML interface. It’s not difficult, see this Jupyter notebook for demo. For example, to get the pressure on facet 123 at moment 5:

# Initialization
from xmlParse import *
from fileIO import *

# Open file
input_fileName = "mySimulation.zip" # .xml or .zip
tree = open_xml_or_zip(input_fileName)
root = tree.getroot()

# Find facet 123 in file
facet_id = 122  # Indexed from 0
facet_node = find_facet_node(root, facet_id)

# Get pressure at moment 5
moment_id = 5
pressure_facet123_moment5 = get_facet_pressure(root, facet_id, moment_id)

This way, you can get all the data, with already existing tools.

Regards, Marton