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.

"Error: Duplicate variable name."

Please login with a confirmed email address before reporting spam

I am using solid mechanics, electrostatics and moving mesh and I want to perform an Eigenfrequency Study. The solver crashes with an error message:

"Error: Duplicate variable name."

But I didn't find any variable names to duplicate.
Below is my file.


8 Replies Last Post Mar 28, 2017, 10:44 a.m. EDT
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 Feb 4, 2013, 9:54 a.m. EST
Hi

you should qvoid "short names" of one letter: d, t, w are all already used by COMSOL, use rather Width, Thick, Depth ...
--
Good luck
Ivar
Hi you should qvoid "short names" of one letter: d, t, w are all already used by COMSOL, use rather Width, Thick, Depth ... -- Good luck Ivar

Niklas Rom COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 4, 2013, 10:17 a.m. EST
I noticed that you run version 4.1. These types of problems have been fixed in later releases of COMSOL. Try to create the model in the current release (4.3b) and I am confident it will work.

Niklas
I noticed that you run version 4.1. These types of problems have been fixed in later releases of COMSOL. Try to create the model in the current release (4.3b) and I am confident it will work. Niklas

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 4, 2013, 11:00 a.m. EST
I changed the variable names, but the error remained.
Is there any possiblity to print a list of all variables that Comsol defines and uses during solving?


Here is the detailed log.
"
Duplicate variable name.
- Variable: x
- Variable: xTIME
- Variable: y
- Variable: yTIME
- Variable: z
- Variable: zTIME
- Variable: x
- Variable: xTIME
- Variable: xxi1
- Variable: xxi1xi1
- Variable: y
- Variable: yTIME
- Variable: yxi1
- Variable: yxi1xi1
- Variable: z
- Variable: zTIME
- Variable: zxi1
- Variable: zxi1xi1
- Variable: dnx
- Variable: dnxmesh
- Variable: dny
- Variable: dnymesh
- Variable: dnz
- Variable: dnzmesh
- Variable: nx

Not all errors printed. 228 errors in total.
"
I changed the variable names, but the error remained. Is there any possiblity to print a list of all variables that Comsol defines and uses during solving? Here is the detailed log. " Duplicate variable name. - Variable: x - Variable: xTIME - Variable: y - Variable: yTIME - Variable: z - Variable: zTIME - Variable: x - Variable: xTIME - Variable: xxi1 - Variable: xxi1xi1 - Variable: y - Variable: yTIME - Variable: yxi1 - Variable: yxi1xi1 - Variable: z - Variable: zTIME - Variable: zxi1 - Variable: zxi1xi1 - Variable: dnx - Variable: dnxmesh - Variable: dny - Variable: dnymesh - Variable: dnz - Variable: dnzmesh - Variable: nx Not all errors printed. 228 errors in total. "

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 Feb 5, 2013, 1:58 a.m. EST
Hi

check the model library and repeat some of the ALE meshing examples, you have not defined enough conditions up there, the solid beam should be limited to the one moving, the ALE needs to have a prescribed deformation, on the boundaries in contact with the solid beam moving as u,v,w

It takes some time and tries to get an ALE correctly set-up

--
Good luck
Ivar
Hi check the model library and repeat some of the ALE meshing examples, you have not defined enough conditions up there, the solid beam should be limited to the one moving, the ALE needs to have a prescribed deformation, on the boundaries in contact with the solid beam moving as u,v,w It takes some time and tries to get an ALE correctly set-up -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 11:30 a.m. EST
Hi Ivar,

I found an older thread on ALE, where you gave a step-by-step instruction on defining a moving mesh together with solid mechanics and electrostatics.
www.comsol.com/community/forums/general/thread/26401/
I followed all steps (except the initial compressive force on the capacitor plates) and I got the same error message
"Error: Duplicate variable name."
Hi Ivar, I found an older thread on ALE, where you gave a step-by-step instruction on defining a moving mesh together with solid mechanics and electrostatics. http://www.comsol.com/community/forums/general/thread/26401/ I followed all steps (except the initial compressive force on the capacitor plates) and I got the same error message "Error: Duplicate variable name."


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 Feb 6, 2013, 4:27 a.m. EST
Hi

Well 4.1 was still an early version, I'm running 4.3a, here is what I have to do with your model to get it running (but still not correct results)

