Simulation with a set of parameters in one program

56 views
Skip to first unread message

Chiny Lan

unread,
Apr 3, 2023, 5:44:34 AM4/3/23
to ProjectChrono
Hi,

I want to simulate sand with different parameters using FSI. I used a for loop in main function to implement the series of simulation. But when the first simulation done, the program also closed.

How can I do seris simulation with a set of parameters in one program?

Thanks and regards.

Dan Negrut

unread,
Apr 3, 2023, 9:08:18 AM4/3/23
to Chiny Lan, ProjectChrono

Perhaps we can help if you drop here the file that runs the loop to carry out the analysis. We need more info to try to help you.

 

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

http://sbel.wisc.edu/

http://projectchrono.org/

---------------------------------------------

--
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 projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/46b75e69-cef3-4c4f-9b00-26603e5bfff7n%40googlegroups.com.

Message has been deleted

Wei Hu

unread,
Apr 4, 2023, 9:05:16 AM4/4/23
to Chiny Lan, ProjectChrono
Hi Chiny,

What parameters would you like to change in your simulation loop? I'm asking this question because FSI does a preprocessing before the simulation loop starts and the parameters will not be changed during the simulation. Some of the inner parameters also have connections with the parameters the program reads at the very beginning. So, please provide more information for us to better help you. 

Thank you,
Wei

--
Message has been deleted

Radu Serban

unread,
Apr 7, 2023, 3:49:43 PM4/7/23
to ProjectChrono

This kind of parametric study is much better done by invoking the same executable multiple times with different command line arguments from a batch script. 

 

Just modify the existing demo to read the angular velocity from its arguments (you can use the cxxopts third-party library provided with Chrono for that, although that’s arguably overkill for this simple case) and then write a script that invokes the same executable multiple times. 

 

That way, you

  1. Only need to make minimal changes to the existing Chrono demo.
  2. Can run this on multiple nodes in parallel and distribute the work that way (if you do have access to more than one node with a GPU).

 

I only skimmed the code you provided in a previous email but spotted an obvious mistake: return is invoked from within the for loop. I doubt that was your intention.

 

--Radu

 

From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of Chiny Lan
Sent: Thursday, April 6, 2023 4:58 AM
To: ProjectChrono <projec...@googlegroups.com>

Subject: Re: [chrono] Simulation with a set of parameters in one program

 

I want to simulate the wheel test at one slip ratio. After the simulation at this slip ratio done, I want do the wheel test at another slip ratio, that's the angular velocity of wheel should change.

Reply all
Reply to author
Forward
0 new messages