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.

One Study with stationary and time dependent steps

Please login with a confirmed email address before reporting spam

Hello,

i want to run one study in which i have different types of steps.

First a stationary to solve a flow, afterwards solving a time-dependent to solfe a heat transfer simulation for some seconds, afterwards solving a flow again.

With activated pseudo-time-stepping, a generate the error:

Undefined variable. - Variable: CFLCMP

When i disable this option, i can run the first stationary and the first time dependent study. But when the second stationary study starts, i receive the error message:

Undefined variable. - Variable: timestep

Even when i force the equation of the flow to be in the stationary form.

I don´t get this error. Shouldn´t there be the same calculations like in step 1? In both steps, the multiphysic non-isothermal flow is activated, the solver settings are the same...

Has anyone an idea why this problem occurs, or a guess how to solve my problem?

I have a really simple test file, which needs about 2 min to run, where the problem is shown.

Thanks,

Henrik



2 Replies Last Post 22 giu 2018, 07:46 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 22 giu 2018, 05:18 GMT-4

Interesting "feature":

After deleting step 3 in study 1 (without changing / resetting the solver) and computing the study afterwards, the solver still has the solving steps inside, which he solves without problems!

I get the correct result without errors. For some reasons, it just worked sometimes, not every time, and i couldn´t figure out a rule. So implementing this in my real model and hoping for this "feature" to work... is not really the way I want to go.

Interesting "feature": After deleting step 3 in study 1 (without changing / resetting the solver) and computing the study afterwards, the solver still has the solving steps inside, which he solves without problems! I get the correct result without errors. For some reasons, it just worked sometimes, not every time, and i couldn´t figure out a rule. So implementing this in my real model and hoping for this "feature" to work... is not really the way I want to go.

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 22 giu 2018, 07:46 GMT-4

Aaaaaaand something which can be called more or less a "solution".

Open the .java, for example with eclipse. Search the line in which the study step is defined for the third solver

model.sol("sol1").feature("st3").set("studystep", "stat2");

change it to

model.sol("sol1").feature("st3").set("studystep", "stat");

Now the first step get´s simulated several times. Changes in the boundary conditions are not possible, but it fit´s at least for my case. save the .java file, when the automatic builder is activated, a .class file will be generated in the folder "bin".

Open the .class file with comsol. With no further changes, the simulation starts automatically, so the opening process could last pretty long.

Would be nice to hear from some with more knowledge about comsol than me, why this work-around works, while taking stat2 as study step causes errors. I checked every line of the Java code, both steps were completly identical.

Aaaaaaand something which can be called more or less a "solution". -------- Open the .java, for example with eclipse. Search the line in which the study step is defined for the third solver model.sol("sol1").feature("st3").set("studystep", "stat2"); change it to model.sol("sol1").feature("st3").set("studystep", "stat"); Now the first step get´s simulated several times. Changes in the boundary conditions are not possible, but it fit´s at least for my case. save the .java file, when the automatic builder is activated, a .class file will be generated in the folder "bin". Open the .class file with comsol. With no further changes, the simulation starts automatically, so the opening process could last pretty long. Would be nice to hear from some with more knowledge about comsol than me, why this work-around works, while taking stat2 as study step causes errors. I checked every line of the Java code, both steps were completly identical.

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.