I am using the latest version of MFIX and when I try to save the project under SMS mode, the following error pops up. And I have never encountered the similar errors in version 21.2. I want to know whether this is a bug or not. I hereby attach the .stl and .mfx files as well. chamber_delicate_structure1.mfx (8.3 KB) chamber_delicate_structure2.STL (766.9 KB)
When we save an MFiX file, we first write it out to a temporary file (.mfx.tmp) and then after the save operation succeeds, we rename that file to .mfx. This way, if there’s an error during the save operation, the file does not get clobbered or corrupted.
In your case, the writing of the .mfx.tmp file succeeded but the rename operation failed due to “Access denied”. Did you do anything to change the access permissions on that file or folder? Or do you maybe have the .mfx file open in another application?
I’ve never seen this “Access is denied” error before and I can’t reproduce it. I will need some help from you in troubleshooting this one.
Thank you Charles, I did not open .mfx file in another software at the same time when I tried to save the project. Sometimes, the error did not appear; sometimes, after I deleted and regenerated the mesh several times and change the paras like control points or cell numbers, the error would pop up when I saved the project.
Since I’m unable to reproduce this error, I need your help figuring it out. I suspect some process is accessing the file. Does the save work if you wait a moment and try again? Can you come up with a reliable way to trigger the error?
Maybe the reliable way to first set the cell number in each direction very large such as X: 1000,Y:500,Z:400. And then the meshing procedure will freeze with the following words:
The file FACETS_IGNORED.stl was successfully written.
and is provided for convenience (it is not used).
From Detect_stl_along_mfix_box:
Then I change the cell number to the normal such as (100,50,50), the error will pop, so I assume that the freezing procedure may have conflicts with the following normal one.
This is what I’m seeing in traceback.txt in the bug reports you uploaded:
Error: [WinError 32] The process cannot access the file because it is being used by another process: 'CHAMBER_DELICATE_STRUCTURE1.msh'
File "C:\Users\juu\.conda\envs\mfix-21.3\lib\site-packages\mfixgui\mesh.py", line 269, in generate_mesh
os.unlink(mesh_file)
So, it is a matter of the file being open in another process. I’ll look into why this is happening. It’s a bit odd that this message doesn’t match what’s in the screenshot you posted (WinError 5 vs WinError 32), but I suspect that it’s related.
Thank you Charles, this problem is still persistent. For instance, if I just create a new project, when I save that, this error happens; if I open a project with mfx and .stl files copied from another place, when I make slight modification and save that, the problem happen again. But it is only temporarily normal when I generate meshing and in some cases after the generation, the project can be saved. And there is no bug report generated either, I do not know why. Thank you.
I am getting a similar error, unfortunately the above conversation is not very helpful. Error: Unexpected error saving project: '[WinError 5] Access is denied: 'C:\Users\…
Hi. For the time being, until this bug is fixed, I suggest you disable SMS mode (go to the main menu, and then Settings). Does the problem occur if SMS mode is not enabled?
Unfortunately, the problem still occurs. In fact, I installed the latest version 22.1 which does highlight the problem being fixed. However, I am still facing it.
Thanks for the report, and I’m sorry that this problem is still occurring. We’ll look into it. For the time being, I suggest you simply disable SMS mode, go to the main (file) menu, Settings, then set “Mesher workflow” to “Default”
Hi, maybe this experience can help you. The MFIX software have an expert function, you can try to ask the owner of the profile to expert everything to you, this method solve the same problem for me, best wishes!