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.

Accessing material properties in global expressions

Please login with a confirmed email address before reporting spam

Dear Comsol users,

I am struggling to use material properties in global expressions. I am working with the RF module and using the Electromagnetic Waves/Scattered harmonic propagation application mode. I have defined some frequency dependent material parameters, e.g., relative permittivity. I can use these materials for my subdomains just fine. However, when I try to define global expressions making use of these material parameters I get errors. How should this be done correctly? From the manual I understand that mat1_epsilonr should refer to the relative permittivity of material 1 in my simulation (epsilonr is equal to a frequency dependent function that I have defined in the materials library). If I specify an expression equal to this I just get an error. Any help would be highly appreciated!

Klas

20 Replies Last Post 16 sept. 2015, 15:42 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31 mai 2010, 02:39 UTC−4
when using comsol, I got the same problem. would any expert give us some explanation? thanks a lot.




Dear Comsol users,

I am struggling to use material properties in global expressions. I am working with the RF module and using the Electromagnetic Waves/Scattered harmonic propagation application mode. I have defined some frequency dependent material parameters, e.g., relative permittivity. I can use these materials for my subdomains just fine. However, when I try to define global expressions making use of these material parameters I get errors. How should this be done correctly? From the manual I understand that mat1_epsilonr should refer to the relative permittivity of material 1 in my simulation (epsilonr is equal to a frequency dependent function that I have defined in the materials library). If I specify an expression equal to this I just get an error. Any help would be highly appreciated!

Klas


when using comsol, I got the same problem. would any expert give us some explanation? thanks a lot. [QUOTE] Dear Comsol users, I am struggling to use material properties in global expressions. I am working with the RF module and using the Electromagnetic Waves/Scattered harmonic propagation application mode. I have defined some frequency dependent material parameters, e.g., relative permittivity. I can use these materials for my subdomains just fine. However, when I try to define global expressions making use of these material parameters I get errors. How should this be done correctly? From the manual I understand that mat1_epsilonr should refer to the relative permittivity of material 1 in my simulation (epsilonr is equal to a frequency dependent function that I have defined in the materials library). If I specify an expression equal to this I just get an error. Any help would be highly appreciated! Klas [/QUOTE]

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 31 mai 2010, 06:45 UTC−4
Hi

I normally do not refere directly to the material name "mat1_rho" but to the comsol material name "rho_smsld", in V3.5a or "solid.rho" in V4.

By this COMSOL looks after the reference to the correct frequency, temperature or pressure, and to select the different material rho values depending on the group selection I have active on the subdomains.

Clear, what one often forget in V3.5 is that selecting a database complex non-linear function material one is forcing non-linear solvers (longer to solve) and that there are often"hidden" parameters such as ambient temperatuure Tempref or pressure "p" that needs to be defined. This has been enhanced in V4 by "Red Stop marks" but still I have managed to get reasonnable (but wrong) results by forgetting to check all my material data, and the solver whent through OK !

So I would suggest strongly debug a model with fixed material data, then introduce non-linearities one by one in a controlled way.

Have fun Comsoling
Ivar
Hi I normally do not refere directly to the material name "mat1_rho" but to the comsol material name "rho_smsld", in V3.5a or "solid.rho" in V4. By this COMSOL looks after the reference to the correct frequency, temperature or pressure, and to select the different material rho values depending on the group selection I have active on the subdomains. Clear, what one often forget in V3.5 is that selecting a database complex non-linear function material one is forcing non-linear solvers (longer to solve) and that there are often"hidden" parameters such as ambient temperatuure Tempref or pressure "p" that needs to be defined. This has been enhanced in V4 by "Red Stop marks" but still I have managed to get reasonnable (but wrong) results by forgetting to check all my material data, and the solver whent through OK ! So I would suggest strongly debug a model with fixed material data, then introduce non-linearities one by one in a controlled way. Have fun Comsoling Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 juin 2010, 09:14 UTC−4
Hi Ivar,

