Skip to end of metadata
Go to start of metadata

Step 1: Create Command Log file

ANSYS records every command it executes, whether typed in directly or executed by a function in the Graphical User Interface (GUI), in two places: the session log file (Jobname.log) and the internal database command log. In the case of the Plate with a Hole tutorial, for example, all the commands used to generate the solution were recorded in the session log file (plate.log) and in the database log.

Given that the problem specification for the Plate with a Hole tutorial is very similar to the problem we are solving, we will create a command log/input file based on the commands used to solve the Plate with a Hole tutorial and we will modify these commands to solve our problem. For this tutorial, we will use the database log (vs the session log file) created in the Plate with a Hole tutorial as a starting point. This option will allow us to include only essential commands as part of the command log file.

After completing the Plate with a Hole tutorial, create the Database log file.

Utility Menu > File > Write DB log file

This brings up the Write Database Log window. Enter plate2 under Write Database Log to. This is the name of the log/input file we will modify. Select the Write essential commands only option at the bottom, so that only essential commands are included. Click OK.

Search for the plate2.lwg file in the directory you specified and open it using notepad. Then save this file as plate2.txt. This is the log/input file we will modify. The list of commands generated is shown below.

/BATCH
/input,menust,tmp,'',,,,,,,,,,,,,,,,1
WPSTYLE,,,,,,,,0
/NOPR
/PMETH,OFF,0
KEYW,PR_SET,1
KEYW,PR_STRUC,1
KEYW,PR_THERM,0
KEYW,PR_FLUID,0
KEYW,PR_ELMAG,0
KEYW,MAGNOD,0
KEYW,MAGEDG,0
KEYW,MAGHFE,0
KEYW,MAGELC,0
KEYW,PR_MULTI,0
KEYW,PR_CFD,0
*SET,a,10e-3
*SET,r,7e-3
*SET,p,1e6
*SET,E,1e13
*SET,nu,0.3
/PREP7
ET,1,PLANE42
MPTEMP,,,,,,,,
MPTEMP,1,0
MPDATA,EX,1,,E
MPDATA,PRXY,1,,nu
RECTNG,0,a,0,a,
CYL4,0,0,0,0,r,90
ASBA,1,2
SMRT,5
MSHAPE,0,2D
MSHKEY,0
CM,_Y,AREA
ASEL,,,,3
CM,_Y1,AREA
CHKMSH,'AREA'
CMSEL,S,_Y
AMESH,_Y1
CMDELE,_Y
CMDELE,_Y1
CMDELE,_Y2
FLST,2,2,4,ORDE,2
FITEM,2,8
FITEM,2,9
DL,P51X,,SYMM
FLST,2,1,4,ORDE,1
FITEM,2,5
SFL,P51X,PRES,p,
FINISH
/SOL
SOLVE
FINISH

We can now use this file as a starting point. We will modify these commands to solve our problem.

Go to Step 2: Modify Log file - part1

Go to all ANSYS Learning Modules

  • No labels