Compile Adams2AD with ADAMS 2010

Hi,

I’m trying to compile ADAMS DLL using the following:
1- Intel Visual Fortran Composer XE 2011
2- MSC.ADAMS 2010
3- ADAMS2AD: A2AD_v130000a-bjj
4- AeroDyn: AD_v130000a-bjj
5- FAST: FAST_v70001a-bjj
6- NWTC_Subroutine_Library: NWTC_Lib_v1.03.01

and I’m using the FAST User’s guide (August 2005), and the documentation of updates to FAST, A2AD, and AeroDyn (March 2010) as reference in order to compile the ADAMS Dll.

I’ve changed all the required paths in “CompileLinkA2AS.bat” then I run it from command line and I’ve got the following:

The problem is with ADAMS, “ADAMS08r1”. I’m wondering what kind of command I should use for ADAMS2010.

Thanks in advance for your help.
Rannam.

Hi Rannam,

It looks like there are a couple of issues:

  1. Your compiler calls the IFORTVARS.bat differently than the one the script was written for.
  2. Your version of Adams does not include a batch file to directly call the Adams mdi.bat file.

For issue (1), you will likely have to add an “ia32” switch after “CALL IFORTVARS.bat”.

For issue (2), you can call the Adams mdi.bat file directly. You will probably need to add the full path name, but you can find this on Windows by opening the “Adams -Command” properties. (Start/All Programs/MSC.Software/{Version}, then right click on “Adams-Command”, click “Properties”, and copy the location in the “Target:” box on the “Shortcut” tab). This path will replace the “Adams08r1” in the batch script.

These topics are also discussed at the end of the thread located here: ADAMS2008 and AeroDyn?

Hi Bonnie,

Thanks for your reply.

I’ve managed to solve the problems, and the DLL was created without any error, but I’m NOT sure that it will work or not… We will see later. :slight_smile:

I would like to mention that compiling ADAMS2AD using ADAMS 2010/64Bits will not work, and it will give some errors like “Unresolved external symbol”.

Also, I found the link you provided very useful… Thanks again.

Greetings
Rannam.

Hi

I just would like to add the following comment

There is no need to point to the mdi.bat, the following command will work: mdadams2010, just replace the old command adams08r1 with this one mdadams2010.

Greetings.

Hi Rannam.

Thanks for pointing out the new Adams 2010 command.

Regarding your other comment,

I know others have compiled Adams2AD on 64-bit Adams 2010 and 2011. It may require using a 64-bit Intel compiler, though. (And when I compiled for Adams 2011, I had to add an additional folder to my PATH variable because the IVF installation apparently missed something.)

I’m glad you seem to have a working DLL. :slight_smile:

Regards,
Bonnie

Dear Bonnie,

Now I’m facing another problem, and I can’t find out any possible solution, so I think you highly appreciated help is needed.

The ADAMS.dll was compiled successfully without any errors or warnings, as I’ve mentioned in my previous post.

I also used FAST-To-ADAMS pre-processor to generate ADAMS datasets for both the 5MW baseline wind turbine and the Test11 (1.5MW) included in FAST Certification test.
The next step is to run “ADAMS - command/ ru-user/ d:..\ADAMS.dll / d:..{BL5MW or Test11}_ADAMS.acf”
when I do like this the black screen (command line screen) just disappears in a matter of seconds. and I couldn’t find any log file which can give me more information.

I’ve tried it in other way, I’ve opened “ADAMS - AView” and imported the *.adm and *.acf files, the Wind Turbine was shown in the screen, however, when I run the simulation I got such error:

which means that ADAMS can’t see the user-defined library (ADAMS.dll) which is expected.

So, I’m wondering, if the ADAMS.dll was really compiled successfully, or I’m missing something here…!!!

I would like to mention that my IVF is 32 bits, and I’m using ADAMS 2010 (32bits). also, I’ve un- and re-installed ADAMS 2010 a few times in order to solve this problem, but it still the same.(IVF was installed before ADAMS).

Thanks in advance for your help.

If you are using the 5MW baseline turbine, you will have to compile the dll using the BladedDLLInterface.f90 file to use the proper control system (see the FAST User’s guide for information on that). The Test11 model does not require the BladedDLLInterface.f90 file. (So you will need 2 different adams dlls to run these two models.)

