! This command script "submodel_setup.txt" is used in combination with "submodel_read.txt". ! They are used for setting up solid-to-solid submodelling analysis in Workbench in an ! analysis with multiple loadsteps. ! ! Instructions for the user: ! 1. Insert these commands for the submodel. If using multiple loadsteps, set "Step Selection Mode" ! for this command object to "First". ! 2. Insert a second separate command object and import the file "submodel_read.txt". It should ! come AFTER "submodel_setup.txt". If using multiple loadsteps, set "Step Selection Mode" ! for this command object to "All". ! 3. Create named selection "Cut_boundary" to define submodel interface to full model. ! 4. Edit the line down below in this command script that starts with "FILE" to change the path ! for the result file for the global model. ! ! As set up now, it applies a cut boundary displacement for each loadstep and does not extract ! results for individual substeps. For more advanced choice of which loadsteps or substeps to ! use, it is up to the user to edit Section 4 below. ! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /prep7 ! Step 1: Create file.node containing nodal data for boundary ! Write Cut_boundary if it exists, otherwise write entire external region. *get,ge_par, COMP,Cut_boundary,TYPE *if,ge_par,eq,1,then cmsel, s, Cut_boundary *else nsel,s,ext *endif *if,ge_par,ne,1,then *msg,WARN, Region Cut_boundary not specified -- entire exterior used. *endif csys,0 nrotat,all ! Rotate all these nodes to global coordinates (important!) nwrite ! Create the file nsel,all ! Step 2. Save the current model. SAVE ! SAVE SUBMODEL DATA PARSAV,SCALAR ! save parameters on file, they are needed later ! Step 3. Read in results from global model FINISH /CLEAR /POST1 ! Edit the following line to point to the desired result file: FILE,'D:\users\ab\Support\xdin\090128_submod_multsteps\submodel Simulation Files\Static Structural (11)\file' , rst ! DEFINE RESULTS FILE NAME PARRES,CHANGE ! read parameters from file ! Step 4: Perform cut boundary interpolation with cbdof command. It uses the ! current results (read in at step 3) and the file.node file created in step 1 ! and creates a file file.cbdo containing boundary conditions. ! Loop over all stored steps. More detailed control over which steps to use ! or using time variable instead is up the user to script. /delete, file, cbdo ! delete old cut boundary file ! determine number of stored loadsteps: set,last *get,num_lstep, ACTIVE,, SET, LSTP /nopr *do,ii, 1, num_lstep set, ii ! Read in last substep for this loadstep CBDOF,,, ,,, ,1, CB_%ii% ! CUT BOUNDARY INTERPOLATION *enddo /go FINISH ! Step 5: Read back the submodel database. RESUME ! RESUME SUBMODEL /solu