docs: Revised the node/socket plan.

Sofus Albert Høgsbro Rose 2024-02-16 13:17:09 +01:00
parent e1e7b7f3be
commit 94c4ef4a73
1 changed files with 143 additions and 92 deletions

225
README.md
View File

@ -1,7 +1,7 @@
# Node Design # Node Design
Now that we can do all the cool things ex. presets and such, it's time to think more design. Now that we can do all the cool things ex. presets and such, it's time to think more design.
## Categories ## Nodes
**NOTE**: Throughout, when an object can be selected (ex. for GeoNodes structure to affect), a button should be available to generate a new object for the occasion. **NOTE**: Throughout, when an object can be selected (ex. for GeoNodes structure to affect), a button should be available to generate a new object for the occasion.
**NOTE**: Throughout, all nodes that output floats/vectors should have a sympy dimension. Any node that takes floats/vectors should either have a pre-defined unit (exposed as a string in the node UI), or a selectable unit (ex. for value inputs). **NOTE**: Throughout, all nodes that output floats/vectors should have a sympy dimension. Any node that takes floats/vectors should either have a pre-defined unit (exposed as a string in the node UI), or a selectable unit (ex. for value inputs).
@ -10,61 +10,37 @@ Now that we can do all the cool things ex. presets and such, it's time to think
- Scene - Scene
- Time - Time
- Object Info - Object Info
- Parameter
- Float Parameter
- Complex Parameter
- Vec3 Parameter
- Constant
- Scientific Constant
- Float Constant
- Complex Constant
- 3-Vector Constant
- Array
- Element: Create a 1-element array, with a typed value.
- Float Array Element
- Complex Array Element
- 3-Vector Array Element
- Union: Concatenate two arrays.
- Float Array Union
- Complex Array Union
- 3-Vector Array Union
- Dictionary
- Element: Create a 1-element (typed) dictionary, with a string and a typed value.
- Float Dict Element
- Complex Dict Element
- 3-Vector Dict Element
- Union: Concatenate two dictionaries.
- Float Dict Element
- Complex Dict Element
- 3-Vector Dict Element
- Field
- Float Field
- Complex Field
- Vec3 Field
- Parameter: Sympy variables.
- *type* Parameter
- Constant: Typed numbers.
- Scientific Constant
- *type* Constant
- Array
- From File: Concatenate two arrays.
- *type* Array Union
- Element: Create a 1-element array, with a typed value.
- *type* Array Element
- File Data: Data from a file.
- *type* File Data
- Outputs - Outputs
- Viewer - Viewer
- Value Viewer: Live-monitor non-special types. - Value Viewer: Live-monitoring.
- Console Viewer: Print to console with button. - Console Viewer: w/Button to Print Types
- Exporter - Exporter
- JSON File Export - JSON File Export: Compatible with any socket implementing `.as_json()`.
- Plot
- Viz - *various kinds of plotting? To Blender datablocks primarily, maybe*.
- Temporal Shape Viz: Some kind of plot (animated) of the shape.
- Source Viz: 3D
- Structure Viz
- Bound Viz
- FDTD Viz
- Sources - Sources
- **ALL**: Accept a Temporal Shape
- Temporal Shapes - Temporal Shapes
- Gaussian Pulse Temporal Shape - Gaussian Pulse Temporal Shape
- Continuous Wave Temporal Shape - Continuous Wave Temporal Shape
- Data Driven Temporal Shape - Array Temporal Shape
- Modelled
- Point Dipole Source - Point Dipole Source
- Uniform Current Source - Uniform Current Source
- Plane Wave Source - Plane Wave Source
@ -73,16 +49,15 @@ Now that we can do all the cool things ex. presets and such, it's time to think
- Astigmatic Gaussian Beam Source - Astigmatic Gaussian Beam Source
- TFSF Source - TFSF Source
- Data-Driven - E/H Equivalence Array Source
- E/H Equivalence Source - E/H Array Source
- E/H Source
- Mediums - Mediums
- **NOTE**: Mediums should optionally accept a spatially varying field. If not, the medium should be considered spatially uniform. - **ALL**: Accept spatial field. Else, spatial uniformity.
- **NOTE**: Mediums should optionally accept non-linear effects, either individually or summed using Non-Linear / Operations / Add. - **ALL**: Accept non-linearity. Else, linear.
- **NOTE**: Mediums should optionally accept space-time modulation effects, either individually or summed using Non-Linear / Operations / Add. - **ALL**: Accept space-time modulation. Else, static.
- Library Medium - Library Medium
- **NOTE**: Should provide an EnumProperty of materials with its own categorizations. It should provide another EnumProperty to choose the experiment. It should also be filterable by wavelength range, maybe also model info. Finally, a reference should be generated on use as text. - **NOTE**: Should provide an EnumProperty of materials with its own categorizations. It should provide another EnumProperty to choose the experiment. It should also be filterable by wavelength range, maybe also model info. Finally, a reference should be generated on use as text.
@ -108,15 +83,14 @@ Now that we can do all the cool things ex. presets and such, it's time to think
- Space/Time \epsilon/\mu Modulation - Space/Time \epsilon/\mu Modulation
- Structures - Structures
- TriMesh Structure - Object Structure
- GeoNodes Structure
- Scripted Structure
- Primitives - Primitives
- Box Structure - Box Structure
- Sphere Structure - Sphere Structure
- Cylinder Structure - Cylinder Structure
- Generated
- GeoNodes Structure: Takes dict, compute geonode tree on new object.
- Scripted Structure: Python script generating geometry.
@ -124,7 +98,7 @@ Now that we can do all the cool things ex. presets and such, it's time to think
- Bound Box - Bound Box
- Bound Faces - Bound Faces
- PML Bound Face: Should have an option to switch to "stable". - PML Bound Face: "Normal"/"Stable"
- PEC Bound Face - PEC Bound Face
- PMC Bound Face - PMC Bound Face
@ -134,18 +108,15 @@ Now that we can do all the cool things ex. presets and such, it's time to think
- Monitors - Monitors
- **NOTE**: Some/all should have dropdown to choose between a single (aka. steady-state) monitoring at the end of the simulation, or a continuous / animated (aka. movie) monitoring over the course of the whole simulation. - **ALL**: "Steady-State" / "Time Domain" (only if relevant).
- **TODO**: "Modal" solver monitoring (seems to be some kind of spatial+frequency feature, which an EM field can be decomposed into using a specially configured solver, which can be used to look for very particular kinds of effects by constraining investigations of a solver result to filter out everything that isn't these particular modes aka. features. Kind of a fourier-based redimensionalization, almost). - E/H Field Monitor: "Steady-State"
- E/H Field Monitor
- Field Power Flux Monitor - Field Power Flux Monitor
- \epsilon Tensor Monitor - \epsilon Tensor Monitor
- Diffraction Monitor - Diffraction Monitor
- Near-Field Projections - **TODO**: "Modal" solver monitoring (seems to be some kind of spatial+frequency feature, which an EM field can be decomposed into using a specially configured solver, which can be used to look for very particular kinds of effects by constraining investigations of a solver result to filter out everything that isn't these particular modes aka. features. Kind of a fourier-based redimensionalization, almost).
- **TODO**: Figure out exactly how to deal with these visually. - **TODO**: Near-field projections like so:
- Cartesian Near-Field Projection Monitor - Cartesian Near-Field Projection Monitor
- Observation Angle Near-Field Projection Monitor - Observation Angle Near-Field Projection Monitor
- K-Space Near-Field Projection Monitor - K-Space Near-Field Projection Monitor
@ -153,40 +124,120 @@ Now that we can do all the cool things ex. presets and such, it's time to think
- Simulations - Simulations
- FDTD Simulation - FDTD Sim
- Discretizations - Grid Discretizations
- Simulation Grid Discretization - Sim Grid
- 1D Grid Discretizations - Grid Axis
- Automatic 1D Grid Discretization - Automatic Grid Axis
- Manual 1D Grid Discretization - Manual Grid Axis
- Uniform 1D Grid Discretization - Uniform Grid Axis
- Data-Driven 1D Grid Discretization - Data-Driven Grid Axis
- Utilities - Utilities
- Math: Contains a dropdown for operation. - Math: Contains a dropdown for operation.
- Float Math - *type* Math: **Be careful about units :)**
- Complex Math - Operations
- Vector Math - Array Operation
- Field Math: Contains a dropdown for operation.
- Float Field Math ## Sockets
- Complex Field Math - basic
- 3-Vector Field Math - Any
- Spectral Math: Contains a dropdown for operation. - FilePath
- Text
- math
- IntegerNumber
- RationalNumber
- RealNumber
- ComplexNumber
- RealNumberField
- ComplexNumberField
- Real2DVector
- Complex2DVector
- Real2DVectorField
- Complex2DVectorField
- Real3DVector
- Complex3DVector
- Real3DVectorField
- Complex3DVectorField
- physics
- PhysicalTime
- PhysicalAngle
- PhysicalLength
- PhysicalArea
- PhysicalVolume
- PhysicalMass
- PhysicalLengthDensity
- PhysicalAreaDensity
- PhysicalVolumeDensity
- PhysicalSpeed
- PhysicalAcceleration
- PhysicalForce
- PhysicalPolarization
- PhysicalFrequency
- PhysicalSpectralDomain
- PhysicalSpectralDistribution
- blender
- BlenderObject
- BlenderCollection
- BlenderGeoNodes
- BlenderImage
- maxwell
- MaxwellMedium
- MaxwellMediumNonLinearity
- MaxwellStructure
- MaxwellBoundBox
- MaxwellBoundFace
- MaxwellMonitor
- MaxwellSimGrid
- FDTDSim
### Structures
All should support ### GeoNode Trees
- Medium For ease of use, we can ship with premade node trees/groups for:
- Primitives
- Plane
- Box
- Sphere
- Cylinder
- Ring
- Capsule
- Cone
- Array
- Square Array: Takes a primitive shape.
- Hex Array: Takes a primitive shape.
- Hole Array
- Square Hole Array: Takes a primitive hole shape.
- Hex Hole Array: Takes a primitive hole shape.
- Cavities
- Hex Array w/ L-Cavity: Takes a primitive hole shape.
- Hex Array w/ H-Cavity: Takes a primitive hole shape.
- Crystal
- FCC Sphere Array: Takes a primitive spherical-like shape.
- BCC Sphere Array: Takes a primitive spherical-like shape.
- Wood Pile
TriMesh should support: When it comes to geometry, we do need to make sure
- EnumProperty defining whether to select an object or a collection.
- Medium
### Notes
**NOTE**: When several geometries assigned to the same medium are assigned to the same `tidy3d.GeometryGroup`, there can apparently be "significant performance enhancement"s (<https://docs.flexcompute.com/projects/tidy3d/en/latest/_autosummary/tidy3d.GeometryGroup.html#tidy3d.GeometryGroup>). **NOTE**: When several geometries assigned to the same medium are assigned to the same `tidy3d.GeometryGroup`, there can apparently be "significant performance enhancement"s (<https://docs.flexcompute.com/projects/tidy3d/en/latest/_autosummary/tidy3d.GeometryGroup.html#tidy3d.GeometryGroup>).
- We can and should, in the Simulation builder (or just the structure concatenator), batch together structures with the same Medium. - We can and should, in the Simulation builder (or just the structure concatenator), batch together structures with the same Medium.
### **NOTE**: Some symmetries can be greatly important for performance. <https://docs.flexcompute.com/projects/tidy3d/en/latest/notebooks/Symmetry.html>