The Adams messages are probably written in a .msg file in the directory of the .acf file. However, if you want the window to stay open after an error occurs and/or the simulation ends, you can open a “normal” (non-Adams) command prompt (start/run/“cmd”) and call the Adams mdi from there:

MDAdams2010 ru-user d:\..\Adams.dll d:\..\ModelName_ADAMS.acf

If you want all the text from the screen saved in a file you can use this command:

MDAdams2010 ru-user d:\..\Adams.dll d:\..\ModelName_ADAMS.acf > MyOutputFileName.txt

I have seen these messages before, but I don’t immediately recall what the problem was. Could you post the screen shot that you got when you compiled the dll? Maybe that will help me remember. :slight_smile:

Dear Rannam,
Regarding to latest warnings that Bonnie mentioned as well.
WARNING: A user SFOSUB subroutine is required for SFORCE BL5MW.Generator_SF.
WARNING: A user VARSUB subroutine is required for VARIABLE BL5MW.CalcOuts_V.
WARNING: A user GFOSUB subroutine is required for GFORCE BL5MW.Bld1Sec01Aero_GF.
WARNING: A user SENSUB subroutine is required for SENSOR BL5MW.AeroDyn_S.
WARNING: A user REQSUB subroutine is required for REQUEST BL5MW.UserRequest_R.

I think these warnings is due to following action:
I think You run your model with ADAMS/View not Adams/Solver.
To run your model in Adams/View correctly you must define your dll and acf file to Adams/View first then run your model with Interactive controls.
To define your dll file: Setting>Solver>Executable>Solver Library
To define your acf file: simulate>simulation script>import acf
To run interactively: simulate> Interactive controls

Hope that helps,

Best regards,
Mehdi,

Thanks Mehdi for your comments.

I still can’t make ADAMS work. when I run the simulation from ADAMS/View, I get the following in the message window

The error is regarding the call of SYSARY. I’ce check this forum for similar problem, the only thing I found were on this link [url]Results comparison ADAMS and FAST - #10 by Jason.Jonkman] and this one [url]A2AD with MNF files / C++ Solver]. What I get from the comments is that SYSARY is the new documented function, which should work fine with the Fortran solver in ADAMS2010.

I Also include a copy of the output when compiling ADAMS2AD:

Again, I’m using:
1- Inter Visual Fortran Composer XE12.1 (32bits)
2- ADAMS 2010 (32Bits)
3- FAST_v70001a-bjj
4- A2AD_v130000a-bjj

Any help how to make ADAMS work is highly appreciated.

Greetings
Rannam.

Hi, Ranaam.

The error you mention just means that you do not have ARRAY/2 defined in the Adams dataset. ARRAY/2 is generated when you have specified blade gage nodes for output data in the FAST2ADAMS preprocessor (see FAST2ADAMSStatements.xls in the Adams2AD archive). This is mostly a nuisance error–the current version of the software tries to read the array before it knows that there aren’t any gages selected for output–and is something we will fix in upcoming releases of Adams2AD and FAST2Adams. Because the call to read ARRAY/2 occurs in a SYSARY call, the error also generates the next error message, “Errors found in call to SYSARY”. You can safely ignore those two error messages.

It looks like you have the software running. Did your simulation produce any results?

Hallo Bonnie,

Thanks again for your reply.

Apparently, every thing should be ok, HOWEVER, there is still a problem, and simulation with ADAMS is still not working.

I’m using the Baseline wind turbine defined in Test_11.fst, the 1.5MW turbine with the following configuration (Just for test purposes):

  • ADAMSPrep = 3 % Run Fast and generate ADAMS model
  • YCMode = 0 % No yaw control
  • PCMode = 0 % Disable Pitch control
  • VSContrl = 0 % Disable Variable speed control
  • GenModel = 1 % Simple Generator model
  • GenTiStr = True % Start generator after TimGenOn
  • TimGenOn = 0.0 % Turn on generator from the begining of simulation
  • NacYawF = 0.0
  • Initial collective pitch angle = 7.5 deg
  • Initial rotational speed (RotSpeed) = 0.0 rpm

