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.

Randomise theta and phi angles of column geometry?

for Excel®
, LiveLink for MATLAB, Geometry, Modeling Tools & Definitions, Parameters, Variables, & Functions Version 5.4 2 Replies

Please login with a confirmed email address before reporting spam

Hi. I plan to design a model geometry composed of an array of simple columns (or simply vector lines, whichever is easier) where each column has a randomized tilt.

Questions:

  1. Is there a log/immediate window where I can test operators? The description in the help for the random (normal and uniform) operators are very limited with no description of what the variables do and I initially had some trouble getting them to work properly for building geometry.
  2. What is the best documentation/tutorial/sample model on how to build custom functions? I will want theta to be randomized from a normal distribution around 2, with the additional condition that it can never be less than two.

Mvh Milum



2 Replies Last Post 17 giu 2019, 13:48 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 17 giu 2019, 13:14 GMT-4
Updated: 5 years ago 17 giu 2019, 13:11 GMT-4

Hello Mikael,

Here is a blog that should help you get going with creating your randomized geometry.

Best regards,

Jeff

-------------------
Jeff Hiller
Hello Mikael, Here is a [blog](https://www.comsol.com/blogs/how-to-create-a-randomized-geometry-using-model-methods/) that should help you get going with creating your randomized geometry. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 17 giu 2019, 13:48 GMT-4
Updated: 5 years ago 17 giu 2019, 13:48 GMT-4

Thank you. I found the example with the cheese just after I posted, and I think I can progress using the record methods approach.

I updated the post to the more relevant remaining questions, in particular how I can test functions and operators in something akin to an immediate window?

Maybe its simpler to just write the functions in matlab and link them.

Thank you. I found the example with the cheese just after I posted, and I think I can progress using the record methods approach. I updated the post to the more relevant remaining questions, in particular how I can test functions and operators in something akin to an immediate window? Maybe its simpler to just write the functions in matlab and link them.

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.