I didn't quite understand your explanation. I am using Comsol version 3.5a through the GUI. I would like to use the materials properties in global expressions in my simulations. My simple problem is that I don't know how to refer to a specific material parameter. How would I for example refer to the density of air in an expression? All my attempts just result in the error/warning "Inconsistent unit". This happens even when I have an expression equal to just a single material parameter so that there cannot be any inconsistency with the units. I would very much appreciate any suggestions on this.

Klas


Hi

I normally do not refere directly to the material name "mat1_rho" but to the comsol material name "rho_smsld", in V3.5a or "solid.rho" in V4.

By this COMSOL looks after the reference to the correct frequency, temperature or pressure, and to select the different material rho values depending on the group selection I have active on the subdomains.

Clear, what one often forget in V3.5 is that selecting a database complex non-linear function material one is forcing non-linear solvers (longer to solve) and that there are often"hidden" parameters such as ambient temperatuure Tempref or pressure "p" that needs to be defined. This has been enhanced in V4 by "Red Stop marks" but still I have managed to get reasonnable (but wrong) results by forgetting to check all my material data, and the solver whent through OK !

So I would suggest strongly debug a model with fixed material data, then introduce non-linearities one by one in a controlled way.

Have fun Comsoling
Ivar


Hi Ivar, I didn't quite understand your explanation. I am using Comsol version 3.5a through the GUI. I would like to use the materials properties in global expressions in my simulations. My simple problem is that I don't know how to refer to a specific material parameter. How would I for example refer to the density of air in an expression? All my attempts just result in the error/warning "Inconsistent unit". This happens even when I have an expression equal to just a single material parameter so that there cannot be any inconsistency with the units. I would very much appreciate any suggestions on this. Klas [QUOTE] Hi I normally do not refere directly to the material name "mat1_rho" but to the comsol material name "rho_smsld", in V3.5a or "solid.rho" in V4. By this COMSOL looks after the reference to the correct frequency, temperature or pressure, and to select the different material rho values depending on the group selection I have active on the subdomains. Clear, what one often forget in V3.5 is that selecting a database complex non-linear function material one is forcing non-linear solvers (longer to solve) and that there are often"hidden" parameters such as ambient temperatuure Tempref or pressure "p" that needs to be defined. This has been enhanced in V4 by "Red Stop marks" but still I have managed to get reasonnable (but wrong) results by forgetting to check all my material data, and the solver whent through OK ! So I would suggest strongly debug a model with fixed material data, then introduce non-linearities one by one in a controlled way. Have fun Comsoling Ivar [/QUOTE]

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 24 juin 2010, 09:42 UTC−4
Hi

When you import a material, COMSOL assigns it a name of the type mat1 mat2 and adds the suffic of the variable, the 1,2,3 are the order in which you defined the material, not important only to make them unique.

Then when you asign a material to a domain, COMSOL fills in the "rho_smsld" internal variable of the current application mode the "smsld" physics.

