TAGGED: file.rst, mechanical, script
-
-
July 10, 2023 at 11:03 pmSizhe MaSubscriber
I am now writing a script to loop through different loading conditions and material conditions. For each iteration, I perform the static structural analysis and collect the deformation from some nodes of the mesh (the node IDs are pre-set). In the end, I write all of them into a .csv file. The problem now is the code only collects data from the first iteration since I open Ansys Mechanical. From then on, if I don't reopen Ansys Mechanical, all the deformation collected is the same as the first iteration (for other conditions). Apart from the first iteration since I opened Ansys Mechnical, a warning like this popped up for every consecutive iteration: Failed to move file from solver directory to scratch directory: file.rst.
For the most inside loop, my code looks like this:
for load in loading:
####Change loading conditions (The location of loading)
pressure = DataModel.GetObjectById(3778)
selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities)
selection.Ids = [load]
pressure_3778.Location = selection####ClearGeneratedData and Resolve for new condition.
####I thought this step would solve the warning, but not really.
solution.ClearGeneratedData()
solution.Solve()####Later will be data collection...
May I ask if anyone ever encounters this? I searched for the warning message on the forum, but there was not much answer. Thanks!
Best,
Ted
-
July 11, 2023 at 5:16 amAkshay ManiyarAnsys Employee
Hi Ted,
The issue you are facing is a 0 kB file.rst problem. Sometimes, if you press the stop button, the analysis is stopped and an empty file.rst is copied into the Mech directory. Now Mechanical has access to this file. Now, if you run the analysis again, file.rst is written by the solver. But if the analysis has finished, the new file.rst can’t be moved into the Mech folder, as 0 kb file.rst is already present in the folder.The only option to get rid of is,- Copy the .rst file path or open that folder and then close the mechanical.
- Go to the directory where that 0kb file.rst is saved.
- Delete the 0 kB file.rst
- Now open mechanical and run the simulation.
Another option is to copy the Analysis System. As the results are not copied, the file.rst problem is gone. It is a known bug, and it is resolved in the 2023R2 version. With scripting, you can try to use the second option. You can make a copy of the analysis system and apply the second set of loads.Thank you,
Akshay Maniyar
How to access Ansys help links
Guidelines for Posting on Ansys Learning Forum
-
November 17, 2023 at 12:14 pmhenriquegpoSubscriber
Dear Akshay,
Just to inform you, I just had this exact problem even using Ansys 2023R2.
Deleting the 0kB result file worked.
Kind regards,
Henrique -
December 13, 2023 at 8:39 amRobert NilssonSubscriber
This does not seem to be fixed in 2023R2. I had the same problem and removing the 0kb file0.rst fixed it.
-
July 11, 2023 at 2:53 pmSizhe MaSubscriber
Thank you for the reply Akshay! I am now following your second option. I am creating a duplicate using code for each condition right now. Luckily, the 0kb file.rst problem no longer exists. But I am now having unknown error for each of those solve (starting since the very first solve of the loop). I can see “writing results” at the left bottom for every solve, and when I go to the “solver output” in “solution information”, there is no error. I am quite sure it is the problem with writing the solution. Some behavior now it is having: all the solutions are capable of finishing as long as I don’t run my script (a for-loop doing duplicate analysis and solve). After I run my script, neither the solve within the script nor solve manually (right click solution – solve) was able to write the result. All circumstances stop at writing the result part. Could it be because I am connecting to a campus vpn? But I am sure all the calculations are done with my own computer (scratch and solve directory).
Red is the original simulation that I perform duplication on while the yellow are examples of four duplicates. All these four have the same files as the original, except there is no "file.aapresults" in these four folders. Could that be the problem?
Best,
Ted
-
November 17, 2023 at 1:33 pmAkshay ManiyarAnsys Employee
Hi Ted,
Can you start a new forum thread for your question? It is better to keep the discussions separate as it can help others.
Thanks,
Akshay Maniyar
-
- The topic ‘Failed to move file from solver directory to scratch directory: file.rst’ is closed to new replies.
- Problem with access to session files
- Ayuda con Error: “Unable to access the source: EngineeringData”
- At least one body has been found to have only 1 element in at least 2 directions
- Reaction forces and moments during random vibration at local coordinate systems
- Using APDL to extract stresses on a beam element.
- How to select the interface delamination surface of a laminate?
- Geometric stiffness matrix for solid elements
- Timestep range set for animation export
- Non-linear convergence issue
- Computation Accleration
-
1156
-
471
-
468
-
225
-
201
© 2024 Copyright ANSYS, Inc. All rights reserved.