Restrict the ES to only the air, since there is no conduction ongoing in ES neither in your beams
in ES add a domain Force calculation node for the entire air domain
Add a boundary load in the SOLID apply it to the two electrode surfaces (the same as the GND and Terminal), select "User defined" and change to "Maxwell surface tress tensor" (without this there is no force coupling between ES and SOLID)

I'm using a far denser mesh, at least 3 elements across each "thin feature) you can do this by applying "layers " to your rectangles (i.e. use 2 of gap/2), your beam is split in two but the mesh will then become denser by a factor of 3

And do not forget your depth is still 1 meter long in Z (you can change that in the Solid AND ES)

But even with this the convergence plots are swinging greatly between 2 values as if there is a BC missing (no unique solution), it converges though if I use the new "Double Dogleg" solver but the results are not satisfactory, there is no force from the ES

Now when I re-create rapidly the model with EMI physics (probably not implemented in 4.1) it converges well and give reasonable results

I remade your model fresh, but I'm get the same issue with the ALE, SOLID, ES so I'm too missing something here ;)

============= Update:
I got it running (your model in my 4.3a). Its the boundary loads in the solid, you must use "user defined"
es.unTex
es.unTey

the "un" are the upper (outwards from the air domain, hence into the solid) surface stress tensor

It could be linked to the fact that there is only one domain with forces calculation and then the default Maxwell tensor coupling is not taking the correct direction vector ? Anyhow there has been several improvements between 4.1 and 4.3a so there might well be other issues too but at least the EMI and 3 combined physics give the same results

--
Good luck
Ivar
Hi Well 4.1 was still an early version, I'm running 4.3a, here is what I have to do with your model to get it running (but still not correct results) Restrict the ES to only the air, since there is no conduction ongoing in ES neither in your beams in ES add a domain Force calculation node for the entire air domain Add a boundary load in the SOLID apply it to the two electrode surfaces (the same as the GND and Terminal), select "User defined" and change to "Maxwell surface tress tensor" (without this there is no force coupling between ES and SOLID) I'm using a far denser mesh, at least 3 elements across each "thin feature) you can do this by applying "layers " to your rectangles (i.e. use 2 of gap/2), your beam is split in two but the mesh will then become denser by a factor of 3 And do not forget your depth is still 1 meter long in Z (you can change that in the Solid AND ES) But even with this the convergence plots are swinging greatly between 2 values as if there is a BC missing (no unique solution), it converges though if I use the new "Double Dogleg" solver but the results are not satisfactory, there is no force from the ES Now when I re-create rapidly the model with EMI physics (probably not implemented in 4.1) it converges well and give reasonable results I remade your model fresh, but I'm get the same issue with the ALE, SOLID, ES so I'm too missing something here ;) ============= Update: I got it running (your model in my 4.3a). Its the boundary loads in the solid, you must use "user defined" es.unTex es.unTey the "un" are the upper (outwards from the air domain, hence into the solid) surface stress tensor It could be linked to the fact that there is only one domain with forces calculation and then the default Maxwell tensor coupling is not taking the correct direction vector ? Anyhow there has been several improvements between 4.1 and 4.3a so there might well be other issues too but at least the EMI and 3 combined physics give the same results -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 24, 2014, 5:26 a.m. EDT
Hi, I am simulating a similar problem (in version 4.1) and I get the same error.

Are You sure that the Interfaces always have to be added in this order: ALE-Solid-ES ? In the ''ale_cantilever_beam_3d'' example for version 3.5 the interfaces are added in an order: Solid-ALE-ES which works on version 4.1. Do You think these results are wrong?

I was looking for a model with these coupled physics for 4.1 version but I can't find anything. Could anybody upload such an example which works on this version? I was trying all your hints but I still get this error.

Best regards
Hi, I am simulating a similar problem (in version 4.1) and I get the same error. Are You sure that the Interfaces always have to be added in this order: ALE-Solid-ES ? In the ''ale_cantilever_beam_3d'' example for version 3.5 the interfaces are added in an order: Solid-ALE-ES which works on version 4.1. Do You think these results are wrong? I was looking for a model with these coupled physics for 4.1 version but I can't find anything. Could anybody upload such an example which works on this version? I was trying all your hints but I still get this error. Best regards

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Mar 28, 2017, 10:44 a.m. EDT
Hi, have you solve the problem? I have the same error with you
Hi, have you solve the problem? I have the same error with you

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.