Thread Closed

Problems with running COMSOL with MATLAB

 
Share Thread
May22-09, 04:45 PM   #1
 

Problems with running COMSOL with MATLAB


Hello.

I recently obtained a trial version of COMSOL, and was trying to run COMSOL with MATLAB. During the installation process, I clicked option "MATLAB interface" under the "Features" tab. After installing COMSOL, I could not locate the "COMSOL with MATLAB" folder in my Programs menu. Also, I tried typing in "comsol" into the command window in MATLAB, but it said that it didn't recognize the function 'comsol.' The MATLAB that we have is MATLAB R2007b. Is this an acceptable version of MATLAB. If so, do you know what I could be doing wrong? I appreciate any help you may be able to give.

Thanks in advance!
PhysOrg.com engineering news on PhysOrg.com

>> Four microphones, computer algorithm enough to produce 3-D model of simple, convex room
>> Faster, more precise airstrikes within reach
>> How smart technology could change public transit
Jun8-09, 01:47 PM   #2
 
During installation there is a check box that you must click to include the matlab and comsol interface. you may need to reinstall the program. If you have matlab 2007b you also may have additional trouble after installing the interface. follow these instructions.

Problem Description
When I start COMSOL with MATLAB 2007b, neither MATLAB nor the COMSOL Multiphysics user interface appear.
Solution
This problem has been reported by some users of COMSOL with MATLAB 2007b on Windows. MATLAB 2007a and earlier versions are not affected by this problem.
The problem seems to be related to a new memory allocation strategy introduced in MATLAB 2007b, and the solution is to tell MATLAB to use the old strategy instead by setting the Windows environment variable MATLAB_RESERVE_LO to 0.
Primary solution
To fix the problem, The MathWorks recommends to set this environment variable as follows:
1. In Windows, click Start > Control Panel > System > Advanced > Environment Variables.
2. Click the New button in the System variables frame.
3. Enter MATLAB_RESERVE_LO in the Variable name field and 0 in the Variable value field.
4. Click OK and close the dialog boxes.
Secondary solution
In some rare occasions, the primary solution might not help. Then try the following:
1. Try to start COMSOL with MATLAB once. It will fail but a file java.opts will be written to the COMSOL 3.4 installation directory.
2. Open the java.opts file, remove the line -Xmx256m and save the file.
3. Open the file comsol.opts in the bin directory under your COMSOL installation and change the line

JAVAOPTS=on

to

JAVAOPTS=off

This will ensure that a new java.opts file is not written automatically every time you start COMSOL with MATLAB and your manually edited comsol.opts will always be used.
4. When you use "Connect to MATLAB" from the File menu in COMSOL Multiphysics it will look for a java.opts file in your home directory. This means that you should copy the edited java.opts file to the home directory as well. This will be something like

C:\Documents and Settings\
Thread Closed

Tags
comsol, matlab

Similar discussions for: Problems with running COMSOL with MATLAB
Thread Forum Replies
COMSOL : a problem about self-varying(!) subdomain IDs in Comsol with Matlab Math & Science Software 2
COMSOL in MATLAB Materials & Chemical Engineering 0
MATLAB: Running only a certain section of an m-file Math & Science Software 5
Comsol with matlab function Materials & Chemical Engineering 5
Matlab: Saving and Running M-files Math & Science Software 3