Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Running a two-steps transient evaluation, but keeping the computed values

Please login with a confirmed email address before reporting spam

Hi,

I'm trying to run a quasi-static transient Structural Mechanics computation on Comsol v3.5a.
I have a large number of evaluations to run (at least 100 timesteps), but the solver crashes at some time due to memory issues. I'd like to split the computation in two successive steps, say t0 => t1 and t1 => t2, BUT keeping the whole computed values. All those values are to be used in a PDE module, solved sequentially after the SM module.

The problem is that, when I run the second step, I lose all the values computed in the first one (t0 => t1). I tried all the solutions I saw on the doc and the forum (restart, store solution, 2nd run with current solution as given for non-solved values...), but couldn't solve the problem. I can manage to keep my values when solving the PDE module, but not when changing the timestep...

Has anyone got a clue ?

5 Replies Last Post Mar 2, 2011, 2:04 a.m. EST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 18, 2011, 2:42 p.m. EST
Hi

I believe you need to use matlab to treat your data, I'm not convinced (but I might be wrong) that its possible within the GUI environment. You can always save the data in the middle, but that means 2 file. In fact you can also make "n" files with the parametric sequencer in 3.5a

--
Good luck
Ivar
Hi I believe you need to use matlab to treat your data, I'm not convinced (but I might be wrong) that its possible within the GUI environment. You can always save the data in the middle, but that means 2 file. In fact you can also make "n" files with the parametric sequencer in 3.5a -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 19, 2011, 3:27 p.m. EST
Hi

Thanks for the answer. That would be an useful option for latter versions of Comsol, I guess...

I searched another way to do the job, and found it: simply using the "store solution" option in the advanced solver settings ! Also, I discovered that I could split the timestep list into several intervals, which enables me to precisely tune the timestep along the run (timestep list = range[0,5,50] range[50,10,90] range[90,1,100], and use "strict" for the timesteps used by solver, in the time stepping tab).
I also found something useful: using the generalized-alpha method, one can manually define the solver timestep list (a composite range or even a function) AND a different output timestep list.
Hi Thanks for the answer. That would be an useful option for latter versions of Comsol, I guess... I searched another way to do the job, and found it: simply using the "store solution" option in the advanced solver settings ! Also, I discovered that I could split the timestep list into several intervals, which enables me to precisely tune the timestep along the run (timestep list = range[0,5,50] range[50,10,90] range[90,1,100], and use "strict" for the timesteps used by solver, in the time stepping tab). I also found something useful: using the generalized-alpha method, one can manually define the solver timestep list (a composite range or even a function) AND a different output timestep list.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 19, 2011, 3:51 p.m. EST
Hi

indeed there are many solver settings and choices. the use of several ranges() in series is nice, the default solver expect assymptotical convergene, so using strict or intermediate time-steppingis usefull for harmonic or pulsed signals. COSOL cannot understand all our desires (yet?)

--
Good luck
Ivar
Hi indeed there are many solver settings and choices. the use of several ranges() in series is nice, the default solver expect assymptotical convergene, so using strict or intermediate time-steppingis usefull for harmonic or pulsed signals. COSOL cannot understand all our desires (yet?) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 1, 2011, 4:33 p.m. EST
HI
I am using Chemical engineering module 3.5 a. I want to used different time steps in my model. I try to used two steps as you described here but it gave me an error. Could you please tell me how did you split the timestep.

Chandima B Ekanayake
HI I am using Chemical engineering module 3.5 a. I want to used different time steps in my model. I try to used two steps as you described here but it gave me an error. Could you please tell me how did you split the timestep. Chandima B Ekanayake

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 2, 2011, 2:04 a.m. EST
Hi

for sets (use { } in v4, but NOT in v3.5 !) you must respect that the first series (if several parameters) is strictly monotonously increasing (or decreasing), no repeated values. then normally it works (also in 3.5)

In v4 you can learn how to assemble several "range(,,)" in the Parameter section as you will get written out the result. In v3.5 you might be able to define a function with one and then plot it

so
0 1 2 3 4 4 5 6

is no good 4 is repeated, just as

range(0,0.1,1) range(1,0.2,2)

because 1 is repeated once per range

range(0,0.1,1) range(1.2,0.2,2)

works better

in V4 you can write

10^{range(0,0.1,2)} = {10^0 10^0.1 10^0.2 ... 10^2}

But you have the "range" button to help you set up these series, also with different functions

============

if you have two parameters

param1 param2

then you need to divide your set in pairs

{1 2 1.5 3 2 4 2.5 5 3 5} gives param1 = {1 1.5 2 2.5 3} and param2 = {2 3 4 5 5}

If I remember right pls check param2 can repeat the same value BUT NOT param1

I remember that in v3.5 I sometimes used a dummy "param" just to identify my cases and the others where moving up and down. However, do not forget that the solver is using previous step as starting point so if you put values jumping too much up&down the solver might have problems, and if you do not turn off the intermediate steps, the solver might try to calculate for param1 = 1.25 in between two values, and sometimes this is nonsense for the other parameters

--
Good luck
Ivar
Hi for sets (use { } in v4, but NOT in v3.5 !) you must respect that the first series (if several parameters) is strictly monotonously increasing (or decreasing), no repeated values. then normally it works (also in 3.5) In v4 you can learn how to assemble several "range(,,)" in the Parameter section as you will get written out the result. In v3.5 you might be able to define a function with one and then plot it so 0 1 2 3 4 4 5 6 is no good 4 is repeated, just as range(0,0.1,1) range(1,0.2,2) because 1 is repeated once per range range(0,0.1,1) range(1.2,0.2,2) works better in V4 you can write 10^{range(0,0.1,2)} = {10^0 10^0.1 10^0.2 ... 10^2} But you have the "range" button to help you set up these series, also with different functions ============ if you have two parameters param1 param2 then you need to divide your set in pairs {1 2 1.5 3 2 4 2.5 5 3 5} gives param1 = {1 1.5 2 2.5 3} and param2 = {2 3 4 5 5} If I remember right pls check param2 can repeat the same value BUT NOT param1 I remember that in v3.5 I sometimes used a dummy "param" just to identify my cases and the others where moving up and down. However, do not forget that the solver is using previous step as starting point so if you put values jumping too much up&down the solver might have problems, and if you do not turn off the intermediate steps, the solver might try to calculate for param1 = 1.25 in between two values, and sometimes this is nonsense for the other parameters -- Good luck Ivar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.