I’m using a wind profile with mean speed of 8m/s at hub height, and with turbulence, this profile is generated using TurbSim.

Simulation using MATLAB/Simulink with the “OpenLoop.mdl” is working fine, and for example the change of rotor speed with the time is shown as in the attached file.

However, when this model is imported to ADAMS/View, and running the simulation, the rotor does not start to rotate. and the Rotor speed is still zero at the end of simulation.
So, I can’t figure-out where exactly to look in order to fix this problem.

Any Ideas!!!

Greetings
Rannam.

Dear Rannam,

It is hard to assess what is causing this problem in ADAMS without knowing more about what you are trying to do. Here are a few questions:

*Your settings indicate that you are applying the simple induction generator (SIG) model; however, the SIG inputs (SIG_SlPc, SIG_SySp, SIG_RtTq, SIG_PORt) are not defined in Test11. Have you set these input parameters? If so, to what?
Is the generator DOF enabled? (In FAST, setting GenDOF to True enables the generator DOF; the FAST-to-ADAMS preprocessor uses the GenDOF = True case to add a “DEACTIVATE/MOTION, ID = 3150” statement to the ADAMS control (.acf) file.)
*Does ADAMS output the same wind speeds that the equivelant FAST model outputs?

Best regards,

Dear Jason

Thank you very much for your answer,

Basically, what I’m trying to do is to get myself more familiar with simulating wind turbine with ADAMS, using FAST-to-ADAMS preprocessor. Also making sure that everything is working just fine, without any hidden problems.

In the test I’m provided in my previous post, I was trying to see how the wind turbine rotor will start to rotate. So I’ve disabled the Yaw DOF and stopped the pitch control, and the variable speed options, and I’ve used some dummy values for the generator (SIG) model. I might assume that these dummy values might be the problem, so after reading your answer, I’ve made more tests, and Again, I’ve got the same problem.

First I would like to mention that I’m somehow new to ADAMS, so I might missed something which is not so clear for me :slight_smile:

Here again what I’ve done with some results:

Step 1
I’ve used Test_11.fst, without any change. The model is exported to ADAMS, and the *.adm, and *.acf were created: following is the acf file

Step 2
I run ADAMS/View, start a new database, import the *.adm and the *.acf files, then from Settings->Solver->Executable I set the “Solver Library” to my ADAMS.dll, The other options are kept as default.

Step 3
From simulation control, I set the end time (20 seconds), steps (2000) then I run the simulation.

Step 4
When simulation ends, I read the *.plt file (ADAMS output) and *.out (FAST output) files into Matlab in order to compare the results.

Results
Wind Speeds
Regarding wind speeds, ADAMS and FAST deliver the same wind speed in x,y,z directions as shown in the following figure.

Rotor Speed, Blade Pitch 1 angle, Blade 1 root moments, there is difference between FAST and ADAMS, in ADAMS, Rotor speed is not changing at all, Also there is no blade pitch control, nor pitch failure as shown in the following figure.

Discussion
According to FAST User’s Guide, and according to Test_11 setting for PCMode ADAMS should call the user-defined pitch control routine PitchCntrl(). but it seems it is not the case, as the rotor keeps the same initial rotor speed defined by Test_11.fst (20 rpm), and there is no change in Blade 1 pitch angle.

I know there is something missing in what I’m doing which should be fixed in order to make the simulation in ADAMS works correctly, but it is not so clear for me what to do.

Your help is highly appreciated, and thanks in advance for your time.

Kind regards
Rannam Chaaban.

Dear Rannam,

Thank you for explaining your process in detail. Everything you explain makes sense. I, too, am confused why the pitch angle and rotor speed are staying constant in ADAMS. A couple more questions:

*What versions of FAST and A2AD are you running?
*When running ADAMS, does the following message get written to the screen, “Running with control option using data from:”? This message is automatically written when Criag Hansen’s sample pitch controller (the pitch controller used by Test11) is used. (You should be seeing this message when FAST is run.)

Best regards,

Dear Jason,

I’m using the following:
1- FAST_v70001a-bjj
2- A2AD_v130000a-bjj
3- MSC. ADAMS 2010 (32bits)

