[MBDyn-users] How to change the aerodynamic output ?

masarati at aero.polimi.it masarati at aero.polimi.it
Mon Mar 22 14:26:47 CET 2010


> Hello MBDyn-team,
>
> I'd like to know how to change the aerodynamic output from the default
> setting "Coefficients at Gauss points" to "Node" giving nodal aerodyn.
> forces & couples.

Hi, Patrick.

The syntax is pretty inconsistent with respect to other optional features,
so I'll probably change it (preserving backward compatibility as much as
possible).

In practice, you need to add an optional field at the very end of an
aerodynamic element specification.  Something like

        aerodynamic body: 1, 1,
                reference, node, null,
                reference, 3, eye,
                S,                # span
                const, C,         # chord
                const, 0.,        # 25% chord
                const, -.5*C,     # 75% chord
                const, 0.,        # twist
                3,                # integration points
                c81, NACA0012,
                { std , gauss , node } ;

This has to be after everything, including the explicit output activation
(e.g.)

        aerodynamic body: 1, 1,
                reference, node, null,
                reference, 3, eye,
                S,                # span
                const, C,         # chord
                const, 0.,        # 25% chord
                const, -.5*C,     # 75% chord
                const, 0.,        # twist
                3,                # integration points
                c81, NACA0012,
                output, yes,
                { std , gauss , node } ;

> The input-manual states in chapter 8.1.1 about the aerodynamic elements:
> "...Three different formats are available; the format can be selected only
> at compile time, so it must be the same for all the elements. Note:
> eventually the format will freeze; if all the output formats are be
> maintained, they will be made selectable at run-time, on a per-element
> basis."
>
> Unfortunately it is not mentioned if it is already run-time selectable
> AND/OR  how or where to set the switch in the code at compile-time.
> Browsing the source code in  /mbdyn/aero/  I found in aeroelem.cc and
> aeroelem.h various definitions of binary constants (like: AEROD_OUT_STD,
> AEROD_OUT_PGAUSS,  AEROD_OUT_NODE ) and keyword-checks for the parser.
>
> What is unclear to me:
> It looks like MBDyn is already capable of switching the aero-output at
> run-time but I found no way to make the parser accept my output
> statements: It always complies about invalid output modes after the line
> "jacobian, yes" .
> The only thing that worked after the jacobian statement was "output, yes"
> or "output, no".
>
> Reading the code in aeroelement.cc I can see in function
> ReadAerodynamicBeam(...) that after having read the aerodata and an
> optional "jacobian,yes" a function
> ReadOptionalAerodynamicCustomOutput(...) is called which honours the
> (optional) key combination "custom"+"output" invoking
> ReadAerodynamicCustomOutput(...) which looks for one of the keywords
> ["position"|"orientation"|"velocity"|"velocity"|"angular"+"velocity"|"configuration"|"force"|"moment"|"forces"|"all"].
> The next line in ReadArodynamicBeam() is
>    flag fOut = pDM->fReadOutput(HP, Elem::AERODYNAMIC);
> calling function DataManager::fReadOutput(...) reading an optional
> "output" followed by ["yes"|"no"|"default"].
> Then in ReadArodynamicBeam() subsepuently checks for one of the keywords
> ["std"|"gauss"|"node"] which for my understanding should be the desired
> switch for changing the aero output.
>
> So resuming the above the definition of an aerobeam element could have the
> last 3 optional lines as follows:
>
>     [ jacobian , { yes | no | <bool> } , ]
>     [ custom output , { position | orientation | velocity | angular
> velocity | configuration | force | moment | forces | all } ]
>     [ output , {yes | no | default }  [ , { std | gauss | node  } ] ]
>
> Is this code  interpretation correct ?

Not exactly.  Right now, it's more of

    [ , jacobian ,
         { yes | no | <bool> } ]
    [ , custom output ,
         { position | orientation | velocity | angular velocity |
           configuration | force | moment | forces | all } ]
    [ , output ,
         {yes | no | default } ]
    [ , { std | gauss | node } ]

namely, the last of 4 optional fields may exist even without the last but
one.  As I said, this looks pretty inconsistent; the last field needs a
keyword, something like

    [ , output style,
        { std | gauss | node } ]

Also, a way to change output style for all elements in the "control data"
block would be of help.  I'll work at that.

> Would this change of aero-output affect both destination files, i.e. the
> ascii output in *.aer and the binary *.nc file (assumed that MBDyn(>=
> 1.3.13) was compiled with NetCDF support and "output: netcdf;" was given
> in the model) ?

No.  The NetCDF output consists in what is described here
<http://www.aero.polimi.it/~masarati/MBDyn-input/mbdyn-input-1.3.13/node65.html#SECTION001314100000000000000>
regardless of the output style.  Suggestions are welcome.

Cheers, p.



More information about the MBDyn-users mailing list