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 Mar 29, 2012, 8:05 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 Nov 23, 2010, 5:30 a.m. EST
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 Nov 23, 2010, 7:16 a.m. EST
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 Nov 23, 2010, 9:52 a.m. EST
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 Feb 9, 2012, 3:32 a.m. EST

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 Feb 9, 2012, 3:42 a.m. EST
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 Feb 9, 2012, 3:45 a.m. EST
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 Feb 9, 2012, 3:59 a.m. EST
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 Mar 29, 2012, 8:05 a.m. EDT
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.