Hello Mohammad,

In the single wheel test demo for FSI, the longitudinal direction is global 
X, the lateral direction is global Y, the wheel's motion is restricted in Y 
direction, while the X direction has a prescribed motor function. 

When you connect bodies with links, be careful with how you define the 
degree of freedom of the constraint. Specifically, for prismatic joint, it 
allows translation along the Z axis. For instance in this line of your code,

prismatic1->Initialize(ground, chassis, ChCoordsys<>(chassis->GetPos(), 
Q_from_AngX(CH_C_PI_2)));

The joint frame is aligned with Q_from_AngX(Ch_C_PI_2), which rotates 90 
degrees around global X, since the ground is fixed, the chassis can move 
freely in the global Z direction, but not X or Y direction. However, the 
actuator is applying a motion in X direction, but restricting motion in Y 
and Z. That's why the screw is not moving in any direction.

I suggest you play with some demos in the mbs folder, such as 
demo_MBS_motor.cpp or demo_MBS_crank.cpp. The visualization can help you 
better understand how joint frames are defined in Chrono. You can also have 
a mbs model of the screw setup only (without the FSI terrain, but the 
chassis-axel-screw setup). All you need is the code in the 
CreateSolidPhase(). Again, with the visualization, it's easier to figure 
out what was wrong. 

For your second question, note that ComputeMassProperties() only has the 
information of the obj mesh, which is the geometry of the object, whatever 
computed has to be multiplied by the density to get mass and inertia of the 
object. 

Thank you,
Luning
On Saturday, November 18, 2023 at 3:31:56 PM UTC-6 [email protected] 
wrote:

> Apologies, I uploaded the wrong cpp file. Attached is my latest one. 
>
> On Saturday, November 18, 2023 at 2:30:51 PM UTC-7 Mohammad Wasfi wrote:
>
>> Thank you, Luning, 
>>
>> I have a few more questions that I hope you can answer for me.
>>
>> 1- In the single-wheel demo, the wheel's movement is restricted in the 
>> x-direction, and the wheel is allowed to move in the y-direction. However, 
>> for this simulation, I am trying to change the movement restriction for the 
>> screw from the x to the y direction and allow the screw to move in the 
>> x-direction. I have tried to change multiple things but nothing seems to 
>> work as I intended. Right now, it seems that my screw is restricted from 
>> moving in both the x and y directions. I am just trying to remove any 
>> restrictions put on the screw in the X-direction as the screw tried to 
>> propel itself and move.  I was wondering if you could take a look at my 
>> code and tell me if you see such a restriction set.
>>
>> 2- Similar to the single wheel demo, I use the function 
>> " ComputeMassProperties" to compute the screw mass, cog, and inertia 
>> tensor. For some reason, the results returned by that function are 
>> different from what my CAD program provides for the same material. I was 
>> wondering why that is. 
>>
>> Example:
>> *Computed mass from code:* 0.00078467 ( I am not even sure what the 
>> units of this should be. All parameters I used had units of kg/m/etc. I 
>> assume that this is supposed to be kg. However, It is a very small value 
>> compared to what CAD provides). 
>> *computed mass from CAD*: 1.71 kg
>>
>>
>> Thank you so much,  
>>
>> On Monday, November 13, 2023 at 10:09:42 AM UTC-7 [email protected] 
>> wrote:
>>
>>> Hello Mohammad, 
>>>
>>> From the error message, the job was terminated for exceeding time limit, 
>>> meaning the job is still running, it just takes a very long time. From the 
>>> output message, the FSI solver did not get initialized either. Your FSI 
>>> parameters look good to me  
>>>
>>> Without running your simulation, I think it's likely that something is 
>>> wrong with CreateMeshPoints(), which is for generating BCE markers that 
>>> describe the screw geometry. Since decreasing resolution will take longer 
>>> time to generate the markers, the program could still be computing the 
>>> markers. The implementation right now doesn't scale well with higher 
>>> resolution. It might also got stuck in some infinite loop ... I will need 
>>> the screw geometry to look into this more.
>>>
>>> You can also generate the BCE markers yourself, and read the points in 
>>> the FSI program, then attach them to the screw body using AddPointsBCE(). 
>>> That way you have control over how to place the grid points so it can 
>>> capture the geometry. You can also speed up the process by parallelize your 
>>> implementation. You only need to do it once. 
>>>
>>> Thank you,
>>> Luning
>>> On Sunday, November 12, 2023 at 10:53:15 PM UTC-6 [email protected] 
>>> wrote:
>>>
>>>> Thank you so much, Professor. I have tested the code with some other 
>>>> initial spacing values and it seems that the code starts working again 
>>>> when 
>>>> I set my initial spacing value to 1.5*particle diameter (originally, the 
>>>> initial spacing value was set to be 0.0033m while the particle diam is 
>>>> 0.003m). It would still be helpful to look into why the code froze and no 
>>>> errors were outputted whenever you have time for it. 
>>>>
>>>> Thank you so much for all the help, 
>>>>
>>>> On Sunday, November 12, 2023 at 1:00:57 PM UTC-7 Dan Negrut wrote:
>>>>
>>>>> Mohammad – we’ll try to take a look, things are backed up, hopefully 
>>>>> we can help in some way…
>>>>>
>>>>> Dan
>>>>>
>>>>> ---------------------------------------------
>>>>>
>>>>> Bernard A. and Frances M. Weideman Professor
>>>>>
>>>>> NVIDIA CUDA Fellow
>>>>>
>>>>> Department of Mechanical Engineering
>>>>>
>>>>> Department of Computer Science
>>>>>
>>>>> University of Wisconsin - Madison
>>>>>
>>>>> 4150ME, 1513 University Avenue
>>>>>
>>>>> Madison, WI 53706-1572
>>>>>
>>>>> 608 772 0914 <(608)%20772-0914>
>>>>>
>>>>> http://sbel.wisc.edu/
>>>>>
>>>>> http://projectchrono.org/ 
>>>>>
>>>>> ---------------------------------------------
>>>>>
>>>>>  
>>>>>
>>>>> *From:* [email protected] <[email protected]> *On 
>>>>> Behalf Of *Mohammad Wasfi
>>>>> *Sent:* Sunday, November 12, 2023 1:42 AM
>>>>> *To:* ProjectChrono <[email protected]>
>>>>> *Subject:* [chrono] FSI module
>>>>>
>>>>>  
>>>>>
>>>>> Hello, 
>>>>>
>>>>>  
>>>>>
>>>>> I am trying to create a simulation based on the single-wheel demo. In 
>>>>> my simulation, I am using a screw instead of a wheel. I started with 
>>>>> changing the way the material properties are imported into the 
>>>>> simulation. 
>>>>> Everything worked fine as shown in the attached video. However, now, I am 
>>>>> trying to reduce particle diameter ( as well as initial spacing). The 
>>>>> simulation seems to freeze at the beginning and no error is printed. I 
>>>>> was 
>>>>> wondering if more insight could be provided into why the simulation 
>>>>> freezes 
>>>>> when reducing the particle diameter with no error printed. 
>>>>>
>>>>>  
>>>>>
>>>>> Thank you in advance for your help, 
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "ProjectChrono" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/projectchrono/239386b1-d155-40a8-bf1c-6999db12484fn%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/projectchrono/239386b1-d155-40a8-bf1c-6999db12484fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/323340e2-7838-4c81-a6fe-7eb7d6607db2n%40googlegroups.com.

Reply via email to