Question

I am integrating a relative small Finite Element (FE) model into Modelica. In doing so, I created a Model (Modelica class) that can read the mass (M) and stiffness (K) matrix in Matlab binary file format. I connected the FE model with some components from the Modelica Standard Library (Modelica.Mechanics.MultiBody). If M and K are very small (say 20x20), then Dymola is able to run the Model and provides pretty accurate results compared to Abaqus (but computational not that efficient). However, if I increase the complexity of the FE model that includes larger M and K (e.g. size(M)=[200,200]), then Dymola provides the following error:

Compiling and linking the model (Visual C++).

Setting environment for using Microsoft Visual Studio 2010 x86 tools. dsmodel.c dsmodelext1.c dsmodelext10.c dsmodelext11.c dsmodelext12.c dsmodelext13.c dsmodelext14.c dsmodelext15.c dsmodelext16.c dsmodelext2.c dsmodelext3.c dsmodelext4.c dsmodelext5.c dsmodelext6.c dsmodelext7.c dsmodelext8.c dsmodelext9.c

Generating Code...

c:\sentient\src\gll\gearlibrary\dsmodel.c(185115) : fatal error C1128: number of sections exceeded object file format limit : compile with /bigobj

Error generating Dymosim.

I connected Visual Studio C++ Express Edition (10.0) with Dymola.

It looks to me that Dymola provides a variable name to each entity of M and K. This exceeds the maximum limit of objects for the C++ compiler.

How can I prevent Dymola of doing this? How can I set /bigobj within the Dymola environment?

Was it helpful?

Solution

It is true that Dymola will assign a name to every element of an array. There are two things you can try here. The first is the simple one, but I cannot say whether it will actually help. Visual C++ hints that including the /bigobj switch on the command line might help. If you want to do that, you should look at the various build scripts in the /bin directory whereever you have Dymola installed. You can modify these scripts to change the commands used to compile models. However, I would be sure to backup those scripts before you mess with them or you may get into a situation where you can no longer compile any of your models. I think the main script is build.bat (although there are others and I don't know what determines which ones are invoked).

If that doesn't work, another way to deal with large amounts of data is to use the ExternalObject facility in Modelica. This allows you to load data at the C language level, rather than at the Modelica level. This can be used to, for example, load interpolation tables into memory without clogging up the Modelica namespace with thousands of data points used in the interpolation. However, I'm skeptical this would really help you since it seems you require Dymola to solve the equations generated by your mass and stiffness matrices. As such, making them external won't help. It works in the interpolation case because Dymola doesn't really need to be aware of all of that data (only the interpolation function needs it). But if you are using (all of) that data to solve a system of equations, I don't think you can really get away with hiding it from Dymola.

OTHER TIPS

Starting from Dymola 2015 FD01 you can set Advanced.CompileBigObject=true; inside Dymola - i.e. no need to modify the bat-files.

It didn't work when the original question was asked, but if someone else has the same problem that should be more convenient.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top