forked from trixi-framework/TrixiParticles.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for Open Boundary Systems for free surfaces (trixi-framework#609)
* set test up for 1.11 * fix * typo * fix again * remove soundspeed from OBS * skip empty system * fix test * fix tests * fix tests * fix bug * fix * check dimensionality of reference functions * propagate characteristics * update * cleanup * update * Increase errors for 1.11 * Fix invalidations * Fix tests * Update ci.yml * revert * Update ci.yml * Update test/validation/validation.jl Co-authored-by: Erik Faulhaber <[email protected]> * revert changes that had no benefit * update * cleanup * include in test run * remove redundancy * revert * fix tests * fix * fix test * fix test * fix the test * fix error * Update src/schemes/boundary/open_boundary/method_of_characteristics.jl Co-authored-by: Erik Faulhaber <[email protected]> * Update test/schemes/boundary/open_boundary/boundary_zone.jl Co-authored-by: Erik Faulhaber <[email protected]> * Update src/setups/extrude_geometry.jl Co-authored-by: Erik Faulhaber <[email protected]> * Update src/schemes/boundary/open_boundary/method_of_characteristics.jl Co-authored-by: Erik Faulhaber <[email protected]> * Update src/schemes/boundary/open_boundary/boundary_zones.jl Co-authored-by: Erik Faulhaber <[email protected]> * Update examples/fluid/pipe_flow_3d.jl Co-authored-by: Erik Faulhaber <[email protected]> * fix test * fix test * format * fix test * format --------- Co-authored-by: LasNikas <[email protected]> Co-authored-by: Erik Faulhaber <[email protected]>
- Loading branch information
1 parent
adec8f9
commit 1eb524f
Showing
8 changed files
with
116 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 3D channel flow simulation with open boundaries. | ||
|
||
using TrixiParticles | ||
|
||
# ========================================================================================== | ||
# ==== Resolution | ||
particle_spacing = 0.05 | ||
|
||
# Make sure that the kernel support of fluid particles at a boundary is always fully sampled | ||
boundary_layers = 3 | ||
|
||
# Make sure that the kernel support of fluid particles at an open boundary is always | ||
# fully sampled. | ||
# Note: Due to the dynamics at the inlets and outlets of open boundaries, | ||
# it is recommended to use `open_boundary_layers > boundary_layers` | ||
open_boundary_layers = 6 | ||
|
||
# ========================================================================================== | ||
# ==== Experiment Setup | ||
tspan = (0.0, 2.0) | ||
|
||
function velocity_function3d(pos, t) | ||
# Use this for a time-dependent inflow velocity | ||
# return SVector(0.5prescribed_velocity * sin(2pi * t) + prescribed_velocity, 0) | ||
|
||
return SVector(prescribed_velocity, 0.0, 0.0) | ||
end | ||
|
||
domain_size = (1.0, 0.4, 0.4) | ||
|
||
boundary_size = (domain_size[1] + 2 * particle_spacing * open_boundary_layers, | ||
domain_size[2], domain_size[3]) | ||
|
||
flow_direction = [1.0, 0.0, 0.0] | ||
|
||
# setup simulation | ||
trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "pipe_flow_2d.jl"), | ||
domain_size=domain_size, boundary_size=boundary_size, | ||
flow_direction=flow_direction, faces=(false, false, true, true, true, true), | ||
tspan=tspan, smoothing_kernel=WendlandC2Kernel{3}(), | ||
reference_velocity=velocity_function3d, | ||
plane_in=([0.0, 0.0, 0.0], [0.0, domain_size[2], 0.0], | ||
[0.0, 0.0, domain_size[3]]), | ||
plane_out=([domain_size[1], 0.0, 0.0], [domain_size[1], domain_size[2], 0.0], | ||
[domain_size[1], 0.0, domain_size[3]])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters