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.

PROBLEM: Exporting COMSOL model to Simulink

Please login with a confirmed email address before reporting spam

Hi there, I'm trying to export a Navier-Stokes based model (a convective flow around an simple object.....a very simple model).

I'm using the General Dinamic Simulink blocktype for exporting, but when I try to load and run the FEM structure in Simulink-Matlab the following error occurs:

__________________________________________________________________________________________
Error in COMSOL Multiphysics Subsystem block:
Java exception occurred:
Exception:
com.femlab.jni.FlNativeException: Failed to evaluate expression
Messages:
Failed to evaluate expression
- Expression: diff(diff(((+(-2*eta_chns*ux+p)*test(ux)+(-eta_chns*(uy+vx))*test(uy)+(-rho_chns*(u*ux+v*uy))*test(u)+(-test(nojac(rho_chns)*(nojac(u)*ux+nojac(v)*uy)+px-nojac(eta_chns)*(2*uxx+uyy+vxy))*taum_chns*res_u_chns))-(+(+(rho_chns)*ut)*test(u)))*(dvol),{test@3}),u)

Failed to evaluate variable
- Variable: taum_chns
- Defined as: nojac(min((timestep/rho_chns),((0.5*h)/max((U_chns*rho_chns),((6*eta_chns)/h)))))

Failed to evaluate expression
- Expression: nojac(min((timestep/rho_chns),((0.5*h)/max((U_chns*rho_chns),((6*eta_chns)/h)))))

Failed to evaluate variable
- Variable: timestep
- Geometry: 1
- Dimension: 2
- Domain group: {1}

Stack trace:

at evaltree.cpp, row 757, ()
at evalnodes.cpp, row 754, ()
at xevalutil.cpp, row 2485, ()
at xevalutil.cpp, row 2440, ()

at com.femlab.solver.Linearization.initialize(Native Method)

at com.femlab.solver.Linearization.initialize(Unknown Source)
__________________________________________________________________________________________

I have not had any problem by exporting Conduction Heat trasfer models (because their are almost linear..),... but when I try to export a nonlinear model (a fluid dynamics model for example), I always encounter this problem...Is it imposible to export nonlinear fluid dynamics models, even if I use the General dynamic exporting option?

Thanks a lot!!

0 Replies Last Post Dec 13, 2009, 2:20 p.m. EST
COMSOL Moderator

Hello Edwin Insuasty

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.