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.

Nanotubes of random height

Please login with a confirmed email address before reporting spam

Hi,

I would create nanotubes with different height using a random generator with this formula:

H = Hm + (1 - 2*rand)*Hm/2

In this way all nanotubes have an height of Hm +- Hm/2.

Since it is impossible setting this formula in the geometry node in the height of my cylinder(nanotubes), how i can do?

Thanks

5 Replies Last Post 5 giu 2017, 11:29 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 15 dic 2016, 17:13 GMT-5
Hello Roberto,
There are two basic ways of creating a random geometry for use in COMSOL:
a/ using MATLAB - This requires that your license includes LiveLink for MATLAB
b/ using an app - This requires that your license be version 4.4 or more recent and that you run the software on the Windows operating system.
You should be able to find thread discussing both approaches in the Discussion Forum, but you can also contact the COMSOL support team if your license is on subscription.
Best regards,
Jeff
Hello Roberto, There are two basic ways of creating a random geometry for use in COMSOL: a/ using MATLAB - This requires that your license includes LiveLink for MATLAB b/ using an app - This requires that your license be version 4.4 or more recent and that you run the software on the Windows operating system. You should be able to find thread discussing both approaches in the Discussion Forum, but you can also contact the COMSOL support team if your license is on subscription. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 3 gen 2017, 11:56 GMT-5
Thanks for the answer.

At the moment I resolve my problem using Matlab but without interfacing with Comsol. I only use it to generate random height for a subset of my carbon nanotube (cylinders). Then I multiply this subset in the 3D space through array function and generating random position with a matlab code.

Anyway i think that in my case matlab livelink could be not useful because I created my cylinders through array function. So i think that putting a random height in matlab code from livelink this number would be copied for every cylinder in the array. Am I wrong?

Best regard
Thanks for the answer. At the moment I resolve my problem using Matlab but without interfacing with Comsol. I only use it to generate random height for a subset of my carbon nanotube (cylinders). Then I multiply this subset in the 3D space through array function and generating random position with a matlab code. Anyway i think that in my case matlab livelink could be not useful because I created my cylinders through array function. So i think that putting a random height in matlab code from livelink this number would be copied for every cylinder in the array. Am I wrong? Best regard

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 4 feb 2017, 06:24 GMT-5
Hello Jeff,
I have been trying to include nanotubes within my thin film model and the nanotubes need to randomly distributed cylinders.
It would greatly help me if there is a prior model with some sort of random distribution used within to get a start off point for the same.
Please reply asap as im running on a clock.
Hello Jeff, I have been trying to include nanotubes within my thin film model and the nanotubes need to randomly distributed cylinders. It would greatly help me if there is a prior model with some sort of random distribution used within to get a start off point for the same. Please reply asap as im running on a clock.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 6 feb 2017, 08:41 GMT-5
I posted a model that generated a geometry through an application using a method in this thread:
www.comsol.com/community/forums/general/thread/133541
The geometry is not random, but by modifying the method you can easily make the size or the location of the cubes random, for instance.
Best,
Jeff
I posted a model that generated a geometry through an application using a method in this thread: https://www.comsol.com/community/forums/general/thread/133541 The geometry is not random, but by modifying the method you can easily make the size or the location of the cubes random, for instance. Best, Jeff

Walter Frei COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 5 giu 2017, 11:29 GMT-4
Hello,

You may also find this approach (new to version 5.3) helpful:
www.comsol.com/blogs/how-to-create-a-randomized-geometry-using-model-methods/

Best Regards,
Hello, You may also find this approach (new to version 5.3) helpful: https://www.comsol.com/blogs/how-to-create-a-randomized-geometry-using-model-methods/ Best Regards,

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.