@@ -114,20 +114,20 @@ class TotalPressure(SingleAttributeModel):
114
114
115
115
class Pressure (SingleAttributeModel ):
116
116
"""
117
- :class:`Pressure` class to specify the pressure for `Outflow`
117
+ :class:`Pressure` class to specify the static pressure for `Outflow`
118
118
boundary condition via :py:attr:`Outflow.spec`.
119
119
120
120
Example
121
121
-------
122
122
123
- >>> fl.TotalPressure (value = 1.01e6 * fl.u.Pa)
123
+ >>> fl.Pressure (value = 1.01e6 * fl.u.Pa)
124
124
125
125
====
126
126
"""
127
127
128
128
type_name : Literal ["Pressure" ] = pd .Field ("Pressure" , frozen = True )
129
129
# pylint: disable=no-member
130
- value : PressureType .Positive = pd .Field (description = "The pressure value." )
130
+ value : PressureType .Positive = pd .Field (description = "The static pressure value." )
131
131
132
132
133
133
class MassFlowRate (SingleAttributeModel ):
@@ -199,28 +199,39 @@ class Wall(BoundaryBase):
199
199
Example
200
200
-------
201
201
202
- - :code:`Wall` with wall function:
202
+ - :code:`Wall` with wall function and prescribed velocity :
203
203
204
- >>> fl.Wall(
205
- ... entities=geometry["wall_function"],
206
- ... use_wall_function=True,
207
- ... )
204
+ >>> fl.Wall(
205
+ ... entities=geometry["wall_function"],
206
+ ... velocity = ["min(0.2, 0.2 + 0.2*y/0.5)", "0", "0.1*y/0.5"],
207
+ ... use_wall_function=True,
208
+ ... )
209
+
210
+ >>> fl.Wall(
211
+ ... entities=volume_mesh["8"],
212
+ ... velocity = (
213
+ ... f"{OMEGA[1]} * (z - {CENTER[2]}) - {OMEGA[2]} * (y - {CENTER[1]})",
214
+ ... f"{OMEGA[2]} * (x - {CENTER[0]}) - {OMEGA[0]} * (z - {CENTER[2]})",
215
+ ... f"{OMEGA[0]} * (y - {CENTER[1]}) - {OMEGA[1]} * (x - {CENTER[0]})",
216
+ ... ),
217
+ ... use_wall_function=True,
218
+ ... )
208
219
209
220
- Define isothermal wall boundary condition on entities
210
221
with the naming pattern :code:`"fluid/isothermal-*"`:
211
222
212
- >>> fl.Wall(
213
- ... entities=volume_mesh["fluid/isothermal-*"],
214
- ... heat_spec=fl.Temperature(350 * fl.u.K),
215
- ... )
223
+ >>> fl.Wall(
224
+ ... entities=volume_mesh["fluid/isothermal-*"],
225
+ ... heat_spec=fl.Temperature(350 * fl.u.K),
226
+ ... )
216
227
217
228
- Define isoflux wall boundary condition on entities
218
229
with the naming pattern :code:`"solid/isoflux-*"`:
219
230
220
- >>> fl.Wall(
221
- ... entities=volume_mesh["solid/isoflux-*"],
222
- ... heat_spec=fl.HeatFlux(1.0 * fl.u.W/fl.u.m**2),
223
- ... )
231
+ >>> fl.Wall(
232
+ ... entities=volume_mesh["solid/isoflux-*"],
233
+ ... heat_spec=fl.HeatFlux(1.0 * fl.u.W/fl.u.m**2),
234
+ ... )
224
235
225
236
====
226
237
"""
@@ -252,20 +263,20 @@ class Freestream(BoundaryBaseWithTurbulenceQuantities):
252
263
253
264
- Define freestream boundary condition with velocity expression:
254
265
255
- >>> fl.Freestream(
256
- ... surfaces=[volume_mesh["blk-1/zblocks"],
257
- ... volume_mesh["blk-1/xblocks"]],
258
- ... velocity = ["min(0.2, 0.2 + 0.2*y/0.5)", "0", "0.1*y/0.5"]
259
- ... )
266
+ >>> fl.Freestream(
267
+ ... surfaces=[volume_mesh["blk-1/zblocks"],
268
+ ... volume_mesh["blk-1/xblocks"]],
269
+ ... velocity = ["min(0.2, 0.2 + 0.2*y/0.5)", "0", "0.1*y/0.5"]
270
+ ... )
260
271
261
272
- Define freestream boundary condition with turbulence quantities:
262
273
263
- >>> fl.Freestream(
264
- ... entities=[volume_mesh['freestream']],
265
- ... turbulence_quantities= fl.TurbulenceQuantities(
266
- ... modified_viscosity_ratio=10,
267
- ... )
268
- ... )
274
+ >>> fl.Freestream(
275
+ ... entities=[volume_mesh['freestream']],
276
+ ... turbulence_quantities= fl.TurbulenceQuantities(
277
+ ... modified_viscosity_ratio=10,
278
+ ... )
279
+ ... )
269
280
270
281
====
271
282
"""
@@ -293,24 +304,24 @@ class Outflow(BoundaryBase):
293
304
-------
294
305
- Define outflow boundary condition with pressure:
295
306
296
- >>> fl.Outflow(
297
- ... surfaces=volume_mesh["fluid/outlet"],
298
- ... spec=fl.Pressure(value = 0.99e6 * fl.u.Pa)
299
- ... )
307
+ >>> fl.Outflow(
308
+ ... surfaces=volume_mesh["fluid/outlet"],
309
+ ... spec=fl.Pressure(value = 0.99e6 * fl.u.Pa)
310
+ ... )
300
311
301
312
- Define outflow boundary condition with Mach number:
302
313
303
- >>> fl.Outflow(
304
- ... surfaces=volume_mesh["fluid/outlet"],
305
- ... spec=fl.Mach(value = 0.2)
306
- ... )
314
+ >>> fl.Outflow(
315
+ ... surfaces=volume_mesh["fluid/outlet"],
316
+ ... spec=fl.Mach(value = 0.2)
317
+ ... )
307
318
308
319
- Define outflow boundary condition with mass flow rate:
309
320
310
- >>> fl.Outflow(
311
- ... surfaces=volume_mesh["fluid/outlet"],
312
- ... spec=fl.MassFlowRate(123 * fl.u.lb / fl.u.s)
313
- ... )
321
+ >>> fl.Outflow(
322
+ ... surfaces=volume_mesh["fluid/outlet"],
323
+ ... spec=fl.MassFlowRate(123 * fl.u.lb / fl.u.s)
324
+ ... )
314
325
315
326
====
316
327
"""
@@ -332,29 +343,29 @@ class Inflow(BoundaryBaseWithTurbulenceQuantities):
332
343
333
344
- Define inflow boundary condition with pressure:
334
345
335
- >>> fl.Inflow(
336
- ... entities=[geometry["inflow"]],
337
- ... total_temperature=300 * fl.u.K,
338
- ... spec=fl.TotalPressure(1.028e6 * fl.u.Pa),
339
- ... )
346
+ >>> fl.Inflow(
347
+ ... entities=[geometry["inflow"]],
348
+ ... total_temperature=300 * fl.u.K,
349
+ ... spec=fl.TotalPressure(1.028e6 * fl.u.Pa),
350
+ ... )
340
351
341
352
- Define inflow boundary condition with mass flow rate:
342
353
343
- >>> fl.Inflow(
344
- ... entities=[volume_mesh["fluid/inflow"]],
345
- ... total_temperature=300 * fl.u.K,
346
- ... spec=fl.MassFlowRate(123 * fl.u.lb / fl.u.s),
347
- ... )
354
+ >>> fl.Inflow(
355
+ ... entities=[volume_mesh["fluid/inflow"]],
356
+ ... total_temperature=300 * fl.u.K,
357
+ ... spec=fl.MassFlowRate(123 * fl.u.lb / fl.u.s),
358
+ ... )
348
359
349
360
- Define inflow boundary condition with turbulence quantities:
350
361
351
- >>> fl.Inflow(
352
- ... entities=[volume_mesh["fluid/inflow"]],
353
- ... turbulence_quantities= fl.TurbulenceQuantities(
354
- ... turbulent_kinetic_energy=2.312e-3 * fl.u.m **2 / fl.u.s**2,
355
- ... specific_dissipation_rate= 1020 / fl.u.s,
356
- ... )
357
- ... )
362
+ >>> fl.Inflow(
363
+ ... entities=[volume_mesh["fluid/inflow"]],
364
+ ... turbulence_quantities= fl.TurbulenceQuantities(
365
+ ... turbulent_kinetic_energy=2.312e-3 * fl.u.m **2 / fl.u.s**2,
366
+ ... specific_dissipation_rate= 1020 / fl.u.s,
367
+ ... )
368
+ ... )
358
369
359
370
====
360
371
"""
@@ -433,21 +444,21 @@ class Periodic(Flow360BaseModel):
433
444
434
445
- Define a translationally periodic boundary condition using :class:`Translational`:
435
446
436
- >>> fl.Periodic(
437
- ... surface_pairs=[
438
- ... (volume_mesh["VOLUME/BOTTOM"], volume_mesh["VOLUME/TOP"]),
439
- ... (volume_mesh["VOLUME/RIGHT"], volume_mesh["VOLUME/LEFT"]),
440
- ... ],
441
- ... spec=fl.Translational(),
442
- ... )
447
+ >>> fl.Periodic(
448
+ ... surface_pairs=[
449
+ ... (volume_mesh["VOLUME/BOTTOM"], volume_mesh["VOLUME/TOP"]),
450
+ ... (volume_mesh["VOLUME/RIGHT"], volume_mesh["VOLUME/LEFT"]),
451
+ ... ],
452
+ ... spec=fl.Translational(),
453
+ ... )
443
454
444
455
- Define a rotationally periodic boundary condition using :class:`Rotational`:
445
456
446
- >>> fl.Periodic(
447
- ... surface_pairs=[(volume_mesh["VOLUME/PERIODIC-1"],
448
- ... volume_mesh["VOLUME/PERIODIC-2"])],
449
- ... spec=fl.Rotational()
450
- ... )
457
+ >>> fl.Periodic(
458
+ ... surface_pairs=[(volume_mesh["VOLUME/PERIODIC-1"],
459
+ ... volume_mesh["VOLUME/PERIODIC-2"])],
460
+ ... spec=fl.Rotational()
461
+ ... )
451
462
452
463
====
453
464
"""
0 commit comments