[MBDyn-users] Coupling of MBDyn with an external code using a variable timestep (recomputed at each temporal iteration)

Louis Gagnon louis.gagnon at polimi.it
Fri Jan 23 15:58:47 CET 2015


Dear Yoann,

Someone else will likely be able to answer you more in detail, but what 
I can tell you about variable timesteps is this:
1. you can impose it from the c++ code or from some variable you 
determine in your script using this call (taken from the wheel4 module 
"axle" example file)
strategy: change, string, "dtMax"; ## private data
2. you can find how to set a variable dtMax within the source code by 
looking at the "dGetPrivData" section of the module-wheel4.cc file in 
the modules folder of the MBDyn source code.

Hope this can help you move on,

Best regards,


-Louis



On 23/01/2015 12:46, Yoann Robert wrote:
> Dear developers and users of MBDyn,
>
>
> A colleague of mine has already coded a tool coupling MBDyn and the 
> CFD code of our team. His simulations were launched with a constant 
> timestep. In my case, the physics of the problem forces me to use a 
> variable timestep, depending on the Courant number, and which is 
> recomputed at each temporal iteration in the CFD code. So my CFD code 
> must impose the timestep value to MBDyn.
> From this, several questions comes to mind.
>
> 1) In the current version of MBDyn, is this possible to do such a 
> coupling?
> 2) If this is not possible, is it planned in the next versions? How soon?
> 3) If it is not the case, are the modifications of the source code of 
> MBDyn quite easy to do by myself? And could you tell me in which files 
> or functions this modifications would take place?
>
>
>
>
> EXTRA QUESTION:
>
> This question is about something less important but it would allow me 
> to lighten my input files, especially the drives in my joint elements.
> I browsed the documentation and I learned we can define some "plugin 
> variables" from the nodes or from the elements, using directly the 
> data accessible through the node/element in question, such as
>
> set: integer NODENAME = 1000;
> # the node must exist
> set: [node,VARNAME,NODENAME,abstract,string="xP"];
>
> or
>
> set: integer ELEMNAME = 1000;
> # the joint must exist
> set: [element,VARNAME,ELEMNAME,joint,string="Fz"];
>
> Unfortunately, it does not seem to me that the definition of more 
> complex time-dependent variables is allowed. For instance, supposing 
> that the three following constants are defined, such a definition is 
> not possible (or a least not in this way):
>
> set: integer NODENAME = 1000;
> # the node must exist
> set: 
> [node,VARNAME,NODENAME,abstract,string="xP*const_length*const_time*const_mass"];
>
> It does not seem more likely that a definition of a time-dependent 
> variable also depending on data from multiple nodes and/or elements is 
> a possibility.
>
> Did I miss something or is it the case in the current state of the 
> code ? I know I may be too greedy... :-)
>
>
>
>
>
> Thanks and Regards,
>
>
> Yoann Robert
>
> _______________________________________________
> MBDyn-users mailing list
> MBDyn-users at mbdyn.org
> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users

-- 
Louis Gagnon, Ph.D.
Dipartimento di Scienze e Tecnologie Aerospaziali
Politecnico di Milano



More information about the MBDyn-users mailing list