Adams-Aerodyn Interface

Hello there,

I am currently modeling a teetering rotor in ADAMS and AeroDyn, but I am having trouble to get the interface working.
I tried to follow the instructions provided by the document A2AD, but my ADAMS skills not that good yet…

Is there a document explain how to do this in a manner understandable for complete idiots ? :unamused:

thanks in advance!

Lysander

Dear Lysander,

It is hard to offer help without knowing your specific problem. Also, you should contact MSC Technical Support for ADAMS-specific questions. (We can only offer help on AeroDyn and A2AD.)

How are you creating your ADAMS model of this teetering rotor?–By hand or with some ADAMS preprocessor tool? If you are not already doing so, I suggest you use FAST to create your ADAMS model. (FAST is not only an aeroelastic tool for modeling wind turbines–including turbines with 2-bladed teetering rotors–but it also contains a preprocessor for generating ADAMS models that are compatible with AeoDyn and A2AD. More information about FAST–including its User’s Guide, executable, source code, and sample models–can be found from: wind.nrel.gov/designcodes/simulators/fast/.

Best regards,

Dear Mr Jonkman,

Thank you very much for your quick reaction.

I initially created an AeroDyn file and tested it with Yawdyn, which provided me with good results.
I have now created the ADAMS model, following the marker-naming instructions provided in the A2AD guideline.

So in essence, I have both the AeroDyn file as well as the ADAMS model ready for use. I just don’t know how to link them…

But if I understood correctly, you’re suggesting that I can better ask these type of questions at the MSC forum, am I correct?

Lysander

Dear Lysander,

The MSC forum should be your first source for asking ADAMS-specific questions. They probably can’t help you with AeroDyn or A2AD, however. In my previous post I suggested the MSC forum because I wasn’t sure what your problem was (i.e., if you had a problem with ADAMS or a problem with AeroDyn or A2AD). It sounds like your problem is with A2AD.

In order to run AeroDyn within ADAMS, you must compile the AeroDyn and A2AD source files into a DLL and link them to ADAMS using ADAMS’ cr-user command. You then run ADAMS with the ru-user command. Have you succeeded in compiling the DLL using the cr-user command? If not, what problem did you run into? If so, what run-time error does it give you when you run ADAMS with the ru-user command?

Best regards,

Dear Jason,
I think I have understood the working of the cr-user command, however (as you correctly assumed) I did not manage to compile the source file and create the dll file.
I have a fortran compiler (compaq visual fortran), so that is not the problem.
Should I compile the f90 files in the fortran command prompt? and should my aerodyn.ipt file be in the same folder as the f90 files? or the adams file?

again, thank your time and your help.

Regards,

Lysander

Dear Lysander,

The A2AD source code contains DOS command script called CompileLinkA2AD.bat. This script can be used to compile the AeroDyn and A2AD source files into a DLL and link them to ADAMS. The script works without modification for FAST-generated ADAMS models. But the script should be easily modified to work with your own ADAMS models by simply eliminating all the FAST-related stuff. The script accepts as input the location of the AeroDyn and A2AD source files. The AeroDyn input (.ipt) file is not needed at compile time–it is needed only at run time.

I hope that helps!

Best regards,

dear Jason,

Thanks for the tip, I got it working (more or less)

the final problem I’m running into, is the fact that I can’t set Adams to use compaq visual fortran, instead of Intel fortran.

in the 2005 version of adams this could easily be modified in the registry editor.
However I have Adams2008r3, and I can’t preform the same action.

Is this a standard problem?

Lysander

Dear Lysander,

MSC.ADAMS 2008 requires the Intel Visual Fortran (IVF) compiler and no longer accepts the Compaq Visual Fortran (CVF) compiler.

To date, we at NREL have been compiling FAST, AeroDyn, and A2AD (with MSC.ADAMS 2005R2) with the CVF compiler, but we plan to upgrade to the IVF compiler for the next official releases. I know that when we tried to compile FAST with IVF a few of years ago (with IVF v8.x), it took about an order of magnitude longer to compile, FAST ran slower in the end, and the results were different. This is the reason why it has taken us a while to switch over. But recently, we have been working with other users who have been using newer versions of IVF (v10.x and newer) and they have worked through the issues involved. Some of the problems were related to bugs in IVF v8.x that are now fixed. Beyond that, they have informed me that to compile FAST, AeroDyn, and A2AD with IVF, you must do the following different from with CVF:

(1) Use Modifort.f90 and Sysifort.f90 files (available from wind.nrel.gov/public/jjonkman/FAST/IVF/) to replace the ModCVF.f90 and SysCVF.f90 files supplied with FAST.
(2) Change the precision from single (ReKi = 4, /real-size:32) to double (ReKi = 8, /real-size:64). That is, in AeroMods.f90/Precision() change ReKi = 8 and use compile option /real_size:64.
(3) Enable Qsave in IVF. This compile option is required because variables are not SAVEd by default in IVF (but are in CVF).
(4) In FAST.f90/Solver(), change the ALLOCATE( ZK* ) statements to “IF( .NOT. ALLOCATED( ZK* ) ) ALLOCATE( ZK* )” for all ZK* variables. This change is required because IVF generates (but CVF doesn’t generate) an error if you ALLOCATE a variable that is already ALLOCATED.
(5) In AeroSubs.f90/ADIn(), split the “IF ((IndPrint > 0) .AND. (LINE(IndPrint-2:IndPrint-1) /= “NO”)) THEN” statement into two by moving the 2nd condition into a separate IF statement. This change is required because IVF doesn’t (but CVF does) use “shortcutting”.

Steps (1) and (4) are only necessary when compiling with FAST source code.

I have not used the Modifort.f90 and Sysifort.f90 files myself yet, but hopefully they will be of use to you. I plan to incorporate these (and other) changes into the next release of FAST, AeroDyn, and A2AD, which should come out later this year.

Best regards,

Hello Jason,

Thank you for the tip.
I thankfully found a version of Adams 2005, so the fortran problem is solved!

thanks for all the help

Lysander

Hello,

I’m trying to run the CompileLinkA2AD.bat , but I find several errors, like #6404, #6848, #8095, #6275 about subrutines and functions. But what I think that is the real important problem is other about link wth ADAMS becouse the other errors pass and the file cotinues compiling it.

In the CompilelinkA2AD when I want to link wit ADAMS, I write:

[i]REM …
REM … link with Adams …
REM …

ECHO Linking ADAMS2AD and AeroDyn routines with ADAMS 2012r2:
SET DLLName=%ROOT_NAME%12r2
IF /I “%1”==“DLL” SET DLLName=%DLLName%_forBladedDLL

CALL adams12r2 cr-user n %ROOT_NAME%.obj %ROOT_NAME%f.obj -n %DLLName%.dll exit < NewLine.txt

GOTO end[/i]

But the computer displays:


Linking ADAMS2AD and AeroDyn routines with ADAMS 2012r2:
“adams12r2” no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

I don’t know what is my error. I can´t create the dll.
Somebody could help me, please?

Thanks, Lucia.

Hi, Lucia.

It sounds like you still have a couple of problems. The CompileLinkA2AD.bat script doesn’t end if it encounters errors in the compiling stage so those previous errors are likely a problem, too. But without looking them up, I don’t know what the error numbers you mention correspond to.

I’m not sure you will be able to get Adams2012r2 to work with A2AD. Adams has made some significant changes recently which may make it incompatible with A2AD.

Nevertheless, the line that says: CALL adams08r1 cr-user n %ROOT_NAME%.obj %ROOT_NAME%f.obj -n %DLLName%.dll exit < NewLine.txt has to be changed so that it calls Adams Solver. Earlier versions of Adams came with a batch script that allowed you to type “Adams08r1” at the command line to call the solver. However, I think they’ve removed the batch script in newer versions. Instead you will have to find out how to envoke Adams Solver from the command line. An easy way to find this is to open the properties box on the shortcut to Adams Solver under the Windows Start Menu. (Start → All Programs → MSC.Software → Adams {version} → ASolver then right click on the “Adams - Solver” shortcut and click “Properties”). You can copy the target listed there and paste it into the CompileLinkA2AD.bat file, replacing the “adams08r1” above. For example, CALL C:\MSC.Software\Adams\2008r1\common\mdi.bat ru-st -n cr-user n %ROOT_NAME%.obj %ROOT_NAME%f.obj -n %DLLName%.dll exit < NewLine.txt