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.

moving user defined material library

Please login with a confirmed email address before reporting spam

Hi,

How to move user defined material library from comsol 4.2a to comsol 4.3a?

Regards,
Susant

4 Replies Last Post 20 mar 2014, 16:29 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 apr 2013, 13:49 GMT-4
Hi

have you looked at the format ? its XML so you should be able to read it and undersand the structure.

Anyhow I would propose to first copy the old file directly tothe new directory, there are a fair chance it will be read in like that (havnt tried as I'm not by my WS, but I remember I entered once quite some material data by notepad cut&paste directly into the XML file

--
Good luck
Ivar
Hi have you looked at the format ? its XML so you should be able to read it and undersand the structure. Anyhow I would propose to first copy the old file directly tothe new directory, there are a fair chance it will be read in like that (havnt tried as I'm not by my WS, but I remember I entered once quite some material data by notepad cut&paste directly into the XML file -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 apr 2013, 15:54 GMT-4
Hi Ivar,

Thanks. I followed the steps suggested by Johan Sundqvist. It works!

Regards,
Susant

1. In your latest version of COMSOL Multiphysics, open the Material Browser, and then click on the 'Add Material Library' button.
2. Browse to the old user-defined material library (this is the tricky part), which will be located at (for Windows users):

c:\users\your_user_name\.comsol\old_comsol_installation_directory\materials\

Highlight the mph-file, and then click save.
Hi Ivar, Thanks. I followed the steps suggested by Johan Sundqvist. It works! Regards, Susant 1. In your latest version of COMSOL Multiphysics, open the Material Browser, and then click on the 'Add Material Library' button. 2. Browse to the old user-defined material library (this is the tricky part), which will be located at (for Windows users): c:\users\your_user_name\.comsol\old_comsol_installation_directory\materials\ Highlight the mph-file, and then click save.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 apr 2013, 01:05 GMT-4
Hi

Good to hear, indeed the material database format should not change much between versions (in format) hopefully it will be incremented with newer and better non-linear material properties. There really we have the main blocking of multiphysics modelling: we lack fully the correct and comparable material data as dependent on T, pA, B, V, ...

So, material scientists: you have work for years now ;)

--
Good luck
Ivar
Hi Good to hear, indeed the material database format should not change much between versions (in format) hopefully it will be incremented with newer and better non-linear material properties. There really we have the main blocking of multiphysics modelling: we lack fully the correct and comparable material data as dependent on T, pA, B, V, ... So, material scientists: you have work for years now ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 mar 2014, 16:29 GMT-4
Caution- clicking on the "New Material Library" button assumes you want to start a new (blank) library with a custom name. Selecting the file from your old version of Comsol will totally erase all your custom materials and hard work! Don't make this mistake like I just did! Updated instructions for two cases below:

If you have a library to import with a custom name (Bob's materials, or whatever):
1) Click "IMPORT Material Library" in your new version of Comsol
2) Navigate to and open the file (such as "c:\users\you\.comsol\v43b\materials\Bobs_matls.mph")

If you, like me, save all your materials in the standard "User-Defined Library", Comsol will not let you merge libraries with identical names, nor rename or delete the User-Defined Library, so in this case:
1) Navigate to the folder with "User_Defined_Library.mph" (such as "c:\users\you\.comsol\v43b\materials\")
2) Make a copy of this file. Re-name it (for example, "User_Defined_Library_old.mph")
3) Now Click "Import Material Library" and open "User_Defined_Library_old.mph".
4) If you can't stand the thought of having "old" and "current" libraries floating around, you are not allowed to copy+paste the materials over- you have to add all of your materials from the "_old" library to a model (one-by-one), and re-add them to the standard "User-Defined Library".
5) Delete the _old library after you have verified all elements have transferred over.
6) Have a nap, because you are exhausted preforming so many steps for a copy+paste procedure.
Caution- clicking on the "New Material Library" button assumes you want to start a new (blank) library with a custom name. Selecting the file from your old version of Comsol will totally erase all your custom materials and hard work! Don't make this mistake like I just did! Updated instructions for two cases below: If you have a library to import with a custom name (Bob's materials, or whatever): 1) Click "IMPORT Material Library" in your new version of Comsol 2) Navigate to and open the file (such as "c:\users\you\.comsol\v43b\materials\Bobs_matls.mph") If you, like me, save all your materials in the standard "User-Defined Library", Comsol will not let you merge libraries with identical names, nor rename or delete the User-Defined Library, so in this case: 1) Navigate to the folder with "User_Defined_Library.mph" (such as "c:\users\you\.comsol\v43b\materials\") 2) Make a copy of this file. Re-name it (for example, "User_Defined_Library_old.mph") 3) Now Click "Import Material Library" and open "User_Defined_Library_old.mph". 4) If you can't stand the thought of having "old" and "current" libraries floating around, you are not allowed to copy+paste the materials over- you have to add all of your materials from the "_old" library to a model (one-by-one), and re-add them to the standard "User-Defined Library". 5) Delete the _old library after you have verified all elements have transferred over. 6) Have a nap, because you are exhausted preforming so many steps for a copy+paste procedure.

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.