Reuse Factorized Simulation Problem

Hi All,

I need to preform 100s of linear thermal simulations on a single mesh where all I do between different steps is change the boundary temperatures. I was wondering if there is a way to use one of the direct solvers to factor the matrix once and then use the factored matrix for all of the simulations, instead of refactored the matrix for every simulation.

Thanks!

The CalculiX functionality closest to what you want to achieve is restart capability. It allows you to run the first step of the analysis once and then run more steps with different settings without having to recalculate that first step. So you could even solve an empty step (e.g. with initial temperature only) and then follow it with multiple versions of the second step. All of them would continue from the first one, with conductivity matrix already calculated.

I’m courious about this question.
¿Wouldn’t it be the same to set up a time varing temperature BC and run a transient?.

It seems that the OP wants independent load cases with different thermal conditions, not a continuous analysis just with BCs changing over time. If not then amplitude could indeed help.

Thank you all for the advice. Yes, I’m looking for independent static simulations, not transient analysis.

I tried using restart, but it doesn’t seem to store the decomposed matrix as SPOOLES factors it again for the 2nd step. Here are examples:
First file step

*initial conditions, type=temperature
Nall,0.0

*STEP
*RESTART,WRITE

*HEAT TRANSFER, STEADY STATE,
1.0,1.0

*END STEP

I then copy the rout to rin for the second file:

*STEP
*RESTART,READ,STEP=1
***********************************************************
*HEAT TRANSFER, STEADY STATE,
1.0,1.0

*BOUNDARY
BC1,11,11,1.0

*BOUNDARY
BC2,11,11,0.0

*END STEP

This functionality is supposed to significantly speed up analyses by avoiding the need to recalculate common steps. Another application is to continue analyses that were stopped for some reason.

I don’t know exactly how it works internally but it’s possible that CalculiX repeats some stages of calculations. It doesn’t repeat that whole step for sure though.

Does it work with *RESTART, READ placed between *STEP and *HEAT TRANSFER ? Normally, it’s placed before the *STEP keyword.

I see, thanks for the info. I did not see a change when moving the RESTART after HEAT TRANSFER.

I’ll mess around with it more today with different structures. It’s also possible I could do something like Disla suggested with large time steps to converge to steady-state quickly (I’ve never done transient in Calculix though so I’m not sure).

Thank you both for the advice! I’ll reply back here if I make more progress.

According to the manual section 7.104 “restart, read” should be the very first non-comment line in the data set.
I have never tested it on a thermal calculation but static linear/nonlinear it works this way.

I didn’t think it was possible to reuse a matrix factorization when you’re changing the values of the constraints. Temperature constraints affect the matrix, not just the load vector.

Could you use *STEP, PERTURBATION? I’m assuming these are all small perturbations in the temperature field and no changes in the boundary conditions, right?

Thanks all for the advice. These are changes in the boundary conditions, not small perturbations, so it seems it is not possible to reuse the factorized matrix for different temperature BCs.

If CCX does reuse the factorization, there is still a way. You can approximate a fixed temperature BC using a heat flow rate through a constant thermal resistance to a constant fixed temperature sink. Then you set the heat flow rate to control the temperature at the boundary of your actual model. It’s analogous to a Norton equivalent circuit in electronics.