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.

Error using optimization module

Please login with a confirmed email address before reporting spam

I tried to simulate a forced convective heat transfer problem: water flow through a heat sink. When I did stationary study with initial values of optimization parameters, it ran well. But if I ran optimization, the following error occurred:
Undefined variable.
- Variable: CFLCMP
- Geometry: geom1
- Domain: 2
Failed to evaluate variable.
- Variable: comp1.spf.locCFL
- Defined as: CFLCMP
Failed to evaluate expression.
- Expression: nojac(comp1.spf.time_step_inv/comp1.spf.locCFL)
Failed to evaluate expression.
- Expression: d(d((comp1.spf.rho*nojac(comp1.spf.time_step_inv/comp1.spf.locCFL)*(-(comp1.u-nojac(comp1.u))*test(comp1.u)-(comp1.v-nojac(comp1.v))*test(comp1.v)-(comp1.w-nojac(comp1.w))*test(comp1.w)))*(dvol),{test@3}),comp1.u)

Anyone got an idea how to shoot this?
Thanks in advance

2 Replies Last Post 2016年7月15日 GMT-4 16:05

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年6月14日 GMT-4 02:21
I found that 'comp1.spf.locCFL' is the pseudo time defined in Laminar flow. By default, in laminar flow-advanced setting, the box for 'use pseudo time stepping for stationary equation form' is checked, and CFL number expression is given automatically. However, it seems my CFL number wasn't given automatically. So I just tick off the 'use pseudo time stepping for stationary equation form', then, it runs well.
However, I still don't know why stationary study can run well while optimization can not previously.
I found that 'comp1.spf.locCFL' is the pseudo time defined in Laminar flow. By default, in laminar flow-advanced setting, the box for 'use pseudo time stepping for stationary equation form' is checked, and CFL number expression is given automatically. However, it seems my CFL number wasn't given automatically. So I just tick off the 'use pseudo time stepping for stationary equation form', then, it runs well. However, I still don't know why stationary study can run well while optimization can not previously.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年7月15日 GMT-4 16:05
I ran into the same issue. Like you I worked around it.
I ran into the same issue. Like you I worked around it.

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.