Hi @yuxuan
I think you have confused the mfix
and the mfixsolver
commands.
The first command:
mfixsolver -f tfm_2d_ug_045.mfx
is correct. You would get an error “mfixsolver” is not an internal or external command
if the current directory is not the project directory, or if you did not build a custom solver.
I think the next thing you tried must have been mfix -f tfm_2d_ug_045.mfx
not mfixsolver -f ...
as you wrote above. (I can tell this is not a direct copy/paste from the terminal due to your misspelling of " unrecongnized") Please show exactly the commands you used, copying and pasting from the terminal is best.
The mfix
command will start the main MFiX interface, while the mfixsolver
just runs the modeling backend. For mfix
, the project name is specified without the -f
flag while for mfixsolver
the -f
flag is necessary. This slight inconsistency is possibly confusing for users.
The help text you pasted was from mfix -h
, not mfixsolver -h
. Here are the two outputs:
(mfix-23.3.1) c:\tmp>mfix -h
usage: mfix [-h] [-s STYLE] [-n] [-w] [-k] [-g] [-d] [-c] [-t] [-ct] [--save] [-v] [project]
MFiX GUI
positional arguments:
project open mfix.dat or <RUN_NAME>.mfx project file or search a specified directory for project files
options:
-h, --help show this help message and exit
-s STYLE, --style STYLE
specify app style ['windowsvista', 'windows', 'fusion']
-n, --noload do not autoload previous project
-w, --nonodeworks do not load the nodeworks environment
-k, --novtk do not load vtk
-g, --default_geo use default geometry, don't restore previous state.
-d, --developer enable developer mode.
-c, --clear clear all saved settings.
-t, --test enable test mode.
-ct, --thumbnails create thumbnails in test mode.
--save save the project in test mode.
-v, --version show program's version number and exit
“Positional arguments” means they are just specified on the command line without any flag at all.
mfix [-h] [-s STYLE] [-n] [-w] [-k] [-g] [-d] [-c] [-t] [-ct] [--save] [-v] [project]
positional arguments:
project open mfix.dat or <RUN_NAME>.mfx project file
means that the name of the project file takes the place of [project] on the command line… you just say
mfix foo.mfx
For mfixsolver
the flags are different:
(mfix-23.3.1) c:\tmp>mfixsolver -h
Welcome to PYMFiX
options:
-h, --help show this help message and exit
-f FILE, --file FILE specify an input file (*.mfx or *.dat)
-m MFIXSOLVER, --mfixsolver MFIXSOLVER
full path to mfixsolver module (mfixsolver.so, mfixsolver_dmp.so, etc.)
-d DIRECTORY, --directory DIRECTORY
directory containing mfixsolver.so (deprecated, use -m)
-p, --print-flags display the solver configuration flags
-l LOG, --log LOG set logging level (ERROR, WARNING, STATUS, INFO)
-c, --clean clean output files before starting run
-s, --server start HTTP server
When you use the GUI to start/stop the simulation, mfixsolver
is launched automatically with the correct options. If you are starting from the command line for whatever reason, you need mfixsolver -f myfile.mfx