Cantilever¶
Here, we will analyse a cantilever with pressure load, and will perform all four analysis types
- Static analysis (click here for the xml file)
- Transient analysis (click here for the xml file)
- Harmonic analysis (click here for the xml file)
- Eigenfrequency analysis (click here for the xml file)
Here you can download the mesh and material file.
Setup¶
We consider a cantilever, which is fixed (fully supported) on the left and is loaded on the top surface by a pressure load.
Meshing using Ansys¶
As a preprocessor we use ANSYS Classic and setup our geometric model and meshing with the PREP7 commands (here in upper case letters) and openCFS macro (here in lower case letters). For more information, use the following ANSYS macro command reference table
command | description |
---|---|
init | Initialized the mesh-extension |
setelems,type,[order] | Select element type for meshing. Valid types are '2d-line', '3d-line', 'triangle', 'quadr', 'tetra', 'brick', 'pyramid' and 'wedge'. Valid orders are 'linear' (=default) and 'quad' |
welems,name | Write selected elements with name attribute name |
wnodes | Write selected nodes |
wnodbc,name | Write selected nodal boundary conditions with name attribute name |
wsavnod,name | Write selected nodes for saving nodal results with attribute name |
wsavelem,name | Write selected elements for saving element results with attribute name |
mkmesh | Write *.mesh file |
-
Initialization part
-
Define constants and generate geometry
-
Perform volume meshing
-
Perform surface mesh for pressure load and mechanical fixing
-
Display of mesh
-
Write volume elements
-
Write surface elements for clamping and pressure load
-
Write coordinates of nodes
-
Write the mesh as *.mesh file
Within this directory you should now find the file cantilever.mesh, which can now be converted by executing the following
You can have a look at the contents of the HDF5 mesh file using HDFView
Static Analysis¶
Setup the XML file for describing the physics and simulation parameter.
Use an XML editor (setup is described here and the usage is described here
The structure of this xml file is as follows: * Header
<cfsSimulation xmlns="http://www.cfs++.org/simulation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cfs++.org/simulation http://cfs-doc.mdmt.tuwien.ac.at/xml/CFS-Simulation/CFS.xsd">
-
File section, defining input and output files. For a list of maintained input mesh formats click here. The file extension .h5 (or .hdf5) can be used interchangeable with .cfs extension, it basically is exactly the same, just a different extension name.
-
Define computational domain with volume-regions, surface-regions, ..; with the
nodeList
, we select a node within the mesh, at which we can later on save, e.g., the displacement in a history file (ASCII format). -
Start the sequence and define the analysis type
-
Define the partial differential equation (PDE) and the region it is defined in
-
Define the boundary conditions
-
Define which results to be stored. You can also select to write the result only on specific regions
-
Close PDE part
-
Close the sequence step and the global xml definition
-
Make sure the material definition in the material-xml file
mat.xml
is defined correctly<?xml version='1.0' encoding='utf-8'?> <cfsMaterialDataBase xmlns="http://www.cfs++.org/material"> <material name="Steel"> <mechanical> <density> <linear> <real> 7.8E03 </real> </linear> </density> <elasticity> <linear> <isotropic> <elasticityModulus> <real> 210E09 </real> </elasticityModulus> <poissonNumber> <real> 0.3 </real> </poissonNumber> </isotropic> </linear> </elasticity> </mechanical> </material> </cfsMaterialDataBase>
Now, we are ready and can perform the computation by runing cfs cantileverStatic
. This will result in the following screen output:
Furthermore, the following output files have been generated:
* In results_hdf5
folder: cantileverStatic.h5: contains the simulation result
* In history
folder: cantileverStatic-ms1-mechDisplacement-node-91-record.hist
* In current directory: cantileverStatic.info.xml
Now, we can start paraview
and display the deformed structure.
Transient Analysis¶
Perform a transient analysis, we just have to change within our XML-description file the following sections * Change analysis part
- Change in bcsAndLoads for pressure excitation (sine-excitation with a frequency of 100Hz)
Harmonic Analysis¶
For the harmonic analysis, we perform the follwoing changes * Change analysis part
<analysis>
<harmonic>
<numFreq> 10 </numFreq>
<startFreq> 10 </startFreq>
<stopFreq> 1e4 </stopFreq>
<sampling>linear</sampling>
</harmonic>
</analysis>
- Change pressure load towards amplitude and phase
Eigenfrequency Analysis¶
For the eigenfreuqency analysis, we perform the follwoing changes * Change analysis part
<analysis>
<eigenFrequency>
<isQuadratic> no </isQuadratic>
<numModes> 5 </numModes>
<freqShift> 0 </freqShift>
<writeModes> yes </writeModes>
</eigenFrequency>
</analysis>
cfs cantileverEigenfrequency
.
This will result in the following screen output:

Start paraview
and visualize the different mode shapes