Skip to content

Commit c6b941e

Browse files
committed
FEAT: Add natural convection BC
1 parent 8d4c6a4 commit c6b941e

File tree

15 files changed

+1067
-27
lines changed

15 files changed

+1067
-27
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
- Added `absorber` field (default: `True`) to `WavePort` for automatically placing an absorber behind the port.
2121
- Added `conjugated_dot_product` field in `ModeMonitor` (default: `True`) and `WavePort` (default: `False`) to allow selecting the conjugated or non-conjugated dot product for mode decomposition.
2222
- Support for gradients with respect to the `conductivity` of a `CustomMedium`.
23+
- Added `VerticalNaturalConvectionCoeffModel`, a model for heat transfer due to natural convection from a vertical plate. It can be used in `ConvectionBC` to compute the heat transfer coefficient from fluid properties, using standard Nusselt number correlations for both laminar and turbulent flow.
2324

2425
### Changed
2526
- Validate mode solver object for large number of grid points on the modal plane.

schemas/EMESimulation.json

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@
12681268
},
12691269
"FluidSpec": {
12701270
"title": "FluidSpec",
1271-
"description": "Fluid medium class for backwards compatibility\n\nParameters\n----------\nattrs : dict = {}\n Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, ``attrs`` are mutable. For example, the following is allowed for setting an ``attr`` ``obj.attrs['foo'] = bar``. Also note that `Tidy3D`` will raise a ``TypeError`` if ``attrs`` contain objects that can not be serialized. One can check if ``attrs`` are serializable by calling ``obj.json()``.\nname : Optional[str] = None\n Optional unique name for medium.",
1271+
"description": "Fluid medium class for backwards compatibility\n\nParameters\n----------\nattrs : dict = {}\n Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, ``attrs`` are mutable. For example, the following is allowed for setting an ``attr`` ``obj.attrs['foo'] = bar``. Also note that `Tidy3D`` will raise a ``TypeError`` if ``attrs`` contain objects that can not be serialized. One can check if ``attrs`` are serializable by calling ``obj.json()``.\nname : Optional[str] = None\n Optional unique name for medium.\nthermal_conductivity : Optional[NonNegativeFloat] = None\n [units = W/(um*K)]. Thermal conductivity (k) of the fluid.\nviscosity : Optional[NonNegativeFloat] = None\n [units = kg/(um*s)]. Dynamic viscosity (\u03bc) of the fluid.\nspecific_heat : Optional[NonNegativeFloat] = None\n [units = um^2/(s^2*K)]. Specific heat of the fluid at constant pressure.\ndensity : Optional[NonNegativeFloat] = None\n [units = kg/um^3]. Density (\u03c1) of the fluid.\nexpansivity : Optional[NonNegativeFloat] = None\n [units = 1/K]. Thermal expansion coefficient (\u03b2) of the fluid.",
12721272
"type": "object",
12731273
"properties": {
12741274
"attrs": {
@@ -1289,6 +1289,41 @@
12891289
"FluidSpec"
12901290
],
12911291
"type": "string"
1292+
},
1293+
"thermal_conductivity": {
1294+
"title": "Fluid Thermal Conductivity",
1295+
"description": "Thermal conductivity (k) of the fluid.",
1296+
"units": "W/(um*K)",
1297+
"minimum": 0,
1298+
"type": "number"
1299+
},
1300+
"viscosity": {
1301+
"title": "Fluid Dynamic Viscosity",
1302+
"description": "Dynamic viscosity (\u03bc) of the fluid.",
1303+
"units": "kg/(um*s)",
1304+
"minimum": 0,
1305+
"type": "number"
1306+
},
1307+
"specific_heat": {
1308+
"title": "Fluid Specific Heat",
1309+
"description": "Specific heat of the fluid at constant pressure.",
1310+
"units": "um^2/(s^2*K)",
1311+
"minimum": 0,
1312+
"type": "number"
1313+
},
1314+
"density": {
1315+
"title": "Fluid Density",
1316+
"description": "Density (\u03c1) of the fluid.",
1317+
"units": "kg/um^3",
1318+
"minimum": 0,
1319+
"type": "number"
1320+
},
1321+
"expansivity": {
1322+
"title": "Fluid Thermal Expansivity",
1323+
"description": "Thermal expansion coefficient (\u03b2) of the fluid.",
1324+
"units": "1/K",
1325+
"minimum": 0,
1326+
"type": "number"
12921327
}
12931328
},
12941329
"additionalProperties": false
@@ -1397,7 +1432,7 @@
13971432
},
13981433
"FluidMedium": {
13991434
"title": "FluidMedium",
1400-
"description": "Fluid medium. Heat simulations will not solve for temperature\nin a structure that has a medium with this 'heat_spec'.\n\nParameters\n----------\nattrs : dict = {}\n Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, ``attrs`` are mutable. For example, the following is allowed for setting an ``attr`` ``obj.attrs['foo'] = bar``. Also note that `Tidy3D`` will raise a ``TypeError`` if ``attrs`` contain objects that can not be serialized. One can check if ``attrs`` are serializable by calling ``obj.json()``.\nname : Optional[str] = None\n Optional unique name for medium.\n\nExample\n-------\n>>> solid = FluidMedium()",
1435+
"description": "Fluid medium. Heat simulations will not solve for temperature\nin a structure that has a medium with this 'heat_spec'.\n\nParameters\n----------\nattrs : dict = {}\n Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, ``attrs`` are mutable. For example, the following is allowed for setting an ``attr`` ``obj.attrs['foo'] = bar``. Also note that `Tidy3D`` will raise a ``TypeError`` if ``attrs`` contain objects that can not be serialized. One can check if ``attrs`` are serializable by calling ``obj.json()``.\nname : Optional[str] = None\n Optional unique name for medium.\nthermal_conductivity : Optional[NonNegativeFloat] = None\n [units = W/(um*K)]. Thermal conductivity (k) of the fluid.\nviscosity : Optional[NonNegativeFloat] = None\n [units = kg/(um*s)]. Dynamic viscosity (\u03bc) of the fluid.\nspecific_heat : Optional[NonNegativeFloat] = None\n [units = um^2/(s^2*K)]. Specific heat of the fluid at constant pressure.\ndensity : Optional[NonNegativeFloat] = None\n [units = kg/um^3]. Density (\u03c1) of the fluid.\nexpansivity : Optional[NonNegativeFloat] = None\n [units = 1/K]. Thermal expansion coefficient (\u03b2) of the fluid.\n\nThe full set of parameters is primarily intended for calculations involving natural\nconvection, where they are used to determine the heat transfer coefficient.\nIn the current version, these specific properties may not be utilized for\nother boundary condition types.\n\nAttributes\n----------\nthermal_conductivity : float, optional\n Thermal conductivity ($k$) of the fluid in $W/(\\mu m \\cdot K)$.\nviscosity : float, optional\n Dynamic viscosity ($\\mu$) of the fluid in $kg/(\\mu m \\cdot s)$.\nspecific_heat : float, optional\n Specific heat ($c_p$) of the fluid in $\\mu m^2/(s^2 \\cdot K)$.\ndensity : float, optional\n Density ($\rho$) of the fluid in $kg/\\mu m^3$.\nexpansivity : float, optional\n Thermal expansion coefficient ($\beta$) of the fluid in $1/K$.\n\nExamples\n--------\n>>> # If you are using a boundary condition without a natural convection model,\n>>> # the specific properties of the fluid are not required. In this common\n>>> # scenario, you can instantiate the class without arguments.\n>>> air = FluidMedium()\n\n>>> # It is most convenient to define the fluid from standard SI units\n>>> # using the `from_si_units` classmethod.\n>>> # The following defines air at approximately 20\u00b0C.\n>>> air_from_si = FluidMedium.from_si_units(\n... thermal_conductivity=0.0257, # Unit: W/(m*K)\n... viscosity=1.81e-5, # Unit: Pa*s\n... specific_heat=1005, # Unit: J/(kg*K)\n... density=1.204, # Unit: kg/m^3\n... expansivity=1/293.15 # Unit: 1/K\n... )\n\n>>> # One can also define the medium directly in Tidy3D units.\n>>> # The following is equivalent to the example above.\n>>> air_direct = FluidMedium(\n... thermal_conductivity=2.57e-8,\n... viscosity=1.81e-11,\n... specific_heat=1.005e+15,\n... density=1.204e-18,\n... expansivity=1/293.15\n... )",
14011436
"type": "object",
14021437
"properties": {
14031438
"attrs": {
@@ -1418,6 +1453,41 @@
14181453
"FluidMedium"
14191454
],
14201455
"type": "string"
1456+
},
1457+
"thermal_conductivity": {
1458+
"title": "Fluid Thermal Conductivity",
1459+
"description": "Thermal conductivity (k) of the fluid.",
1460+
"units": "W/(um*K)",
1461+
"minimum": 0,
1462+
"type": "number"
1463+
},
1464+
"viscosity": {
1465+
"title": "Fluid Dynamic Viscosity",
1466+
"description": "Dynamic viscosity (\u03bc) of the fluid.",
1467+
"units": "kg/(um*s)",
1468+
"minimum": 0,
1469+
"type": "number"
1470+
},
1471+
"specific_heat": {
1472+
"title": "Fluid Specific Heat",
1473+
"description": "Specific heat of the fluid at constant pressure.",
1474+
"units": "um^2/(s^2*K)",
1475+
"minimum": 0,
1476+
"type": "number"
1477+
},
1478+
"density": {
1479+
"title": "Fluid Density",
1480+
"description": "Density (\u03c1) of the fluid.",
1481+
"units": "kg/um^3",
1482+
"minimum": 0,
1483+
"type": "number"
1484+
},
1485+
"expansivity": {
1486+
"title": "Fluid Thermal Expansivity",
1487+
"description": "Thermal expansion coefficient (\u03b2) of the fluid.",
1488+
"units": "1/K",
1489+
"minimum": 0,
1490+
"type": "number"
14211491
}
14221492
},
14231493
"additionalProperties": false

0 commit comments

Comments
 (0)