Hi again @ebreard6
-
As of 24.3.1 only X, Y and Z are required in the CSV.
-
Jeff is working on a fix for the spacing error. Maybe we can send you a code patch that you can apply.
-
The SameFileError
is annoying. We will fix this in the next release. I have to admit, we did not give enough thought to the use case of editing and reloading a PSD definition file. How are you reloading it?
Note that it is not really necessary to reload the file in the GUI when you modify it, unless you want to update the displayed stats (mean, stddev, min, max). Double-clicking the row in the “Particle size distribution” window will bring up an option to plot the distribution, which will plot the current file contents. The PSD file will be loaded by the mfix solver when you run the simulation and will pick up whatever the file contents are at that time. The mean, stddev, etc in the GUI are just for your information, they do not affect the particle generation.
I think part of the reason you are running into trouble with the PSD file is that we were expecting users to use a more descriptive name like “bimodal.txt” and then when it gets applied to particular IC and phase, the GUI will copy it to IC_PSD_####_####.txt
. But you already have it set to IC_PSD_0002_0001.txt
. This should not be a problem, but it’s not exactly the way we expected people to use this feature.
Also I see you are on Windows - there’s some code in solids_dem.psd
which is checking to see if the file needs to be copied:
data['type'] = 'Custom'
if (os.path.isabs(p.filename)
and os.path.dirname(p.filename) != os.getcwd()
and p.ui.checkbox_copy_file.isChecked()):
basename = os.path.basename(p.filename)
shutil.copyfile(p.filename, basename)
but on Windows, I see that os.getcwd()
returns a path like
C:\Users\ebreard\Documents\fluid_bed_dem_2d_24.3.1
(with backslashes) while p.filename
is
C:/Users/ebreard/Documents/...
(with forward slashes) so the string comparison fails. Cursed Windows backslashes strike again!
A somewhat hackish workaround would be to edit the file
%CONDA_PREFIX%\Lib\site-packages\mfixgui\solids_dem.py
and change the section around line 1400 from
basename = os.path.basename(p.filename)
shutil.copyfile(p.filename, basename)
to
basename = os.path.basename(p.filename)
if not shutil._samefile(p.filename, basename):
shutil.copyfile(p.filename, basename)
This is not the ideal fix but it will silence the annoying error popup you are seeing.
Thanks as always for the error report, we will follow up on both of these issues.
– Charles