TAGGED: batch, mechanical-apdl, scripting-journaling-udf, workbench
-
-
October 8, 2021 at 6:26 amcrumbergSubscriber
New Workbench user here. (For context, I have a solid background with MATLAB and Python and a little experience with APDL.) Currently, I have a Workbench project with Fluent and Structural components on a local machine. The license and computing resources required to solve my model are located on a separate machine that is accessed using a Linux command terminal.
1) Is there any way to export my Workbench project as a batch file that I can solve on a separate machine? I need to a) export the batch file, b) find the command line entry to solve the batch file, and c) locate the solution file after solving.
2) Is there a way to edit my model in headless mode, i.e. using only a script editor? I especially want to be able to edit geometries, element types, and contact types. I have so far been able to find the Python script editor inside Mechanical, but I cannot find much documentation. If I could just work with APDL script without having to open Workbench, I think this would help a great deal.
Thanks for any directions or resources you can point me to!
October 9, 2021 at 3:47 ampeteroznewmanSubscriberThere is the easy way and the hard way to solve a structural model on a Linux High Performance Compute (HPC) server. The hard way is what you are asking how to do. I almost never do it the hard way, so someone who does might reply and give you better information than I have, but this will at least get you started.
1) a) In Mechanical, click on the Static Structural branch. The Ribbon has an Environment tab. On that ribbon is the button: Write Input File. That is the button to export a file called file.dat that you would move over to the Linux computer.
1) b) You would then issue a batch command to start the solver. The command includes the input filename file.dat.
On a Windows computer, it is something like what is shown below, but of course on the Linux computer it will be different. I put the following line into a file called run.bat in D:\scratch where I put file.dat from part a). In this example, I requested distributed solving over 6 processors.
"C:\Program Files\ANSYS Inc\v211\ansys\bin\winx64\ansys211.exe" -i file.dat -o solve.out -b -dis -np 6
1) c) The results are in file.rst which is very large. There is also a file called file.db that is the database. The text output on the progress of the solution is written to solve.out which you would check first. Move the .rst and .db files back to your local computer. You didn't ask the part d) question, how to read that file into Mechanical. I don't know the answer to part d) but someone who does might reply.
You can practice the above on your local computer and get that working first, then figure out how to do the same on the Linux computer.
The easy way requires that the Linux compute server has Remote Solve Manager installed and your local Windows computer is configured to use Remote Solve Manager. For example, in the image below, the remote compute server is called HPCS04. When I click on the Solve branch of the model, instead of solving on My Computer, I can automatically send the input file to the HPC computer. After the solution is complete, the results are automatically send back to my local computer. It's almost no different than solving locally on My Computer.
I recommend you request that Ansys Remote Solve Manager (RSM) be installed on the Linux computer and you configure your local computer to submit jobs to that.
October 13, 2021 at 11:11 pmpeteroznewmanSubscriberHere is the answer to the part d) question you didn't ask, how to import the results file into Mechanical.
/forum/discussion/32647/how-do-i-import-results-solved-via-hpc-back-into-ansys-wb-static-structural-to-view-them
October 19, 2021 at 7:03 pmcrumbergSubscriberThank you so much! I'm sure I will come across more challenges as I work through this, but this is really helping me get started with the process.
October 23, 2021 at 3:57 pmKartiSinghFreemanSubscriberHey Peter, before saving the .dat file with Write Input File do you need to generate the mesh before saving or is that done with the solver when the script is run?
October 24, 2021 at 12:01 ampeteroznewmanSubscriberI rarely use the Write Input File button, I sometimes use the Write Nastran File. Anytime I do, I have already generated the mesh. I expect if you haven't generated the mesh, Mechanical would automatically do that prior to writing out the .dat file in the same way it generates the mesh when you hit the Solve button.
November 2, 2021 at 5:01 amKartiSinghFreemanSubscriberI have been pretty occupied and have just got around to writing the dat file without the mesh, and yes it generates the mesh before it writes the dat file as you mentioned. It's not a big deal for me but I have more complicated meshes that I would like to do via headless mode on a HPC.
Would you happen to have any tips?
Viewing 6 reply threads- The topic ‘Is there a way to run ANSYS in headless mode?’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- 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
- Error when opening saved Workbench project
- Geometric stiffness matrix for solid elements
- How to apply Compression-only Support?
- How to select the interface delamination surface of a laminate?
- Timestep range set for animation export
- Image to file in Mechanical is bugged and does not show text
- SMART crack under fatigue conditions, different crack sizes can’t growth
Top Contributors-
1216
-
543
-
523
-
225
-
209
Top Rated Tags© 2024 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-