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.

INTEGER function

Please login with a confirmed email address before reporting spam

... does anybody know how to call INTEGER function in Comsol? I can't fint ...

8 Replies Last Post 29.03.2012, 08:05 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 23.11.2010, 05:30 GMT-5
Hi

good remark there seem to be no ceil(), floor(), integer() or frac(),
funny, have you asked "support" ?

--
Good luck
Ivar
Hi good remark there seem to be no ceil(), floor(), integer() or frac(), funny, have you asked "support" ? -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23.11.2010, 07:16 GMT-5
Hi,

abs, ceil, floor, and round exist among the built-in mathematical functions in COMSOL Multiphysics. I'm not sure what the definition of an integer function would be. COMSOL Multiphysics uses floating-point arithmetic.

Best regards,
Magnus Ringh, COMSOL
Hi, abs, ceil, floor, and round exist among the built-in mathematical functions in COMSOL Multiphysics. I'm not sure what the definition of an integer function would be. COMSOL Multiphysics uses floating-point arithmetic. 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 23.11.2010, 09:52 GMT-5
Hi Magnus

good to hear, I just couldnt find them in the V3.5a doc, didnt look at the right place ?,

I forgot to check in the V4 ) Now I see them there (p86, 87 CMPUserGuide.pdf v4.1)

--
Good luck
Ivar
Hi Magnus good to hear, I just couldnt find them in the V3.5a doc, didnt look at the right place ?, I forgot to check in the V4 ) Now I see them there (p86, 87 CMPUserGuide.pdf v4.1) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 09.02.2012, 03:32 GMT-5

Hi Magnus

good to hear, I just couldnt find them in the V3.5a doc, didnt look at the right place ?,

I forgot to check in the V4 ) Now I see them there (p86, 87 CMPUserGuide.pdf v4.1)

--
Good luck
Ivar


Hi Magnus, Ivar and others,

I came across this posting because I ran into situation where V 42a requires
and integer not a floating point and that is "Sector Symmetry" from "Rotating Machinery, Magnetic"
in the AC/DC module.

I want to define a global parameter to define the number of sectors 'nsect' and use this
parameter to define geometry and in "Sector symmetry". This does not work because
CMP complains about 'nsect' being a floating point number. How can I cast this
to an integer.

thanks for any ideas

regards

Jens
[QUOTE] Hi Magnus good to hear, I just couldnt find them in the V3.5a doc, didnt look at the right place ?, I forgot to check in the V4 ) Now I see them there (p86, 87 CMPUserGuide.pdf v4.1) -- Good luck Ivar [/QUOTE] Hi Magnus, Ivar and others, I came across this posting because I ran into situation where V 42a requires and integer not a floating point and that is "Sector Symmetry" from "Rotating Machinery, Magnetic" in the AC/DC module. I want to define a global parameter to define the number of sectors 'nsect' and use this parameter to define geometry and in "Sector symmetry". This does not work because CMP complains about 'nsect' being a floating point number. How can I cast this to an integer. thanks for any ideas regards Jens

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 09.02.2012, 03:42 GMT-5
Hi

have you checked the help/doc on operators such as ceil() and round() ?

But these make the solution spiky so depending on how you use the variable the solver might have issues getting derivatives

--
Good luck
Ivar
Hi have you checked the help/doc on operators such as ceil() and round() ? But these make the solution spiky so depending on how you use the variable the solver might have issues getting derivatives -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 09.02.2012, 03:45 GMT-5
Yes I did, but these functions return integer numbers in floating
point format and Comsol expect a real integer here.

Jens
Yes I did, but these functions return integer numbers in floating point format and Comsol expect a real integer here. Jens

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 09.02.2012, 03:59 GMT-5
Hi

good point, I would say then ask "support"

And report back ;)

--
Good luck
Ivar
Hi good point, I would say then ask "support" And report back ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29.03.2012, 08:05 GMT-4
Hi,

Comsol suppor told me that in the next release the entry for
the number of symmetry sectors accepts global parameters.


Regards

Jens
Hi, Comsol suppor told me that in the next release the entry for the number of symmetry sectors accepts global parameters. Regards Jens

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.