- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OMC Parallel Model Execution
OMC Parallel Model Execution
OMC Parallel Model Execution
We have our aircraft library based off of MultiBody finally up and running (still a lot left to do): https://github.com/arktools/openfdm.git
Now I'm trying to push the limits for multiple aircraft simulation.
I have a hyper-threaded quad-core i7 processor and am simulating 8 aircraft:
https://github.com/arktools/openfdm/blo … impleEx.mo
However, when i simulate 1 aircraft it takes 3 seconds, and for 8 aircraft it scales linearly to 24 seconds. Is there an option that I am missing? Does it not work with the rungekutta solver? The other solvers were failing for me on the aircraft model. Linearization does work, even for this large model with my changes to the MultiBody library described in other posts.
Code:
// options
setCommandLineOptions({
"+numProcs=8",
//"+showErrorMessages",
"+preOptModules=inlineArrayEqn,partitionIndependentBlocks",
"+postOptModules=inlineArrayEqn,constantLinearSystem,removeSimpleEquations,generateSymbolicLinearization",
//"+a",
//"+noSimplify",
"+d=linearization,gendebugsymbols"
});
// this line required the project path to be appended to OPENMODELICALIBRARY
loadModel(Modelica);
loadModel(MultiBodyOmc);
loadModel(OpenFDM);
getErrorString();
// it is necessary to extract the model form all packages so the "." is not mis-read
system("rm *DatcomSimpleEx*");
loadString("
model DatcomSimpleEx
extends OpenFDM.Aerodynamics.Examples.DatcomSimpleEx;
end DatcomSimpleEx;
");
// get linear model
simulate(DatcomSimpleEx,
numberOfIntervals=1,
stopTime=0.001,
measureTime=false,
method="rungekutta");
//getErrorString();
system("./DatcomSimpleEx -l 0 > log.out");
readFile("log.out");
loadFile("linear_DatcomSimpleEx.mo");
//getErrorString();
list(linear_DatcomSimpleEx);
//getErrorString();
// simulate non-linear model
simulate(DatcomSimpleEx,
stopTime=1000,
numberOfIntervals=100000, // atleast 100 Hz
measureTime=false,
method="rungekutta");
plotParametric(body.airframe.r_0[1],
body.aerodynamics.env.agl);
//system("chromium-browser $PWD/DatcomSimpleEx_prof.html &");
//getErrorString();
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OMC Parallel Model Execution