November 15, 2023 at 7:32 pmlongt8Subscriber
I am considering using script to read and write in .k file into LS-PrePost. I am going to put the script in .bat file and call the function by just clicking it. Would you let me know the sentcence and the website where I can find the instruction? Thank you!
November 16, 2023 at 5:20 pmImtiaz GandikotaAnsys Employee
You can use LSPP command file to run LSPP process in batch mode without launching GUI. First try import and export using GUI. The commands will be saved to lspost.cfile. You can rename this file and call LSPP using below command to run this process without GUI.
Please see here (https://lsdyna.ansys.com/knowledge-base/ls-prepost/) for some resources on LSPP.
November 17, 2023 at 6:48 pmlongt8Subscriber
I followed your procedure, but after I clicked my ".bat" file, it just flush one time and my ls prepost is not opened to import the ".k" file.
This is what I put in my ".bat" file:
C:\Program Files\LSTC\LS-PrePost 4.10\lsprepost4.10_x64.exe runc=Import.cfile
This is what I got in my ".cfile" file:
open command "C:\.........\Import.cfile"
Import.cfile is at the same directory with the ".bat" file.
Would you let me know is the problem?
Thank you so much.
November 17, 2023 at 7:06 pmImtiaz GandikotaAnsys Employee
What is your goal in using this .bat file? You said you want to read in .k into LSPP. Does this mean you want the bat file to launch LSPP and open a k file using GUI? The command to launch LSPP and open a k file is simply,
C:\Program Files\LSTC\LS-PrePost 4.10\lsprepost4.10_x64.exe input.k
You also said you want the bat file to read and then write a k file. What is being changed when you write this k file? Those changes should be defined in LSPP command file (.cfile). For example, below sample test.cfile will open input.k, translate part 4 by 10 in negative x direction, and then save the file as input_mod.k. The batch command to run this process without GUI access is,
"C:\Program Files\LSTC\LS-PrePost 4.10\lsprepost4.10_x64.exe" runc=test.cfile
Note that path is defined in quotes due to spaces in the path. The contents of test.cfile are
openc keyword "input.k"
genselect node add part 4/0
translate_model -10 -0 -0
translate_model accept 0 1001001 1001001
save keywordabsolute 0
save keywordbylongfmt 0
save keywordbyi10fmt 0
save outversion 12
save keyword "input_mod.k"
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Maximum Time Step
- Error 20211 (STR+211) while 2D impact analysis
- ls dyna has no solver
- LS-Dyna Prestressed
- Whereabouts of the LS-DYNA program manager
- License error : NO SUITABLE FEATURE FOUND
- Total Contact Force and Contact Pressure
- Contact not working in Ls-Dyna and Ls-Dyna ACT (WB)
- Element direction..
- TIED_CONTACT for Shell Elements – Gap between Shell-Shell and Shell-Solid
© 2023 Copyright ANSYS, Inc. All rights reserved.