[MBDyn-users] Problem about External Force Module

MBDyn users list mbdyn-users at mbdyn.org
Wed Oct 14 12:25:11 CEST 2020


Hi Jun,

the message that you get simply tells you that something was wrong with 
the communication between the external solver and MBDyn.
If no error messages regarding the MBDyn side of the simulation are 
given (typically indicating no convergence) are given, then you are 
pretty sure that the problem occurs during the communication and not in 
the calculation of the kinematics to be exchanged.

What Luis suggest is definitely a good idea: if you can provide a 
minimal working example of your model that would help a lot in helping 
you debug it.

Cheers,
Andrea

On 14/10/20 06:57, MBDyn users list wrote:
> Hi Jun,
> I have no more clues as to what you could try because I have limited 
> experience with coupling MBDyn.
> If you post a working example, code for both sides of the coupling, 
> you might get lucky and tickle the curiosity of someone with the 
> appropriate experience who will try it and give you feedback.
> Kind regards,
> -Louis
>
> On 08/09/20 02:09, MBDyn users list wrote:
>> Hi Louis,
>>
>> I have tried setting the external forces n_f to zero but it still 
>> returned the same result “Abort” at the first time step when calling 
>> recv().
>> ...
>>>>>>>> cmd to peer: 2 (REGULAR_DATA)
>>>>>>>> cmd from peer: 5 (ABORT)
>>>>>>>> got ABORT from peer
>>>>>>>> Exiting StructureSolver
>> ...
>>
>>>>>> Iteration(0) 103.805
>>>>>> SolErr 0
>>>>>> UseSocket::~UseSocket: shutdown: socket=15 status=0 time=Tue Sep 
>>>>>>  1 15:18:20 2020
>>>>>>
>>>>>> UseSocket::~UseSocket: close: socket=15 status=0 time=Tue Sep  1 
>>>>>> 15:18:20 2020
>>>>>>
>>>>>> An error occurred during the execution of MBDyn; aborting…
>> ...
>>
>> Does it mean MBDyn didn’t succeed calculating the displacements and 
>> sending  them to the peer?
>>
>> The code’s structure are as follows:
>>
>> host = "";
>> port = 0;
>> timeout = -1;# forever
>> verbose = 1;
>> data_and_next = 1;
>> refnode = 0;# no reference node
>> nodes = 21;# number of nodes
>> labels = 0;
>> #rot = 0x100;# orientation vector
>> # rot = 0x200;# orientation matrix
>> rot = 0x400;# Euler 123
>> accels = 0;
>> nodal = mbcNodal(path, host, port, timeout, verbose, data_and_next, 
>> refnode, nodes, labels, rot, accels);
>> nodal.negotiate()
>> nodal.n_f = numpy.zeros(numpy.size(n_f))
>> nodal.recv() #send the initial displacements to peer
>>
>> while 1:
>> nodal.n_f = numpy.zeros(numpy.size(n_f))
>> if (nodal.send(False)):
>> break
>> if (nodal.recv()):
>> *break **#return -1 and abort at this step*
>> if (nodal.send(True)):
>> break
>> if (nodal.recv()):
>> break
>>
>>
>>
>> Jun
>>
>>
>>> On Sep 3, 2020, at 4:12 AM, MBDyn users list <mbdyn-users at mbdyn.org 
>>> <mailto:mbdyn-users at mbdyn.org>> wrote:
>>>
>>> You could try setting to zero or a small number and see what happens.
>>>
>>> On 02.09.20 23:12, MBDyn users list wrote:
>>>> Hi Louis,
>>>>
>>>> Thanks for your attention. What does “damped” mean? Should I set 
>>>> external force zero for the first time steps or Is there any module 
>>>> in MBDyn to apply a damped external force?
>>>>
>>>> Jun
>>>>
>>>>> On Sep 2, 2020, at 2:38 AM, MBDyn users list 
>>>>> <mbdyn-users at mbdyn.org <mailto:mbdyn-users at mbdyn.org>> wrote:
>>>>>
>>>>> Hi Jun,
>>>>>
>>>>> can you try starting with a "damped" external force for the first 
>>>>> few timesteps?
>>>>>
>>>>> Kind regards,
>>>>>
>>>>>
>>>>> -Louis
>>>>>
>>>>>
>>>>> On 02.09.20 00:39, MBDyn users list wrote:
>>>>>> Hi Runsen,
>>>>>>
>>>>>> Thanks for your advice. I ran the file without the external force 
>>>>>> and MBDyn worked normally. But when I ran the file with the 
>>>>>> external force module with the command “mbdyn beam.mbd -P -P”, it 
>>>>>> shows the following error information:
>>>>>>>>>>>> Eq       274:          0 AxialRotationJoint(11): orientation 
>>>>>> constraint gx
>>>>>> Eq       275:          0 AxialRotationJoint(11): orientation 
>>>>>> constraint gy
>>>>>> Eq       276:          0 AxialRotationJoint(11): angular velocity 
>>>>>> constraint wz
>>>>>> Iteration(0) 103.805
>>>>>> SolErr 0
>>>>>> UseSocket::~UseSocket: shutdown: socket=15 status=0 time=Tue Sep 
>>>>>>  1 15:18:20 2020
>>>>>>
>>>>>> UseSocket::~UseSocket: close: socket=15 status=0 time=Tue Sep  1 
>>>>>> 15:18:20 2020
>>>>>>
>>>>>> An error occurred during the execution of MBDyn; aborting...
>>>>>>
>>>>>>
>>>>>> I don’t know what the hints mean…
>>>>>>
>>>>>> I checked the codes and found that MBDyn ran thepython 
>>>>>> API function *mbcNodal.nodal.send(False)* normally (return 0) but 
>>>>>> stopped when it ran the recv() function at the first time step:
>>>>>>
>>>>>> mbcNodal.nodal.recv()  #####receive new kenimatics from peer and 
>>>>>> external solver can touch it
>>>>>>
>>>>>> This function returns -1.
>>>>>>
>>>>>> Does “shutdown" mean the socket failed and the kinematics are not 
>>>>>> calculated and sent from the peer?
>>>>>>
>>>>>> Jun
>>>>>>
>>>>>>> On Sep 1, 2020, at 10:48 AM, MBDyn users list 
>>>>>>> <mbdyn-users at mbdyn.org <mailto:mbdyn-users at mbdyn.org>> wrote:
>>>>>>>
>>>>>>> Dear Jun,
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am also working on co-simulation between MBDyn and other 
>>>>>>> softwares recently, so I am very interested in your questions.
>>>>>>>
>>>>>>> I check the "beam.mbd" file, but I cannot find any problem.
>>>>>>>
>>>>>>> From the file "log.mbdyn", it seems that the problem is from 
>>>>>>> MBDyn side, and MBDyn stops at the first iteration of the 
>>>>>>> derivative process without any hint. So, maybe you can run the 
>>>>>>> file without the "external structure" first to see if MBDyn 
>>>>>>> works normally, and also try to carry out the command "mbdyn 
>>>>>>> beam.mbd -P -P" to get more hints from MBDyn.
>>>>>>>
>>>>>>> Maybe others could give you some detailed suggestions.
>>>>>>>
>>>>>>> Best regards,
>>>>>>>
>>>>>>> Runsen.
>>>>>>>
>>>>>>>
>>>>>>> On 01/09/20 06:40, MBDyn users list wrote:
>>>>>>>> Dear all,
>>>>>>>>
>>>>>>>> Sorry to disturb you. I also noticed that the solver sometimes 
>>>>>>>> ran well during the same case and the API showed that:
>>>>>>>>
>>>>>>>> cmd to peer: 7 (NEGOTIATION)
>>>>>>>> cmd from peer: 8 (OK)
>>>>>>>> cmd from peer: 2 (REGULAR_DATA)
>>>>>>>> ...
>>>>>>>> (During one time step)
>>>>>>>> cmd to peer: 2 (REGULAR_DATA)
>>>>>>>> cmd from peer: 2 (REGULAR_DATA)
>>>>>>>> ...
>>>>>>>>
>>>>>>>> cmd to peer: 6 (REGULAR_DATA_AND_GOTO_NEXT_STEP)
>>>>>>>> cmd from peer: 2 (REGULAR_DATA)
>>>>>>>> ...
>>>>>>>> (move to next time step)
>>>>>>>>
>>>>>>>> I don't know why it gave two different 
>>>>>>>> results(REGULAR_DATA_AND_GOTO_NEXT_STEP and ABORT) in the same 
>>>>>>>> case. Does anyone know What will cause the solver abort instead 
>>>>>>>> of going to next step?
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Jun
>>>>>>>>
>>>>>>>>
>>>>>>>> ----- 原始邮件 -----
>>>>>>>> 发件人: "mbdyn-users" <mbdyn-users at mbdyn.org 
>>>>>>>> <mailto:mbdyn-users at mbdyn.org>>
>>>>>>>> 收件人: "mbdyn-users" <mbdyn-users at mbdyn.org 
>>>>>>>> <mailto:mbdyn-users at mbdyn.org>>
>>>>>>>> 发送时间: 星期日, 2020年 8 月 30日 下午 9:52:17
>>>>>>>> 主题: [MBDyn-users] Problem about External Force Module
>>>>>>>>
>>>>>>>> Dear all,
>>>>>>>>
>>>>>>>> I met a problem when I used the external structural force 
>>>>>>>> module with python API.
>>>>>>>>
>>>>>>>> (1)The solver stopped at the first time step t = 0.001s and the 
>>>>>>>> API showed the following information:
>>>>>>>> cmd to peer: 7 (NEGOTIATION)
>>>>>>>> cmd from peer: 8 (OK)
>>>>>>>> initialmbdyn5
>>>>>>>> cmd from peer: 2 (REGULAR_DATA)
>>>>>>>> cmd to peer: 2 (REGULAR_DATA)
>>>>>>>> cmd from peer: 5 (ABORT)
>>>>>>>> got ABORT from peer
>>>>>>>> Exiting StructureSolver
>>>>>>>>
>>>>>>>> I think the right output should be REGULAR_DATA_AND_NEXT_STEP. 
>>>>>>>> Am I right?
>>>>>>>>
>>>>>>>>
>>>>>>>> (2)The log file showed that
>>>>>>>> ...
>>>>>>>> Eq       273:                    0 AxialRotationJoint(11): 
>>>>>>>> position constraint Pz
>>>>>>>> Eq       274:                    0 AxialRotationJoint(11): 
>>>>>>>> orientation constraint gx
>>>>>>>> Eq       275:                    0 AxialRotationJoint(11): 
>>>>>>>> orientation constraint gy
>>>>>>>> Eq       276:                    0 AxialRotationJoint(11): 
>>>>>>>> angular velocity constraint wz
>>>>>>>> Iteration(0) 103.805
>>>>>>>> SolErr 0
>>>>>>>> An error occurred during the execution of MBDyn; aborting...
>>>>>>>>
>>>>>>>> There was no hints about this error and I don't know where the 
>>>>>>>> error came from. Is it related with convergency settings? Can 
>>>>>>>> anybody help me? Attached is the cantilever model and complete 
>>>>>>>> log files. Thanks for your attention!
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>>
>>>>>>>> Jun
>>>>>>>> _______________________________________________
>>>>>>>> MBDyn-users mailing list
>>>>>>>> MBDyn-users at mbdyn.org <mailto:MBDyn-users at mbdyn.org>
>>>>>>>> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users
>>>>>>>> _______________________________________________
>>>>>>>> MBDyn-users mailing list
>>>>>>>> MBDyn-users at mbdyn.org
>>>>>>>> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> MBDyn-users mailing list
>>>>>>> MBDyn-users at mbdyn.org <mailto:MBDyn-users at mbdyn.org>
>>>>>>> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> MBDyn-users mailing list
>>>>>> MBDyn-users at mbdyn.org
>>>>>> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users
>>>>>
>>>>> -- 
>>>>> Dr.-Ing. Louis Gagnon, Ph.D.
>>>>> Humboldt Postdoctoral Research Fellow
>>>>> Institut für Aerodynamik und Gasdynamik
>>>>> Universität Stuttgart
>>>>> Pfaffenwaldring 21 (Rm 0.011 ), 70569, Stuttgart
>>>>> GERMANY
>>>>> +49 711 685 64278
>>>>> http://louisgagnon.com/research/
>>>>> gagnon at iag.uni-stuttgart.de
>>>>> _______________________________________________
>>>>> MBDyn-users mailing list
>>>>> MBDyn-users at mbdyn.org <mailto:MBDyn-users at mbdyn.org>
>>>>> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users
>>>>
>>>>
>>>> _______________________________________________
>>>> MBDyn-users mailing list
>>>> MBDyn-users at mbdyn.org
>>>> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users
>>>
>>> -- 
>>> Dr.-Ing. Louis Gagnon, Ph.D.
>>> Humboldt Postdoctoral Research Fellow
>>> Institut für Aerodynamik und Gasdynamik
>>> Universität Stuttgart
>>> Pfaffenwaldring 21 (Rm 0.011 ), 70569, Stuttgart
>>> GERMANY
>>> +49 711 685 64278
>>> http://louisgagnon.com/research/
>>> gagnon at iag.uni-stuttgart.de
>>> _______________________________________________
>>> MBDyn-users mailing list
>>> MBDyn-users at mbdyn.org <mailto:MBDyn-users at mbdyn.org>
>>> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users
>>
>>
>> _______________________________________________
>> MBDyn-users mailing list
>> MBDyn-users at mbdyn.org
>> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users
>
> -- 
> Dr.-Ing. Louis Gagnon, Ph.D.
> Humboldt Postdoctoral Research Fellow
> Institut für Aerodynamik und Gasdynamik
> Universität Stuttgart
> Pfaffenwaldring 21 (Rm 0.011 ), 70569, Stuttgart
> GERMANY
> +49 711 685 64278
> http://louisgagnon.com/research/
> gagnon at iag.uni-stuttgart.de
>
> _______________________________________________
> MBDyn-users mailing list
> MBDyn-users at mbdyn.org
> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users

-- 
---
Andrea Zanoni
Aerospace Science and Technology Department
Politecnico di Milano
https://github.com/zanoni-mbdyn
https://www.mbdyn.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mbdyn.org/pipermail/mbdyn-users/attachments/20201014/0b435d82/attachment-0001.html>


More information about the MBDyn-users mailing list