When you fill ina formula in the GUI you normally have defined a domin to which it applies (ir it is implicit by inheritage, so you can use the physics variable name "rho_smsld" to refer to the density. This formuly is correct even if you change the material type to let's say mat2 sometiomes later in your model history. while if you use the variable "mat1.rho" it referes always to a specific material, regardless what domain is active when the formula is used. it might not give you the right result.

Another example to try to illustrate this. Again in structural (because it's my fisrt though, but it applies to most/all material variables by analogy): choose 3D smsld, if you want to define the total mass or inertia, you define your model set up the geometry the materials and the boundary subdomain definitions. Then you do a "Solver - Get initial values" (in 3.5) and you select the Postprocessing Geoemtric properties, or Domain integration (the latter is probably more explicite:
You select all domains and type in "rho_smsld" as the volume integrand, this will give you the integration of rho time dV=dxdydz or in fact the total mass. if you have only one material let's say mat1 you could use mat1.rho to get the same results, but if you have several materials, the mat1.rho would force the calculation to use only the density of mat1 and not the specific material indexing you had specified (assuming you have several metarials)

Note: in V4 the names have change and its rather "root.mod1.solid.rho" or just "solid.rho" that should be used (the translation of mat1 I do not know, would have to look up the internal equations see preferences in V4)

Is this clearer ?
Hope so
Ivar
Hi When you import a material, COMSOL assigns it a name of the type mat1 mat2 and adds the suffic of the variable, the 1,2,3 are the order in which you defined the material, not important only to make them unique. Then when you asign a material to a domain, COMSOL fills in the "rho_smsld" internal variable of the current application mode the "smsld" physics. When you fill ina formula in the GUI you normally have defined a domin to which it applies (ir it is implicit by inheritage, so you can use the physics variable name "rho_smsld" to refer to the density. This formuly is correct even if you change the material type to let's say mat2 sometiomes later in your model history. while if you use the variable "mat1.rho" it referes always to a specific material, regardless what domain is active when the formula is used. it might not give you the right result. Another example to try to illustrate this. Again in structural (because it's my fisrt though, but it applies to most/all material variables by analogy): choose 3D smsld, if you want to define the total mass or inertia, you define your model set up the geometry the materials and the boundary subdomain definitions. Then you do a "Solver - Get initial values" (in 3.5) and you select the Postprocessing Geoemtric properties, or Domain integration (the latter is probably more explicite: You select all domains and type in "rho_smsld" as the volume integrand, this will give you the integration of rho time dV=dxdydz or in fact the total mass. if you have only one material let's say mat1 you could use mat1.rho to get the same results, but if you have several materials, the mat1.rho would force the calculation to use only the density of mat1 and not the specific material indexing you had specified (assuming you have several metarials) Note: in V4 the names have change and its rather "root.mod1.solid.rho" or just "solid.rho" that should be used (the translation of mat1 I do not know, would have to look up the internal equations see preferences in V4) Is this clearer ? Hope so Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 juin 2010, 10:04 UTC−4
Hi Ivar,

Yes, this was clearer but my problem is actually slightly different, I think. What I want to do is to have an expression which is a fixed relation between two materials, say the ratio of the densities of materials 1 and 2. I then want to use this expression in my simulation. Based on the documentation I thought that mat1_rho/mat2_rho would do the trick but this is not the case. I guess this should be something very basic but I can't get this to work.

With kind regards,

Klas
Hi Ivar, Yes, this was clearer but my problem is actually slightly different, I think. What I want to do is to have an expression which is a fixed relation between two materials, say the ratio of the densities of materials 1 and 2. I then want to use this expression in my simulation. Based on the documentation I thought that mat1_rho/mat2_rho would do the trick but this is not the case. I guess this should be something very basic but I can't get this to work. With kind regards, Klas

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 24 juin 2010, 10:28 UTC−4
Hi

I forgot to say that all variables are not shown in the physics _equeation settings, you must turn on the "Options preferences modelling tab, Include default values". and then save the file as a .M file to get most of the names explicitly out.

OK, I expeceted that you wanted something trickier, but I wasnt really shure

One trick, when I need to check formulas, I usually get the initial values (to populate all matrices with initial values and check model coherence) then I use the postprocessing Point evaluation of any point. Then I play with my formulas until I'm happy, jsut to copy and paste them into the right field somewhere else usually in boundary conditions GUI fields.

Clear you can define a GLOBAL scalar expression rho_ratio=mat1_rho/mat2_rho but this is a sort of constant (note you cannot define it as a "CONSTANT" because the "mat1..." are not defined yet when the Constants are evaluated, (these are evaluated only once at the beginning of a run for 3.5a, parameters seem to be slightly different in V4 TBC)
This allows you to define initial values for variables suc as Param sweep items, even "t" the time when not in transient mode (useful to avoid retyping complex expressions) .

Are you doing some type of optimisation getting the optimum density for a given model ? in which case you should rather define a Global Expression, or subdomain expression (depending on the links you want to the model and then set your density or whatever variable as a true comsol depepndent variable and solve it such to get a least-square optimisation, for single variables, there is no need to use the "optimisation module", it's all inside the basic COMSOL

Have fun Comsoling
Ivar
Hi I forgot to say that all variables are not shown in the physics _equeation settings, you must turn on the "Options preferences modelling tab, Include default values". and then save the file as a .M file to get most of the names explicitly out. OK, I expeceted that you wanted something trickier, but I wasnt really shure One trick, when I need to check formulas, I usually get the initial values (to populate all matrices with initial values and check model coherence) then I use the postprocessing Point evaluation of any point. Then I play with my formulas until I'm happy, jsut to copy and paste them into the right field somewhere else usually in boundary conditions GUI fields. Clear you can define a GLOBAL scalar expression rho_ratio=mat1_rho/mat2_rho but this is a sort of constant (note you cannot define it as a "CONSTANT" because the "mat1..." are not defined yet when the Constants are evaluated, (these are evaluated only once at the beginning of a run for 3.5a, parameters seem to be slightly different in V4 TBC) This allows you to define initial values for variables suc as Param sweep items, even "t" the time when not in transient mode (useful to avoid retyping complex expressions) . Are you doing some type of optimisation getting the optimum density for a given model ? in which case you should rather define a Global Expression, or subdomain expression (depending on the links you want to the model and then set your density or whatever variable as a true comsol depepndent variable and solve it such to get a least-square optimisation, for single variables, there is no need to use the "optimisation module", it's all inside the basic COMSOL Have fun Comsoling Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 déc. 2010, 13:32 UTC−5
I think I am stuck on the same type of problem. I am using ver 4.1. I have "Carbon dioxide", "Nitrogen" and "Oxygen" from the Materials Browser in the Materials section of my model. Carbon dioxide has the "mat1" tag. I would like to combine the Cp's from the different gases to get a weighted average. In Model1>Definitions>Variables 1 I have created Name=Cp_gas, Expression=mat1.Cp(T[1/K])*w_CO2+mat2.Cp(T[1/K])*w_N2. The Variables 1 module accepts my input - no errors or warnings. However, when I try to solve, the iterative segregated solver has Error=Unknown function Name: mat1.Cp I have tried several variations: mat.Cp, mat1.Cp, mat1_Cp. I have also tried replacing the default name in the Materials section (such as Cp_CO2). The solver does not seem to recognize the function name from the Materials section. How do I call out those functions in the Materials section?

Version 4.1 does not seem to be able to save an M-file as was suggested above.
I think I am stuck on the same type of problem. I am using ver 4.1. I have "Carbon dioxide", "Nitrogen" and "Oxygen" from the Materials Browser in the Materials section of my model. Carbon dioxide has the "mat1" tag. I would like to combine the Cp's from the different gases to get a weighted average. In Model1>Definitions>Variables 1 I have created Name=Cp_gas, Expression=mat1.Cp(T[1/K])*w_CO2+mat2.Cp(T[1/K])*w_N2. The Variables 1 module accepts my input - no errors or warnings. However, when I try to solve, the iterative segregated solver has Error=Unknown function Name: mat1.Cp I have tried several variations: mat.Cp, mat1.Cp, mat1_Cp. I have also tried replacing the default name in the Materials section (such as Cp_CO2). The solver does not seem to recognize the function name from the Materials section. How do I call out those functions in the Materials section? Version 4.1 does not seem to be able to save an M-file as was suggested above.

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 10 déc. 2010, 01:37 UTC−5
Hi

have you tried to do a "mat1." search on the forum AND on the KB ? there are more info there, if I remember well some of the COMSOL developpers have also given som tricks earlier

--
Good luck
Ivar
Hi have you tried to do a "mat1." search on the forum AND on the KB ? there are more info there, if I remember well some of the COMSOL developpers have also given som tricks earlier -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 déc. 2010, 03:00 UTC−5
Hi,

The correct syntax in version 4 is

Name=Cp_gas, Expression=mat1.def.Cp(T[1/K])*w_CO2+mat2.def.Cp(T[1/K])*w_N2

The syntax uses the tags for the nodes in the Material branch: The materials' top nodes have the tags "mat1", "mat2", and so on, and Cp resides in the Basic subbranch, which has the tag "def". You can see the tags for each node in the model tree by right-clicking the node and selecting Properties. Right-click and select Settings to return to the Settings window.

Best regards,
Magnus Ringh, COMSOL
Hi, The correct syntax in version 4 is Name=Cp_gas, Expression=mat1.def.Cp(T[1/K])*w_CO2+mat2.def.Cp(T[1/K])*w_N2 The syntax uses the tags for the nodes in the Material branch: The materials' top nodes have the tags "mat1", "mat2", and so on, and Cp resides in the Basic subbranch, which has the tag "def". You can see the tags for each node in the model tree by right-clicking the node and selecting Properties. Right-click and select Settings to return to the Settings window. Best regards, Magnus Ringh, COMSOL

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 10 déc. 2010, 03:35 UTC−5
Hi Magnus

Once again this morning, should have remembered that ;)

--
Good luck
Ivar
Hi Magnus Once again this morning, should have remembered that ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 août 2011, 16:47 UTC−4
I tried this, (I also have V4) but it says that T is undefined.
I am using a pressure acoustics module, and T is defined in the Pressure Acoustics Model 1, so I tried to assign T as acpr.pam1.T but it did not work. is there a way to create a variable for T like there is for Cp?

Thanks


Hi,

The correct syntax in version 4 is

Name=Cp_gas, Expression=mat1.def.Cp(T[1/K])*w_CO2+mat2.def.Cp(T[1/K])*w_N2

The syntax uses the tags for the nodes in the Material branch: The materials' top nodes have the tags "mat1", "mat2", and so on, and Cp resides in the Basic subbranch, which has the tag "def". You can see the tags for each node in the model tree by right-clicking the node and selecting Properties. Right-click and select Settings to return to the Settings window.

Best regards,
Magnus Ringh, COMSOL


I tried this, (I also have V4) but it says that T is undefined. I am using a pressure acoustics module, and T is defined in the Pressure Acoustics Model 1, so I tried to assign T as acpr.pam1.T but it did not work. is there a way to create a variable for T like there is for Cp? Thanks [QUOTE] Hi, The correct syntax in version 4 is Name=Cp_gas, Expression=mat1.def.Cp(T[1/K])*w_CO2+mat2.def.Cp(T[1/K])*w_N2 The syntax uses the tags for the nodes in the Material branch: The materials' top nodes have the tags "mat1", "mat2", and so on, and Cp resides in the Basic subbranch, which has the tag "def". You can see the tags for each node in the model tree by right-clicking the node and selecting Properties. Right-click and select Settings to return to the Settings window. Best regards, Magnus Ringh, COMSOL [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 déc. 2011, 14:15 UTC−5
I was trying a similar thing to use gravity as a body force, and to access density I just typed:
"mat1.def.rho" with no temperature T specified. This worked for me
I was trying a similar thing to use gravity as a body force, and to access density I just typed: "mat1.def.rho" with no temperature T specified. This worked for me

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 14 déc. 2011, 15:43 UTC−5
Hi

you should check how the material properties are defined, if its a constant no need for T nor p, if its a function piecewise or other, then you might need the call of (T) and/or (T,p)

you should also check the calling sequence, accessing directly the materials, outside from a domain or a boundary definition, requires to use the right naming convention, as this has greatly changed in the last versions, I would advise you to check the KB and the doc carefully, + validate it with some simple tests, but try to define several materials and to access the correct one, 2nd or 3rd or ...

--
Good luck
Ivar
Hi you should check how the material properties are defined, if its a constant no need for T nor p, if its a function piecewise or other, then you might need the call of (T) and/or (T,p) you should also check the calling sequence, accessing directly the materials, outside from a domain or a boundary definition, requires to use the right naming convention, as this has greatly changed in the last versions, I would advise you to check the KB and the doc carefully, + validate it with some simple tests, but try to define several materials and to access the correct one, 2nd or 3rd or ... -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 sept. 2012, 22:34 UTC−4

I want to contribute a little to this post, because for me it was very useful, the correct syntax for Comsol 4.2a is:

mod1.mat1.def.rho (T [1 / K])

thanks
I want to contribute a little to this post, because for me it was very useful, the correct syntax for Comsol 4.2a is: mod1.mat1.def.rho (T [1 / K]) thanks

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 30 sept. 2012, 08:16 UTC−4
Hi

in the latetr versions you also have a simpler access means by the "root.material.rho" variable name (at least for given physics) see p 392 of User manual 4.3, this is then independent of the physics selected, and allows easier for formula exchange between different models

the reference (T[1/K]) is only explicitely required if the variable T is NOT defined as a field T(x,y,z,t), because the true rho "field" access value is ...(x[1/m],y[1/m],z[1/m],t[1/s],T[1/K]) but normally the x,y,z are defined via the domain selection, t (if applicable) via the time instant, and T indirectly via the dependent variable field
T(x[1/m],y[1/m],z[1/m],t[1/s])

It took me quite some time to get really aquinted with these implicit field references in COMSOL, and for most advanced COMSOL users (and teachers) they are so logical, that they forget to tell about them ;)

--
Good luck
Ivar
Hi in the latetr versions you also have a simpler access means by the "root.material.rho" variable name (at least for given physics) see p 392 of User manual 4.3, this is then independent of the physics selected, and allows easier for formula exchange between different models the reference (T[1/K]) is only explicitely required if the variable T is NOT defined as a field T(x,y,z,t), because the true rho "field" access value is ...(x[1/m],y[1/m],z[1/m],t[1/s],T[1/K]) but normally the x,y,z are defined via the domain selection, t (if applicable) via the time instant, and T indirectly via the dependent variable field T(x[1/m],y[1/m],z[1/m],t[1/s]) It took me quite some time to get really aquinted with these implicit field references in COMSOL, and for most advanced COMSOL users (and teachers) they are so logical, that they forget to tell about them ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 juin 2013, 04:58 UTC−4
Hi,

I made a 'General form PDE', and defined 'Material' with el.conductivity in v43b. The default name for it is 'sigma' in the dialog box, but when I want to use 'sigma' in the equation definition Comsol says 'unknown variable'. Refering by 'mod1.mat1.def.sigma' or 'solid.sigma' doesn't work. Any ideas?

Thanks
Peter
Hi, I made a 'General form PDE', and defined 'Material' with el.conductivity in v43b. The default name for it is 'sigma' in the dialog box, but when I want to use 'sigma' in the equation definition Comsol says 'unknown variable'. Refering by 'mod1.mat1.def.sigma' or 'solid.sigma' doesn't work. Any ideas? Thanks Peter

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 juin 2013, 03:08 UTC−4
Hi,

The electrical conductivity is a tensor, so you need to access it using its components. For example,

mat1.def.sigma11

and

material.sigma11

both work (within a model, the mod1. prefix is not needed). For an isotropic electrical conductivity sigma, sigma11, sigma22, and sigma33 are all equal to sigma, and all other components are zero.

Best regards,
Magnus Ringh, COMSOL
Hi, The electrical conductivity is a tensor, so you need to access it using its components. For example, mat1.def.sigma11 and material.sigma11 both work (within a model, the mod1. prefix is not needed). For an isotropic electrical conductivity sigma, sigma11, sigma22, and sigma33 are all equal to sigma, and all other components are zero. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 juin 2013, 05:50 UTC−4
Thank you!!! Both ways of referring work.
Peter
Thank you!!! Both ways of referring work. Peter

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 15 sept. 2015, 12:30 UTC−4
Hi,

I'm trying to use Thermal conductivity and coefficient of thermal expansion of a material to built my own function in COMSOL 5.0.

I have typed in the expression of an analytic function:

1) comp1.mat1.alpha_solid_1(T[1/K])
2) root.comp1.mat1.alpha_solid_1(T[1/K])

but I have always the same error: "Unknown function or operator Name: comp1.mat1.alpha_solid_1"

How can I solve my problem ?

Best regards,

Marco
Hi, I'm trying to use Thermal conductivity and coefficient of thermal expansion of a material to built my own function in COMSOL 5.0. I have typed in the expression of an analytic function: 1) comp1.mat1.alpha_solid_1(T[1/K]) 2) root.comp1.mat1.alpha_solid_1(T[1/K]) but I have always the same error: "Unknown function or operator Name: comp1.mat1.alpha_solid_1" How can I solve my problem ? Best regards, Marco

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 16 sept. 2015, 15:42 UTC−4
Hi Marco,
I don't know, maybe try saving your model in .m or .java script (through save as) and search for your mat1.alpha string.
Peter
Hi Marco, I don't know, maybe try saving your model in .m or .java script (through save as) and search for your mat1.alpha string. Peter

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.