Regarding the mentioned message I can see it in FAST output but NOT in ADAMS messages…
Here is what I get when I run FAST

and here is what the message window in ADAMS shows

I should mention that ADAMSPrep = 3 in order to generate ADAMS datasets and then to run FAST, so basically I’ve the same WT configurations in both programs.

I hope I’ve provided all needed information

Greetings
Rannam.

Dear Rannam,

The controller message should show up near the start of the time-marching process in ADAMS. You didn’t show the portion of the ADAMS message window where the time advancement is shown. Does the controller message show up there?

Best regards,

Dear Jeason,

I’m not sure that I’ve understood exactly what you mean.
In ADAMS/View, in the message window, I’ve set the settings “Display messages only at or above severity level” to “Information”, After that, I’ve cleared the message window, then started the simulation. I’ve provided the contents of this window after the end of simulation.

If there something, or some other steps that I should do, please let me know in order to get the required information.

Regards.
Rannam.

Dear Rannam,

I don’t know much about running ADAMS/Solver from within ADAMS/View; I typically run ADAMS/Solver from the command prompt. Here is the time-marching portion of what is written to the command prompt window when I run Test11 from ADAMS:

    Simulation         Time         Cumulative    Cumulative     Integrator
       Time            Step         Iterations    Steps Taken      Order
    ___________      ___________    __________    ___________    __________
    5.75000E-03      2.50000E-04           0              0           1
    6.00000E-03      2.50000E-04           8              1           1
    2.00575E+00      5.00000E-03        1343            460           3

   Symbolic refactorization attempted at time = 2.3410.

   Generating the Jacobian matrix for the displacements and velocities.

   Generating the Jacobian matrix for the accelerations and forces.

   Generating the Jacobian matrix for the dynamics problem.
    4.00575E+00      5.00000E-03        2663            912           2

***********************************************
Running with control option using data from:
 Speed controller for ADAMS WindPACT 15A1001 model April, 2002.
***********************************************


   Symbolic refactorization attempted at time = 5.0057.

   Generating the Jacobian matrix for the displacements and velocities.

   Generating the Jacobian matrix for the accelerations and forces.

   Generating the Jacobian matrix for the dynamics problem.
    6.00575E+00      5.00000E-03        3894           1329           2
    8.00575E+00      5.00000E-03        5174           1757           2
    1.00058E+01      5.00000E-03        6378           2157           3
    1.20058E+01      5.00000E-03        7492           2557           3
    1.40058E+01      5.00000E-03        8590           2957           3
    1.60058E+01      5.00000E-03        9779           3368           3
    1.80057E+01      5.00000E-03       10877           3779           3

   Enter Command:

   STOP

  
      Adams/Solver execution terminated by subprogram A3TERM
  

   CPU time used = 16.156 seconds

When you run from the command prompt, do you see the same controller message?

Best regards,

Dear Jason,

It seems that I’m having a problem when running the ADAMS/Solver from the command line.
here is what I did and what I got.

1- run “ADAMS - Commnad
2- choose “ru-user
3- User DLL: “\ADAMS2010.dll
4- Adams command file: “\Test11_ADAMS.acf
5- The command window closes quickly, and I could not see any error message on it. Also, I’ve check my files, I couldn’t find a file which might contain the error messages.

Any ideas…!

Greetings
Rannam.

Dear Jason,

I’ve reinstalled ADAMS, and tried the same steps mentioned above, and here is my output.

D:\BL1M5W\mdi

     +------------------------------------------------------+
     |        | MD Adams 2010     Selection Menu |          |
     |        ------------------------------------          |
     |Action                                  Selection Code|
     |------                                  --------------|
     |                                                      |
     |Create Adams/Solver with                              |
     |   Adams User-DLL                          cr-user    |
     |                                                      |
     |Run Adams/Solver with                                 |
     |   Standard Adams executable               ru-standard|
     |   User executable                         ru-user    |
     |                                                      |
     |Pre- or Post-process with                             |
     |   Adams/View                              aview      |
     |   Adams/Car                               acar       |
     |   Adams/Driveline                         adriveline |
     |   Adams/PostProcessor                     appt       |
     |   Adams/Insight                           ainsight   |
     |   Adams/Flex Toolkit                      flextk     |
     |   Adams/Durability Toolkit                durtk      |
     |   MSC Registry Editor                     redit      |
     |   MSC Registry Shell Tool                 rtool      |
     |   Custom Memory Model (uconfg_user)       cmm        |
     +------------------------------------------------------+

     Enter your selection code or EXIT: ru-user

 Enter name of your Adams/Solver User-DLL, or EXIT:
