docs: Revised the node/socket plan.

blender-plugin-mvp
Sofus Albert Høgsbro Rose 2024-02-16 13:17:09 +01:00
parent b78dd8dd56
commit 0bf6100e19
Signed by: so-rose
GPG Key ID: AD901CB0F3701434
1 changed files with 143 additions and 92 deletions

View File

@ -1,7 +1,7 @@
# Node 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, 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,79 +10,54 @@ Now that we can do all the cool things ex. presets and such, it's time to think
- Scene
- Time
- 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
- Viewer
- Value Viewer: Live-monitor non-special types.
- Console Viewer: Print to console with button.
- Value Viewer: Live-monitoring.
- Console Viewer: w/Button to Print Types
- Exporter
- JSON File Export
- Viz
- Temporal Shape Viz: Some kind of plot (animated) of the shape.
- Source Viz: 3D
- Structure Viz
- Bound Viz
- FDTD Viz
- JSON File Export: Compatible with any socket implementing `.as_json()`.
- Plot
- *various kinds of plotting? To Blender datablocks primarily, maybe*.
- Sources
- **ALL**: Accept a Temporal Shape
- Temporal Shapes
- Gaussian Pulse Temporal Shape
- Continuous Wave Temporal Shape
- Data Driven Temporal Shape
- Array Temporal Shape
- Modelled
- Point Dipole Source
- Uniform Current Source
- Plane Wave Source
- Mode Source
- Gaussian Beam Source
- Astigmatic Gaussian Beam Source
- TFSF Source
- Point Dipole Source
- Uniform Current Source
- Plane Wave Source
- Mode Source
- Gaussian Beam Source
- Astigmatic Gaussian Beam Source
- TFSF Source
- Data-Driven
- E/H Equivalence Source
- E/H Source
- E/H Equivalence Array Source
- E/H Array Source
- Mediums
- **NOTE**: Mediums should optionally accept a spatially varying field. If not, the medium should be considered spatially uniform.
- **NOTE**: Mediums should optionally accept non-linear effects, either individually or summed using Non-Linear / Operations / Add.
- **NOTE**: Mediums should optionally accept space-time modulation effects, either individually or summed using Non-Linear / Operations / Add.
- **ALL**: Accept spatial field. Else, spatial uniformity.
- **ALL**: Accept non-linearity. Else, linear.
- **ALL**: Accept space-time modulation. Else, static.
- 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.
@ -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
- Structures
- TriMesh Structure
- Object Structure
- GeoNodes Structure
- Scripted Structure
- Primitives
- Box Structure
- Sphere 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 Faces
- PML Bound Face: Should have an option to switch to "stable".
- PML Bound Face: "Normal"/"Stable"
- PEC 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
- **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
- E/H Field Monitor: "Steady-State"
- Field Power Flux Monitor
- \epsilon Tensor Monitor
- Diffraction Monitor
- Near-Field Projections
- **TODO**: Figure out exactly how to deal with these visually.
- **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**: Near-field projections like so:
- Cartesian Near-Field Projection Monitor
- Observation Angle 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
- FDTD Simulation
- FDTD Sim
- Discretizations
- Simulation Grid Discretization
- 1D Grid Discretizations
- Automatic 1D Grid Discretization
- Manual 1D Grid Discretization
- Uniform 1D Grid Discretization
- Data-Driven 1D Grid Discretization
- Grid Discretizations
- Sim Grid
- Grid Axis
- Automatic Grid Axis
- Manual Grid Axis
- Uniform Grid Axis
- Data-Driven Grid Axis
- Utilities
- Math: Contains a dropdown for operation.
- Float Math
- Complex Math
- Vector Math
- Field Math: Contains a dropdown for operation.
- Float Field Math
- Complex Field Math
- 3-Vector Field Math
- Spectral Math: Contains a dropdown for operation.
- *type* Math: **Be careful about units :)**
- Operations
- Array Operation
## Sockets
- basic
- Any
- 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
- Medium
### GeoNode Trees
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:
- EnumProperty defining whether to select an object or a collection.
- Medium
When it comes to geometry, we do need to make sure
### 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>).
- 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>