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.

Drawing a piece of two spheres by specifying the spherical coordinates' ranges

Please login with a confirmed email address before reporting spam

Hello everyone, I'd like to draw two concentric spheres by specifying the ranges of the spherical coordinates (0.118 m < r 0.236 m, 0 < theta < pi, 0 < phy < pi/2). So far I created two spheres, but I've some difficult to select the range of the spherical coordinates.

Thank you for your time.



4 Replies Last Post Oct 19, 2023, 1:53 p.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 months ago Oct 19, 2023, 11:31 a.m. EDT
Updated: 6 months ago Oct 19, 2023, 11:36 a.m. EDT

Hello Leonardo,

What you did in that screenshot is that you rotated the axis of the sphere; this is why you are not getting the output you expected.

As a side note, you are specifying those rotation angles in degrees right now: notice the "deg" unit to the right of those two text fields.

I assume that you want the angles theta to be between 0 and pi radian and phi to be between 0 and pi/2 radian, i.e. you would like to build a quarter of spheres. If so, you can achieve that by adding a couple of blocks in the geometry and using boolean operations to remove from the geometry the parts of the spheres that overlap with the blocks.

Best regards,

Jeff

-------------------
Jeff Hiller
Hello Leonardo, What you did in that screenshot is that you rotated the axis of the sphere; this is why you are not getting the output you expected. As a side note, you are specifying those rotation angles in **degrees** right now: notice the "deg" unit to the right of those two text fields. I assume that you want the angles theta to be between 0 and pi **radian** and phi to be between 0 and pi/2 **radian**, i.e. you would like to build a quarter of spheres. If so, you can achieve that by adding a couple of blocks in the geometry and using boolean operations to remove from the geometry the parts of the spheres that overlap with the blocks. Best regards, Jeff

Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 6 months ago Oct 19, 2023, 11:34 a.m. EDT
Updated: 6 months ago Oct 19, 2023, 11:41 a.m. EDT

There is more than one way to do this. But since you are interested in angle ranges that correspond to axes, this is really quite simple. 1. Create a sphere (volume) with the outer radius. 2. Create a sphere (volume) with the inner radius. 3. Using a Boolean operation (Difference), subtract the smaller sphere from the larger sphere. This gives you a spherical shell. (Alternatively, you can employ Layers, within the Sphere setting.) 4. Create a rectangular Block (Note: default has corner at the origin, but can be changed). 5. Using a Boolean operation (Intersection), intersect the block with your spherical shell. If you do all this correctly, you're done.

Alternatively, you could specify a workplane, create two circles (areas), take the difference, and revolve that into 3D space, appropriately. Note that in the workplane, you can specify angle constraints on the circles if you want (making them more like pie-wedges than circles).

There are other more generally-applicable methods you could apply, but your shape is so simple that I wouldn't bother to try those here.

Ah, I see that Jeff got to this one just before me. :)

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
There is more than one way to do this. But since you are interested in angle ranges that correspond to axes, this is really quite simple. 1. Create a sphere (volume) with the outer radius. 2. Create a sphere (volume) with the inner radius. 3. Using a Boolean operation (Difference), subtract the smaller sphere from the larger sphere. This gives you a spherical shell. (Alternatively, you can employ Layers, within the Sphere setting.) 4. Create a rectangular Block (Note: default has corner at the origin, but can be changed). 5. Using a Boolean operation (Intersection), intersect the block with your spherical shell. If you do all this correctly, you're done. Alternatively, you could specify a workplane, create two circles (areas), take the difference, and revolve that into 3D space, appropriately. Note that in the workplane, you can specify angle constraints on the circles if you want (making them more like pie-wedges than circles). There are other more generally-applicable methods you could apply, but your shape is so simple that I wouldn't bother to try those here. Ah, I see that Jeff got to this one just before me. :)

Please login with a confirmed email address before reporting spam

Posted: 6 months ago Oct 19, 2023, 11:52 a.m. EDT
Updated: 6 months ago Oct 19, 2023, 12:34 p.m. EDT

There is more than one way to do this. But since you are interested in angle ranges that correspond to axes, this is really quite simple. 1. Create a sphere (volume) with the outer radius. 2. Create a sphere (volume) with the inner radius. 3. Using a Boolean operation (Difference), subtract the smaller sphere from the larger sphere. This gives you a spherical shell. (Alternatively, you can employ Layers, within the Sphere setting.) 4. Create a rectangular Block (Note: default has corner at the origin, but can be changed). 5. Using a Boolean operation (Intersection), intersect the block with your spherical shell. If you do all this correctly, you're done.

Alternatively, you could specify a workplane, create two circles (areas), take the difference, and revolve that into 3D space, appropriately. Note that in the workplane, you can specify angle constraints on the circles if you want (making them more like pie-wedges than circles).

There are other more generally-applicable methods you could apply, but your shape is so simple that I wouldn't bother to try those here.

Ah, I see that Jeff got to this one just before me. :)

Hello @RobertKoslover thank you very much for your reply; I did the intersection between a rectangular block and the rest so that the result is half sphere; now do I need a new block to remove hal f of the half sphere (see image please)?

>There is more than one way to do this. But since you are interested in angle ranges that correspond to axes, this is really quite simple. >1. Create a sphere (volume) with the outer radius. >2. Create a sphere (volume) with the inner radius. >3. Using a Boolean operation (Difference), subtract the smaller sphere from the larger sphere. This gives you a spherical shell. (Alternatively, you can employ Layers, within the Sphere setting.) >4. Create a rectangular Block (Note: default has corner at the origin, but can be changed). >5. Using a Boolean operation (Intersection), intersect the block with your spherical shell. >If you do all this correctly, you're done. > >Alternatively, you could specify a workplane, create two circles (areas), take the difference, and revolve that into 3D space, appropriately. Note that in the workplane, you can specify angle constraints on the circles if you want (making them more like pie-wedges than circles). > >There are other more generally-applicable methods you could apply, but your shape is so simple that I wouldn't bother to try those here. > >Ah, I see that Jeff got to this one just before me. :) Hello @RobertKoslover thank you very much for your reply; I did the intersection between a rectangular block and the rest so that the result is half sphere; now do I need a new block to remove hal f of the half sphere (see image please)?


Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 6 months ago Oct 19, 2023, 1:53 p.m. EDT
Updated: 6 months ago Oct 19, 2023, 1:47 p.m. EDT

You're welcome. If you want (or need) to cut it in half again, go ahead. You can make as many blocks (or other shapes) and apply as many Boolean intersections (or other) operations as you wish.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
You're welcome. If you want (or need) to cut it in half again, go ahead. You can make as many blocks (or other shapes) and apply as many Boolean intersections (or other) operations as you wish.

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.