% % Demonstration input file for simple general purpose FEA code EN234FEA % A.F. Bower, Oct 2017 % % Input file to stretch a viscoplastic bar, meshed with 2 elements. % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MESH DEFINITION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MESH % The NODE command defines properties of the nodes. % The parameters are # of coords, # of DOF, and an optional integer identifier NODES % The parameters are # of coords, # of DOF, and an optional integer identifier PARAMETERS, 3, 3, 1 % Specify which nodal DOF are displacements. In the example, DOF 1 is the x displacement, 2 is the y displacement, 3 is the z displacement DISPLACEMENT DOF, 1, 2, 3 % Enter x,y,z coords of nodes. The node number is optional, and is ignored in the code. COORDINATES 1, 0.d0, 0.d0, 0.d0 2, 1.d0, 0.d0, 0.d0 3, 1.d0, 1.d0, 0.d0 4, 0.d0, 1.d0, 0.d0 5, 0.d0, 0.d0, 1.d0 6, 1.d0, 0.d0, 1.d0 7, 1.d0, 1.d0, 1.d0 8, 0.d0, 1.d0, 1.d0 9, 2.d0, 0.d0, 0.d0 10, 2.d0, 1.d0, 0.d0 11, 2.d0, 0.d0, 1.d0 12, 2.d0, 1.d0, 1.d0 END COORDINATES END NODES % % The ELEMENT command defines properties of elements % The parameters are no. nodes on the element, no. properties, total no. state variables, integer identifier % The MATERIAL command creates a new material. The material properties can be assigned to ABAQUS style continuum elements to test an ABAQUS UMAT or VUMAT MATERIAL, viscoplastic_umat STATE VARIABLES, 2 % Number of material state variables (if the key is omitted the number of state vars defaults to zero) PROPERTIES 1000.d0, 3.d0 % E, nu 5.d0, 0.5d0, 5.d0 % Y0, e0, n 0.001d0, 5.d0 % edot0, m END PROPERTIES END MATERIAL % % The ELEMENT command defines properties of elements ELEMENTS, INTERNAL % The TYPE key selects an ABAQUS format continuum element % The following elements are supported: C3D4, C3D8, C3D10, C3D20 TYPE, C3D8 PROPERTIES, viscoplastic_umat % Define element connectivity % The element number (first number in the list) is optional, and is ignored in the code CONNECTIVITY, zone1 1, 1, 2, 3, 4, 5, 6, 7, 8 2, 2, 9, 10, 3, 6, 11, 12, 7 END CONNECTIVITY % The PROPERTIES, PARAMETERS, CONNECTIVITY keywords can be repeated here to define more set of elements with different properties END ELEMENTS END MESH %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BOUNDARY CONDITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The BOUNDARY conditions key starts definition of BCs BOUNDARY CONDITIONS % The HISTORY key defines a time history that can be applied to DOFs or distributed loads HISTORY, dof_history 0.d0, 0.d0 % Each line gives a time value and then a function value 10.d0, 0.05d0 END HISTORY NODESET, left 1, 4, 5, 8 END NODESET NODESET, right 9, 10, 12, 11 END NODESET NODESET, side 1, 2, 5, 6, 11, 9 END NODESET % The DEGREE OF FREEDOM key assigns values to nodal DOFs % The syntax is node set name, DOF number, and either a value or a history name. DEGREES OF FREEDOM 1, 3, VALUE, 0.d0 side, 2, VALUE, 0.d0 left, 1, VALUE, 0.d0 right, 1, HISTORY, dof_history END DEGREES OF FREEDOM END BOUNDARY CONDITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Mesh printing, error checking %%%%%%%%%%%%%%%%%%%% % Print the initial mesh to a file named initial_mesh.dat PRINT INITIAL MESH, Output_files\initial_mesh.dat TIME, VALUE, 0.d0 % Use this to specify the initial time TIME, INCREMENT, 0.01d0 % Use this to specify a time increment (often needed for check stiffness) % The CHECK STIFFNESS key tests the element subroutine to ensure that % the residual force vector is consistent with the stiffness % CHECK STIFFNESS, C3D8 CHECK MATERIAL TANGENT, viscoplastic_umat % STOP %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Analysis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The STATIC STEP key initializes a static load step STATIC STEP INITIAL TIME STEP, 0.2d0 % Test of a comment here MAX TIME STEP, 0.2d0 MIN TIME STEP, 0.001d0 MAX NUMBER OF STEPS, 40 STOP TIME, 200.d0 STATE PRINT STEP INTERVAL, 1 USER PRINT STEP INTERVAL, 1 % The SOLVER key controls the equation solver and Newton-Raphson iterations % The options are FACTOR for direct solver, CONJUGATE GRADIENT for cg solver % Factor will work on anything but might be slow for large equation systems. % Conjugate gradient works well for elasticity problems but (with the diagonal preconditioner used here) is not so good for unsymmetric matrices % LINEAR for linear equations, NONLINEAR for nonlinear equations % For nonlinear solver, must specify convergence tolerance and max # iterations % UNSYMMETRIC (optional - only for unsymmetric stiffness) SOLVER, DIRECT, NONLINEAR, 1.d-05,15, UNSYMMETRIC % This prints the DOF values and projected nodal state for all solid elements to a tecplot readable file % Nodal variables are printed as % X, Y, (Z), Ux, Uy, (Uz), Projected states. % The projected states are controlled by the user - see subroutine elstat in file usrelem.f90 % Also (for this example file) subroutine state_linelast_3dbasic in file el_linelast_3Dbasic.f90 % In this example the states are the stresses sxx,syy,szz,sxy,sxz,syz PRINT STATE, Output_files\contourplots.dat % DEGREES OF FREEDOM FIELD VARIABLES, S11,S22,S33,S12,S13,S23 DISPLACED MESH DISPLACEMENT SCALE FACTOR, 1.d0 END PRINT STATE USER PRINT FILES Output_files\stressvstrain.dat END USER PRINT FILES END STATIC STEP STOP