After installing the Samcef program, you must set the following environment variables for compatibility with Workbench:
- SAMTECH_LICENSE_FILE
The path to your license server or license file. See the Samcef documentation for more information.
- SAM_EXE
The path to the Samcef executable folder. In a standard installation, this is the Exec folder in the base directory of the Samcef install. For instance, if Samcef is installed at C:\Samcef, the path to the executable folder is C:\Samcef\Exec
- SAM_WORK
The path to a temporary folder for a local run of Samcef. See the Samcef documentation for more information.
The exact results stored by the Samcef solver can be controlled using an XML
configuration file. This file uses Samcef SAI codes to define which results to
write to the results file. Results are classified by result type and category.
The configuration file is located at
ANSYS_INSTALL_DIR\v251\aisol\WBAddins\SamcefAddin\SamcefArchiveSettings.xml.
The configuration file is read when Mechanical is launched. If changes are made to the file while Mechanical is running, Mechanical must be restarted to reflect the changes.
The XML root element in this file is
<SamcefArchiveSettings>. The child nodes of
this root element represent analysis types. The only valid child node is
<Analysis>, and this child node has the
following attribute:
name(type string)The analysis type:
defaultmodalnon_linearharmonicthermal
The <Analysis> node can have a child node of
<Output>, which has the following
attribute:
type(type string)The option type, used to order SAI codes in the solver input file:
nodalelemental
The <Output> node has child nodes of
<Codes> which have the following
attributes:
value(type string)List of Samcef SAI codes separated by spaces. Usually a list of integers, positive or negative.
category(type string)Optional, used for options enable or disabled by the user.
stressstrainthermal_fluxcontact
When a solve is executed and the solver input file is created, Mechanical finds
the correct <Analysis> node in the configuration
file to determine the SAI codes to write to the input file. This check is
performed by finding the analysis type and whether the analysis is linear or
nonlinear. The following table describes the mapping:
| Workbench Analysis Type | Option | <Analysis> Node Used |
|---|---|---|
| Static Structural (Samcef) | Linear | default |
| Nonlinear | non_linear | |
| Transient Structural (Samcef) | Linear | default |
| Nonlinear | non_linear | |
| Modal (Samcef) | Linear | modal |
| Nonlinear | non_linear | |
| Harmonic Response (Samcef) | - | harmonic |
| Eigenvalue Buckling (Samcef) | - | No SAI code written |
| Steady-State Thermal (Samcef) | - | thermal |
| Transient Thermal (Samcef) | - | thermal |
In order to postprocess all results from the Samcef solver in the Workbench
interface, an XML file is used to map the results between Samcef and Workbench.
The XML file defines all of the Workbench result codes with associated data, and
lists the corresponding Samcef codes. The configuration file is located at
ANSYS_INSTALL_DIR\v251\aisol\WBAddins\SamcefAddin\SamcefResultCodes.xml.
The configuration file is read when Mechanical starts postprocessing Samcef data. If changes are made to the file while Mechanical is running, Mechanical must be restarted to reflect the changes.
The following is an example result as expressed in the XML configuration:
<Result result_name="U" result_id="101" data_type="nodal" out_unit="length" style="vector"
num_comp="5" comp_labels="XYZLABELS" description="Deformations(XYZs)">
<Codes>
<Code name="Code 163" />
</Codes>
</Result>The listing provides the following information:
The Workbench code "U" identified by Mechanical by the ID 101 is a nodal result and is interpreted as a length.
The result is represented in the vector style, has 5 components and is part of the XYZLABELS group.
The result corresponds to Samcef result code, "Code 163".
The XML Result object can have the following
attributes:
result_name(type string)The Workbench name of the result. Standard Mechanical names are reserved.
result_id(type integer)The Workbench ID of the result. Standard Mechanical IDs are reserved; you should start numbering solver-specific results at 100000. You should not choose a number larger than 1000000 because those numbers are internally reserved.
data_type(type string enumerate)The result type:
nodalelem_nodalelemental
out_unit(type string enumerate)The unit type of the result. If this value is
defined_per_component, the subtag<UnitsPerComponent>must be defined.The
<UnitsPerComponent>node contains individual<Component>nodes with the attributesnameandout_unit. Thenameattribute corresponds to the component name, and theout_unitattribute has the same requirements as this attribute.<UnitsPerComponent> <Component name="XXX" out_unit="XXX" /> <Component out_unit="XXX" /> </UnitsPerComponent>no_unitsaccelerationangleangular_velocityareacapacitancechargecharge_densityconductivitycurrentcurrent_densitydensitydisplacementelectric_conductivityelectric_fieldelectric_flux_densityelectric_resistivityenergyfilm_coeffforceforce_intensityfrequencyheat_fluxheat_generationheat_rateinductanceinverse_stresslengthmagnetic_field_intensitymagnetic_fluxmagnetic_flux_densitymassmomentmoment_inertiapermeabilitypermittivitypoissonpowerpressurerelative_permeabilityrelative_permittivitysection_modulusspecific_heatspecific_weightshear_strainstiffnessstrainstressstrengththermal_expansiontemperaturetimevelocityvoltagevolumegasket_stiffnessmoment_inertia_masspsd_accelerationpsd_acceleration_gravpsd_displacementpsd_velocityrotational_dampingrotational_stiffnesstranslational_dampingangular_accelerationseedbeck_coefficientdecay_constantfracture_energyshock_velocityenergy_density_masselectric_conductance_per_unit_areapsd_stresspsd_strainpsd_forcepsd_momentpsd_pressureforce_per_angular_unitimpulseimpulse_per_angular_unittemperature_differencematerial_impedancers_accelerationrs_acceleration_gravrs_displacementrs_velocitywarping_factorthermal_conductanceinverse_lengthinverse_anglethermal_capacitancenormalized_valuemass_flow_rateunitlessstress_intensity_factorsqrt_lengthenergy_per_volumethermal_gradient
style(type string enumerate)The style of the value:
scalarvectortensortensor_straineuler_anglescoordinateshear_moment_diagram
num_comp(type integer)Number of components, between 1 and the length of
comp_labels.comp_labels(type string enumerate)The component labels:
XYZLABELSSTRESSLABELSCONTACTLABELSBEAMLABELSGASKETLABELSNLLABELSMISCLABELSSENGLABELSSPRINGLABELSBEAM188LABELSRADIOSITYLABELSEULERLABELSBEAMRXLABELSTHERMALMASSLABELSSHELLMBPLABELSSLASHPNUMLABELSCINTLABELSPRIN_S_LABELSPDMG_LABELSPFC_LABELSCDM_LABELSCONTDEBONDLABELSBEARINGLABELSBLANKLABELS
description(type string)Free text.
Once the <Result> node is defined, the
<Codes> node with the individual
<Code> child nodes are defined. The
<Codes> node can have the following
attributes:
hasShell(type string)If present and value = true, the
layerattribute should be defined.layer(type integer)Only necessary if
hasShellis set to true.1 - bottom
2 - middle
3 - top
Note: It is possible to have a <Codes> node without
any child <Code> nodes. It can be used to
define a result with layers but no associated codes for those layers, for
example TEMP_UPSHELL.
The <Code> child nodes can have the following
attributes:
name(type string)Value of the Samcef solver code, generally of the form "Code XXX" or "Sdb XXX".
module(type string)Optional, if set, defines the code only for a specific Samcef module. Possible values are:
ba - bacon
me - mechano
as - asef
st - stabi
dy - dynam
mt - mechano/thermal
re - repdyn
Limitations
If the XML of the configuration file is missing or not well-formed, no results are available.
If a result has invalid syntax (missing XML components, invalid attributes), it is not available.
Mechanical must be restarted if any changes are made to the result configuration file during operation.