In order to perform a wind coupling analysis, the aeroelastic software must be modified to provide data communication with Mechanical APDL through the specified interface.
The aeroelastic analysis should be started before the FE analysis Both programs should use the same WTBFunctions.dll at run time.
Below is a brief description of the wind coupling algorithm implemented in Mechanical APDL:
Both Mechanical APDL and the aeroelastic code are run concurrently.
Both programs carry out data initialization separately.
At the beginning of a time step, set the aeroelastic code to active. The aeroelastic code computes and returns the turbine stiffness, damping and mass matrices to Mechanical APDL together with the aerodynamic force vector for the current time step. Put the aeroelastic code to sleep.
Mechanical APDL carries out the time integration to find the new solution at the end of the current time step.
The displacements, velocities and accelerations of the turbine freedoms (i.e. freedoms on the USER300 element) at the end of the step are stored to the shared common for the aeroelastic code.
Advance to next time step and return to step 3.
The following routines are used to facilitate data exchange between Mechanical APDL and the aeroelastic code as described above. They can be accessed from the aeroelastic code by linking in the dynamic link library WTBFunctions.dll. Coding examples utilizing these routines in FORTRAN and C++ are available in the folder Program Files\Ansys Inc\v242\ansys\custom\user\{platform}\Aeroelastic, where {platform} is a directory that uniquely identifies the hardware platform version: “Winx64” for 64-bit Windows.
SUBROUTINE GetWTBParamI(itype,id,ival,ierr) !**** !**** Routine gets an integer wind turbine parameter to common data area !**** !**** Arguments !**** itype (in ) Data type !**** 1 - Mechanical APDL run status !**** = -1 not started !**** = 0 inactive (waiting) !**** = 1 active (running) !**** = 2 stopped (finished/aborted) !**** 2 - Wind code run status !**** = -1 not started !**** = 0 inactive (waiting) !**** = 1 active (running) !**** = 2 stopped (finished/aborted) !**** 3 - Number of active freedoms !**** 4 - Time step number !**** id (in ) element identifier (currently unused, assume 1) !**** ival (out) parameter value !**** ierr (out) exit code (0 if no error) integer itype,id,ival,ierr
SUBROUTINE GetWTBParamR(itype,id,rval,ierr) !**** !**** Routine gets a real wind turbine parameter to common data area !**** !**** Arguments !**** itype (in ) Data type !**** 1 - Analysis time !**** 2 - Time step !**** id (in ) element identifier (currently unused, assume 1) !**** rval (out) parameter value !**** ierr (out) exit code (0 if no error) integer itype,id,ierr double precision rval
SUBROUTINE GetWTBData(itype,id,array,narray,ierr) !**** !**** Routine gets wind turbine data from common data area !**** !**** Arguments !**** itype (in ) Data type !**** 1 - Stif !**** 2 - Damp !**** 3 - Mass !**** 4 - Load !**** 5 - Disp !**** 6 - Velo !**** 7 - Accn !**** id (in ) element identifier (currently unused, assume 1) !**** array (out) data array !**** narray (i/o) size of array on input, actual array size on exit !**** ierr (out) exit code (0 if no error) integer itype,id,narray,ierr double precision array(*)
SUBROUTINE PutWTBParamI(itype,id,ival,ierr) !**** !**** Routine puts an integer wind turbine parameter to common data area !**** !**** Arguments !**** itype (in ) Data type !**** 1 - Mechanical APDL run status !**** = -1 not started !**** = 0 inactive (waiting) !**** = 1 active (running) !**** = 2 stopped (finished/aborted) !**** 2 - Wind code run status !**** = -1 not started !**** = 0 inactive (waiting) !**** = 1 active (running) !**** = 2 stopped (finished/aborted) !**** 3 - Number of active freedoms !**** 4 - Time step number !**** id (in ) element identifier (currently unused, assume 1) !**** ival (in ) parameter value !**** ierr (out) exit code (0 if no error) integer itype,id,ival,ierr
SUBROUTINE PutWTBParamR(itype,id,rval,ierr) !**** !**** Routine puts a real wind turbine parameter to common data area !**** !**** Arguments !**** itype (in ) Data type !**** 1 - Analysis time !**** 2 - Time step !**** id (in ) element identifier (currently unused, assume 1) !**** rval (in ) parameter value !**** ierr (out) exit code (0 if no error) integer itype,id,ierr double precision rval
SUBROUTINE PutWTBData(itype,id,array,narray,ierr) !**** !**** Routine puts wind turbine data to common data area !**** !**** Arguments !**** itype (in ) Data type !**** 1 - Stif !**** 2 - Damp !**** 3 - Mass !**** 4 - Load !**** 5 - Disp !**** 6 - Velo !**** 7 - Accn !**** id (in ) element identifier (currently unused, assume 1) !**** array (in ) data array !**** narray (i/o) size of array on input, actual put size on exit !**** ierr (out) exit code (0 if no error) integer itype,id,narray,ierr double precision array(*)
You must keep in mind the following when performing an aeroelastic analysis:
After data initialization (e.g. data read in and checking, etc), the aeroelastic code should be put to sleep until the Mechanical APDL run status becomes inactive.
The number of active freedoms is the number of freedoms in the aeroelastic model. This must be set up and put to the shared common by the aeroelastic code during the data initialization phase of the analysis.
For the current usage, the aeroelastic code should always only put stiffness, damping, mass, and load data to the shared common, and get displacements, velocities, and accelerations from the shared common.
The wind turbine array entries must correspond to the order of the element freedoms set up for the wind coupled USER300 element. Thus, freedoms 1 to 6 are UX, UY, UZ, ROTX, ROTY, and ROTZ freedoms of the interface node between the turbine and the support structure. The rest are generalized freedoms internal to the element. All the data must be stated in the structural coordinate axis system.
The element matrices (i.e. stiffness, damping, and mass) are assumed to be given in packed symmetric form. The order of the packed symmetric matrix form in which the data are specified is defined as follows:
The units of the wind turbine data values are assumed to be consistent with the analysis units. No units conversion will be carried out by Mechanical APDL.
It is assumed that identical time step sizes are used in both Mechanical APDL and the aeroelastic code. The solution times are controlled by data in Mechanical APDL since it is the one that solves the complete set of equations of the coupled system.
The table below shows the explanation of the various exit code values (i.e. ierr):
Code Meaning 100 Invalid data type integer 101 Specified array size too small to get 102 Specified array size too big to put 103 Number of active freedoms is unset 104 Invalid array size specified 201 Invalid run status specified 202 Invalid number of active freedoms specified 203 Invalid time step number specified 301 Invalid time step value specified