ans2sdt#

Purpose

Interface between ANSYS and SDT (part of FEMLink)

Syntax

 ans2sdt('read FileName')         % .rst, .cdb, .matrix, .mode  files
 ans2sdt('write FileName')        % .cdb file
 ans2sdt('BuildUp FileName')      % .rst and .emat files
 ... = ans2sdt('def FileName.rst')% .rst or .mode files 

Description

Build[Up,ContactMPC]#

  • Command BuildUp reads the binary files FileName.rst for model definition and FileName.emat for element matrices. The result is stored in Up (a type 3 superelement handled by upcom). FileName.mat is used to store the superelement.

    General syntax is ans2sdt('BuildUp FileName'); valid calls are

    Up=ans2sdt('buildup file');  
    [m,k]=upcom(Up,'assemble not');
    

    For recent versions of ANSYS, you will have to manually add the ematwrite,yes command to the input file to make sure that all element matrices are written. This command is not accessible from the ANSYS menu.

    There is a partial attempt to fill in element properties in Up.il. You can also use data=stack_get(model,'info','RealConstants','getdata') to obtain the cell array containing the ANSYS real constants for various elements. The index in this cell array corresponds to element ProId values.

  • Command BuildContactMPC interprets ANSYS contact elements (CONTA171-175), and slave elements TARGE170 to generate MPCs in the form of fe_case ConnectionSurface. This is thus close to bonded contact formulations.
    model=ans2sdt('Read file.cdb'); % read base file
    % transform contact info into bonded coupling
    model=ans2sdt('BuildContactMPC',model); 
    

def#

def=ans2sdt('read','file.mode') reads deformations in .mode files.

To read responses .rst files you should use

 model=ans2sdt('readdef','test.rst'); % read all data
 def=stack_get(model,'curve','NSL');
 % Partial read of only specific entries  
 model=ans2sdt('rstdef','sdtforced.rst', ...
   struct('DefUse',{{'NSL'}})); % give the block names to be read

Since multiple blocks can be read, the results is saved in the model stack and can be retrieved by name using stack_get(model,'curve','NSL'); or similar calls. The standard names used by ANSYS are NSL (displacement), VSL (velocity response), RF (reaction forces), ESL (element solution, see ans2sdt ESLread). If you are interested in reading other results, please send a test case.

conv#

This command lists conversion tables for elements, topologies, face topologies. You can redefine (enhance) these tables by setting preferences of the form sd_pref('set','FEMLink', 'ansys.elist',value), but please also request enhancements so that the quality of our translators is improved.

read#

This command reads files based on their standard ANSYS extension.

  • .matrix files are read assuming ASCII Harwell Boeing format obtained with HBMAT, Fname,Ext,--,ASCII,STIFF. RHS vectors or binary matrices are not read yet. You can read the mapping file at the same time using ans2sdt('matrix','k.txt','k.mapping'); or DOF=ans2sdt('mapping','k.mapping').
  • .mode files contain deformations which are read into the usual SDT format.
  • .rst files contains model information topology, some material/element properties and boundary conditions (but these are more consistently read in the .cdb), ...
    • When an .emat file is present, the read call attempts to run the BuildUp command.
    • Responses are read using a call of the form ans2sdt('readdef','file.rst'), see ans2sdt def
  • .cdb input files also written by ANSYS using the CDWRITE ALL,FileName,cdb command.
    • SDT attempts to use the real constant number RealId as a ProId (for example for the COMBIN14 elements) but this requires to use distinct RealId (in particular not reuse values for elements that do not use RealId).
    • This will always be work in progress, so please request enhancements on the support of this format so that the quality of our translators is improved.
  • .sub file stores superelements, you should load with SE=ans2sdt('SubSE -save','fileSE.sub'); which will also read associated .cdb, ... files with the same root name to obtain a full SDT superelement. The -save option is used to save the result in a .mat file.

ANSYS does not store boundary conditions in the .rst files so that these can only be imported from .cdb file. If you only have fixed boundary conditions, you can easily generate those with

 model=ans2sdt('buildup test');         % read model
 def=ans2sdt('def test.rst');           % read deformations
 model = fe_case(model,'fixdof','Fixed_Dofs', ...
   fe_c(model.DOF,def.DOF,'dof',2));
 cf=feplot; cf.model=model; cf.def=def; % display

ESLread#

To read element output data if any, that were detected during the reading of an output file (.rst).

model=ans2sdt('ESLreadtoken',model); will generate a stack entry named ESL:token in the model that will contain the element data.

token is an element output data identifier as documented by ANSYS, and mentioned in the model stack entry info,ptrESL.

Command option groupi allows generating the output for a given group number i

JobOpt#

JobOpt = ans2sdt('JobOpt',Opt); This command returns a filled JobOpt structure to be run by sdtjob. Opt is a structure containing at least the field Job as the job name or file. InList and OutList must be filled. Further options concern the fields Input when the input file is different from the job name, RunOptions to append the usual option to the Ansys command, RemoveFile to remove files from the remote directory when needed.

Write#

ans2sdt('write FileName.cdb',model) is the current prototype for the ANSYS writing capability. In ANSYS .cdb files are written with the CDWRITE ALL, FileName, cdb command. This does not currently write a complete .CDB file so that some manual editing is needed for an ANSYS run after the write.

See also

FEMLink