You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/tutorial1.jl
+24-29Lines changed: 24 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -31,86 +31,81 @@ materials with their standard properties.
31
31
materials_db =MaterialsLibrary()
32
32
33
33
# Inspect the contents of the materials library:
34
-
df_initial =list_materialslibrary(materials_db)
34
+
df_initial =DataFrame(materials_db)
35
35
36
36
#=
37
-
The function [`list_materialslibrary`](@ref) returns a `DataFrame` with all materials and their properties, namely: electrical resistivity, relative permittivity, relative permeability, reference temperature, and temperature coefficient.
37
+
The function [`DataFrame`](@ref) returns a `DataFrame` with all materials and their properties, namely: electrical resistivity, relative permittivity, relative permeability, reference temperature, and temperature coefficient.
38
38
=#
39
39
40
40
# ## Adding new materials
41
41
#=
42
42
!!! note "Note"
43
-
New materials can be added to the library using the [`Material`](@ref) constructor followed by [`store_materialslibrary!`](@ref).
43
+
New materials can be added to the library using the [`Material`](@ref) constructor followed by [`add!`](@ref).
44
44
45
45
It might be useful to add other conductor materials with corrected properties based on recognized standards [cigre531](@cite) [IEC60287](@cite).
46
46
=#
47
47
48
48
copper_corrected =Material(1.835e-8, 1.0, 0.999994, 20.0, 0.00393) # Copper with corrected resistivity from IEC 60287-3-2
When modeling cables for EMT analysis, one might be concerned with the impact of insulators and semiconductive layers on cable constants. Common insulation materials and semicons with different dielectric properties are reported in Table 6 of [cigre531](@cite). Let us include some of these materials in the [`MaterialsLibrary`](@ref) to help our future selves.
To load from an existing JSON file, instantiate a new [`MaterialsLibrary`](@ref) followed by a call to the [`load_materialslibrary!`](@ref) method. Materials can be retrieved from the library using the [`get_material`](@ref) function.
100
+
To load from an existing JSON file, instantiate a new [`MaterialsLibrary`](@ref) followed by a call to the [`load!`](@ref) method. Materials can be retrieved from the library using the [`get`](@ref) function.
104
101
=#
105
102
106
103
# Initialize a new [`MaterialsLibrary`](@ref) and load from the JSON file:
The [`addto_conductorgroup!`](@ref) method internally passes the `radius_ext` of the existing object to the `radius_in` argument of the new conductor. This enables easy stacking of multiple layers without redundancy. Moreover, the [`Diameter`](@ref) method is a convenience function that converts the diameter to radius at the constructor level. This maintains alignment with manufacturer specifications while enabling internal calculations to use radius values directly. This approach eliminates repetitive unit conversions and potential sources of implementation error.
199
+
The [`add!`](@ref) method internally passes the `radius_ext` of the existing object to the `radius_in` argument of the new conductor. This enables easy stacking of multiple layers without redundancy. Moreover, the [`Diameter`](@ref) method is a convenience function that converts the diameter to radius at the constructor level. This maintains alignment with manufacturer specifications while enabling internal calculations to use radius values directly. This approach eliminates repetitive unit conversions and potential sources of implementation error.
200
200
=#
201
201
202
202
# Add the subsequent layers of wires and inspect the object:
To facilitate data entry, it is possible to call the [`addto_cabledesign!`](@ref) method directly on the [`ConductorGroup`](@ref) and [`InsulatorGroup`](@ref) constituents of the component to include, without instantiating the [`CableComponent`](@ref) first.
329
+
To facilitate data entry, it is possible to call the [`add!`](@ref) method directly on the [`ConductorGroup`](@ref) and [`InsulatorGroup`](@ref) constituents of the component to include, without instantiating the [`CableComponent`](@ref) first.
Designs can be saved to a library for future use. The [`CablesLibrary`](@ref) is a container for storing multiple cable designs, allowing for easy access and reuse in different projects. Library management is performed using the [`list_cableslibrary`](@ref), [`store_cableslibrary!`](@ref), and [`save_cableslibrary`](@ref) functions.
357
+
Designs can be saved to a library for future use. The [`CablesLibrary`](@ref) is a container for storing multiple cable designs, allowing for easy access and reuse in different projects. Library management is performed using the [`DataFrame`](@ref), [`add!`](@ref), and [`save`](@ref) functions.
358
358
=#
359
359
360
360
# Store the cable design and inspect the library contents:
The [`addto_linecablesystem!`](@ref) function allows the specification of phase mapping for each cable. The `Dict` argument maps the cable components to their respective phases, where `core` is the conductor, `sheath` is the screen, and `jacket` is the outer jacket. The values (1, 2, 3) represent the phase numbers (A, B, C) in this case. Components mapped to phase 0 will be Kron-eliminated (grounded). Components set to the same phase will be bundled into an equivalent phase.
418
+
The [`add!`](@ref) function allows the specification of phase mapping for each cable. The `Dict` argument maps the cable components to their respective phases, where `core` is the conductor, `sheath` is the screen, and `jacket` is the outer jacket. The values (1, 2, 3) represent the phase numbers (A, B, C) in this case. Components mapped to phase 0 will be Kron-eliminated (grounded). Components set to the same phase will be bundled into an equivalent phase.
418
419
=#
419
420
420
421
#=
@@ -424,10 +425,10 @@ In this section the complete three-phase cable system is examined.
424
425
=#
425
426
426
427
# Display system details:
427
-
system_df =to_df(cable_system)
428
+
system_df =DataFrame(cable_system)
428
429
429
430
# Visualize the cross-section of the three-phase system:
0 commit comments