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: [email protected] <[email protected]> On Behalf Of Chiny Lan Sent: Thursday, April 6, 2023 4:58 AM To: ProjectChrono <[email protected]> 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. 在2023年4月4日星期二 UTC+8 21:05:16<[email protected]<mailto:[email protected]>> 写道: 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 On Mon, Apr 3, 2023 at 5:44 PM Chiny Lan <[email protected]> wrote: 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. -- 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/46b75e69-cef3-4c4f-9b00-26603e5bfff7n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/46b75e69-cef3-4c4f-9b00-26603e5bfff7n%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]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/a6382d94-8f64-4b4f-a9e3-98ab127c66dfn%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/a6382d94-8f64-4b4f-a9e3-98ab127c66dfn%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/PH0PR06MB8237F45692E8350879BAA72FA7969%40PH0PR06MB8237.namprd06.prod.outlook.com.