ADAMS2010.dll

 Enter the name of the Adams command file or EXIT (<CR>=none):
Test11_ADAMS.acf






   *********************************************************************
   *                                                                   *
   *                      MSC.Software Corporation                     *
   *                                                                   *
   *                             A d a m s                             *
   *                                                                   *
   *          Automatic Dynamic Analysis of Mechanical Systems         *
   *                                                                   *
   *                      A d a m s / S o l v e r                      *
   *                       (Build: 2010.1.19.37)                       *
   *                                                                   *
   *      2012-02-03 10:59:28              Version MD 2010             *
   *                                                                   *
   *      Customer Entitlement ID:         245K3RD9-9V2E88GX           *
   *                                                                   *
   *********************************************************************


   Enter ADAMS model file name or Carriage Return or ? (or STOP):

   Test11_ADAMS

   Enter ADAMS output file name or ? (default is same as input):

   Test11_ADAMS

     Adams model file .. Test11_ADAMS.adm


   Default file names for output files

     Tabular output file:
     Test11_ADAMS.out

     Diagnostic file    :
     Test11_ADAMS.msg

     Message Database file    :
     Test11_ADAMS.mdb

     Graphics file      :
     Test11_ADAMS.gra

     Request file       :
     Test11_ADAMS.req

     Results file       :
     Test11_ADAMS.res


   Input Phase - Reading in Model


   ***********************************************************
   Adams/Solver dataset Title:
   !ADAMS/View model name: FAST certification Test #11: WindPACT 1.5 MW Baseline wi
   ***********************************************************

   Reading of model complete.


   Input Phase - Populating Solver database


 ---- WARNING ----
   IP data specified for PART Test11_ADAMS.Nacelle_P is not physically
   meaningful, since it does not satisfy the requirement
   that Ixx + Iyy must be greater than or equal to Izz.
   The moments of inertia about the Center of Mass are:
   Ixx = 9.9990E-04, Iyy = 9.9990E-04, Izz = 48056.


 ---- WARNING ----
   IP data specified for PART Test11_ADAMS.Generator_P is not physically
   meaningful, since it does not satisfy the requirement
   that Iyy + Izz must be greater than or equal to Ixx.
   The moments of inertia about the Center of Mass are:
   Ixx = 4.10384E+05, Iyy = 9.9990E-04, Izz = 9.9990E-04


 ---- WARNING ----
   IP data specified for PART Test11_ADAMS.Hub_P is not physically
   meaningful, since it does not satisfy the requirement
   that Iyy + Izz must be greater than or equal to Ixx.
   The moments of inertia about the Center of Mass are:
   Ixx = 34600., Iyy = 9.9990E-04, Izz = 9.9990E-04


   Input Phase Complete.


   CPU time is 6.24004E-02 seconds.
forrtl: severe (104): incorrect RECL= specifier value for connected file, unit 6, file CONOUT$
Image              PC        Routine            Line        Source
libifcoremd.dll    003A3E5E  Unknown               Unknown  Unknown

Stack trace terminated abnormally.
Deleting D:\BL1M5W\adamsctl_5984.bat
     1 file deleted              4,096 bytes freed
Deleting C:\Users\Chaaban\AppData\Local\Temp\asize_5984.txt
     1 file deleted
Deleting C:\Users\Chaaban\AppData\Local\Temp\ssize_5984.txt
     1 file deleted
Deleting C:\Users\Chaaban\AppData\Local\Temp\null_5984
     1 file deleted              4,096 bytes freed

Now I get an error message “forrtl: severe (104): incorrect RECL= specifier value for connected file, unit 6, file CONOUT$” which I’ve no idea about it… :slight_smile:

Hope now the problem is more clear.
Regards
Rannam