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 old m-files in Comsol 4.2a

Please login with a confirmed email address before reporting spam

Problem Description

I have some m-files that have been created using Comsol 3.2. The problem is that older versions of Comsol use the FEM structure. In my lab, I run the Comsol 4.2a in Windows and I have troubles converting these files. Following the guidelines of LiveLink for Matlab users, I am looking for the choice of "COMSOL with MATLAB (COMSOL 3.5a Compatibility)". However, I cannot find it. In order to run Matlab in compatibility mode with Comsol, I run "COMSOL Multiphysics 4.2a Server" and the command "mphstart".

In reality, I am studying the example: www.comsol.com/model/aquifer-characterization-through-inverse-modeling-from-pump-tests-4410 . The m-files are in www.iamg.org/CGEditor/index.htm (aren’t free). I am studying how the code works and therefore I need to run the m-files.

Questions

1) Can I convert the FEM structure of m-file from Comsol 3.2 to Comsol 4.2a using COMSOL 3.5a Compatibility?

2) If yes, how can I have access to "COMSOL with MATLAB (COMSOL 3.5a Compatibility)"?

3) Do you have any suggestion?

Thank you in advance,
George

1 Reply Last Post 17.02.2014, 11:42 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17.02.2014, 11:42 GMT-5
I can confirm that the backwards compatibility can be very tricky. Actually I ended up rewriting the 3.x code in Comsol 4.x syntax. Regarding your question 3) I would recommend the workflow described here in the 'Backward Compatibility vs. Version 3.5a' section:
www.comsol.com/support/releasenotes/4.3/matlab/
You could try to save your Comsol 3.2 m-files with Matlab connected to Comsol 3.5a as a mph-file first and open this file in Comsol 4.x. Then save the model as an m-file.
Good luck,
Eli

I can confirm that the backwards compatibility can be very tricky. Actually I ended up rewriting the 3.x code in Comsol 4.x syntax. Regarding your question 3) I would recommend the workflow described here in the 'Backward Compatibility vs. Version 3.5a' section: http://www.comsol.com/support/releasenotes/4.3/matlab/ You could try to save your Comsol 3.2 m-files with Matlab connected to Comsol 3.5a as a mph-file first and open this file in Comsol 4.x. Then save the model as an m-file. Good luck, Eli

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.