paramak icon indicating copy to clipboard operation
paramak copied to clipboard

example for concentric layers of rings

Open shimwell opened this issue 4 years ago • 0 comments

We can make concentric rings with the following approach, perhaps we should have and example for this as it is useful for fission reactors and hex latices

import paramak

components = []
hexagon_length= 10
height = 5
channel_radius=5

for ring_number in range(3,13):
    total_number = 3*ring_number*(ring_number+1)+1
    number_in_previous_layers = 3*(ring_number-1)*ring_number+1
    number_in_layer=total_number-number_in_previous_layers

    component=paramak.CoolantChannelRingStraight(
        name=f'ring_number_{ring_number}',
        workplane="XY",
        rotation_axis="Z",
        height=height,
        channel_radius=channel_radius,
        number_of_coolant_channels=number_in_layer,
        start_angle=(360/number_in_layer)*(ring_number%2)/2,
        ring_radius=hexagon_length*ring_number,
        rotation_angle=180
    )
    
    components.append(component)

c= paramak.Reactor(components)
c.show()

shimwell avatar Mar 28 '22 17:03 shimwell