SimScale CAE Forum

Copying simulation and changing models requires a lot of duplicated work to set up


#1

I am looking at how the design of a model changes the coefficient of drag and have a few models to study. I was doing one model per project but wanted to try one project with all the models as suggested elsewhere on this fourm. Loading the first model and running the simulation is fine, but when I copy the simulation and then select the second model under geometry I find nearly everything I need to set in the simulation gets reset causing me to do a lot of the same work. I have to set my external box and refinements again. I understand I would need to select new surfaces under some refinments but I was hoping I could still copy all the settings for those refinements. Same with boundry conditions.

Is there a way to change out the model without completly erassing all the geometrys, boundry conditions and refinements that go in to making the mesh?


#2

Good question, there are ways, but they are not always obvious or well documented…

To make a new sim that uses sim setup parameters for an existing sim, use ‘Duplicate’ simulation and rename the new duplicate sim…

In the new duplicate simulation, select the new geometry file for it (if different) by clicking its ‘Geometry’ tree item…

In the ‘Meshes’ tree item of that duplicate sim, click the Mesh Settings dropdown arrow and select ‘Copy mesh settings from’, then select a mesh that has similar meshing settings/refinements that you want to use for your new mesh (even if it is from a different geometry)…

Then rename the new mesh that is about to be generated…

Some mesh refinements will still be green, but the red ones need to have volume/faces assigned before you can generate this new mesh… Make them green and then generate the new mesh…

Once the mesh is generated, do the same with the red simulation tree items (expand all sim tree items until you have found all the red ones and assign volume/faces for the red ones to make them green…

Then create a sim run …

That all is a little messy but it works, REMEMBER, never to play with mesh or sim tree items on meshes you do not want to regenerate or actually do a sim run with… doing so will create MUCH confusion for you later or for people looking at your project to see what you did to make the mesh that is shown or to see what sim parameters were used for the last sim run…

DUPLICATE, DUPLICATE, DUPLICATE is my motto before I change parameters of meshes or sim runs… AND use lots of explanation text in sim names, mesh names, and even parameter tree item names…

I even create sims whose sole purpose is to edit its name and use the new name for explaining what the following sims will be doing…

I even use a new sim for EVERY mesh I create which will have a sim run on it and put the number of cells in the mesh at the front of the sim name for later correlation… That way all the different sim runs will use the same mesh and are generally used to fine tune the boundary conditions, numerics etc for the mesh…

I even put the number of mesh cells at the beginning of the completed mesh name AND in the Forces or Coefficients results names (so that when CSV files are saved from those results items, they have a unique name)

Here is a project of mine which I am now working on that shows a lot of those recommendations in use…

AND, in general, for static CFD sim runs, I do not write full datasets at intervals between 0 and the ‘final iteration that I want to reach’… Each full set of sim run data that is saved can be GBs in size…

AND, if your simulation diverges, try turning on Potential Foam Initialization as a first attempt to get divergent data to converge…

SORRY this turned into a broad project organization post, but I have been meaning to get this all written down somewhere for a while now :wink: