25.3.2. Modeling Open Channel Flows

176 downloads 7920 Views 706KB Size Report
Select the Open Channel Wave BC option in the Velocity Inlet dialog box. For detailed ..... the Open Channel Initialization Method drop-down list. If only the Open ...
Modeling Multiphase Flows 3. Under Coupled Level Set + VOF, enable Level Set (see Figure 25.1: Multiphase Model Dialog Box for the VOF Model (p. 1350)). 4. (optional) In some cases, spurious currents can arise from the application of the surface tension force in the momentum equation. In these cases you can use the /define/models/multiphase/coupled-level-set text command to use a revised formulation of the surface tension force that weights the force towards the heavier phase in the interface cells. You can choose from none (the default), density-correction, and heaviside-correction. After the Level Set option is enabled, proceed as you normally would when setting up the VOF model (described in Setting Up the VOF Model (p. 1387)). For theoretical information, refer to Coupled Level-Set and VOF Model.

Note When using the Level Set option, the recommended scheme is the geo-reconstruct scheme (see The Geometric Reconstruction Scheme).

Important • The level set method is only suitable for two-phase flow regime, where two fluids are not interpenetrating. • The level set model can only be used when the VOF model is turned on. No mass transfer is allowed. • The level set method is not compatible with the dynamic mesh model.

Normally, zero flux of the level set function is set as the default for the boundary conditions. Due to the geometrical re-initialization procedure at each time step, the boundary conditions shall not have any significant effect on the results. For more information, see Re-initialization of the Level-set Function via the Geometrical Method.

25.3.2. Modeling Open Channel Flows Using the VOF formulation, open channel flows can be modeled in ANSYS Fluent. To start using the open channel flow boundary condition, perform the following: 1. Enable Gravity and set the gravitational acceleration fields. Setup → General

Gravity → On

2. Enable the volume of fluid model. a. Open the Multiphase Model dialog box. Setup →

Models →

Multiphase → Edit...

b. Under Model, enable Volume of Fluid. c. Under Formulation, select either Implicit or Explicit. 1388

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model 3. Under VOF Sub-Models, select Open Channel Flow.

Note The default VOF formulation is set to Implicit after enabling the Open Channel Flow option. This is done to allow the use of larger time step sizes for such applications.

In order to set specific parameters for a particular boundary for open channel flows, enable the Open Channel option in the Multiphase tab of the corresponding boundary condition dialog box. Table 25.10: Open Channel Boundary Parameters for the VOF Model (p. 1389) summarizes the types of boundaries available to the open channel flow boundary condition, and the additional parameters needed to model open channel flow. For more information on setting boundary condition parameters, see Cell Zone and Boundary Conditions (p. 223). Table 25.10: Open Channel Boundary Parameters for the VOF Model Boundary Type

Parameter

pressure inlet

Inlet Group ID; Secondary Phase for Inlet; Flow Specification Method; Free Surface Level, Bottom Level; Velocity Magnitude

pressure outlet

Outlet Group ID; Pressure Specification Method; Free Surface Level; Bottom Level

mass flow inlet

Inlet Group ID; Secondary Phase for Inlet; Free Surface Level; Bottom Level; Mass Flow Rates for the Phases

velocity inlet

Secondary Phase for Inlet; Free Surface Level, Averaged Velocity Inputs/Segregated Velocity Inputs (Available with Open Channel Wave Boundary Condition)

outflow

Flow Rate Weighting

25.3.2.1. Defining Inlet Groups Open channel systems involve the flowing fluid (the secondary phase) and the fluid above it (the primary phase). If both phases enter through the separate inlets (for example, inlet-phase2 and inlet-phase1), these two inlets form an inlet group. This inlet group is recognized by the parameter Inlet Group ID, which will be same for both the inlets that make up the inlet group. On the other hand, if both the phases enter through the same inlet (for example, inlet-combined), then the inlet itself represents the inlet group.

Important In three-phase flows, only one secondary phase is allowed to pass through one inlet group.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1389

Modeling Multiphase Flows

25.3.2.2. Defining Outlet Groups Outlet-groups can be defined in the same manner as the inlet groups.

Important In three-phase flows, the outlet should represent the outlet group, that is, separate outlets for each phase are not recommended in three-phase flows.

25.3.2.3. Setting the Inlet Group For pressure inlets and mass flow inlets, the Inlet Group ID is used to identify the different inlets that are part of the same inlet group. For instance, when both phases enter through the same inlet (single face zone), then those phases are part of one inlet group and you would set the Inlet Group ID to 1 for that inlet (or inlet group). In the case where the same inlet group has separate inlets (different face zones) for each phase, then the Inlet Group ID will be the same for each inlet of that group. When specifying the inlet group, use the following guidelines: • Since the Inlet Group ID is used to identify the inlets of the same inlet group, general information such as Free Surface Level, Bottom Level, or the mass flow rate for each phase should be the same for each inlet of the same inlet group. • You should specify a different Inlet Group ID for each distinct inlet group. For example, consider the case of two inlet groups for a particular problem. The first inlet group consists of water and air entering through the same inlet (a single face zone). In this case, you would specify an inlet group ID of 1 for that inlet (or inlet group). The second inlet group consists of oil and air entering through the same inlet group, but each uses a different inlet (oil-inlet and airinlet) for each phase. In this case, you would specify the same Inlet Group ID of 2 for both of the inlets that belong to the inlet group.

25.3.2.4. Setting the Outlet Group For pressure outlet boundaries, the Outlet Group ID is used to identify the different outlets that are part of the same outlet group. For instance, when both phases enter through the same outlet (single face zone), then those phases are part of one outlet group and you would set the Outlet Group ID to 1 for that outlet (or outlet group). In the case where the same outlet group has separate outlets (different face zones) for each phase, then the Outlet Group ID will be the same for each outlet of that group. When specifying the outlet group, use the following guidelines: • Since the Outlet Group ID is used to identify the outlets of the same outlet group, general information such as Free Surface Level or Bottom Level should be the same for each outlet of the same outlet group. • You should specify a different Outlet Group ID for each distinct outlet group. For example, consider the case of two outlet groups for a particular problem. The first outlet group consists of water and air exiting from the same outlet (a single face zone). In this case, you would

1390

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model specify an outlet number of 1 for that outlet (or outlet group). The second outlet group consists of oil and air exiting through the same outlet group, but each uses a different outlet (oil-outlet and air-outlet) for each phase. In this case, you would specify the same Outlet Group ID of 2 for both of the outlets that belong to the outlet group.

Important For three-phase flows, when all the phases are leaving through the same outlet, the outlet should consist only of a single face zone.

25.3.2.5. Determining the Free Surface Level For the appropriate boundary, you need to specify the Free Surface Level value. This parameter is available for all relevant boundaries, including pressure outlet, mass flow inlet, and pressure inlet. The Free Surface Level, is represented by in Equation 17.41 in the Theory Guide. (25.2) where is the position vector of any point on the free surface, and is the unit vector in the direction of the force of gravity. Here a horizontal free surface that is normal to the direction of gravity is assumed. We can simply calculate the free surface level in two steps: 1. Determine the absolute value of height from the free surface to the origin in the direction of gravity. 2. Apply the correct sign based on whether the free surface level is above or below the origin. If the liquid’s free surface level lies above the origin, then the Free Surface Level is positive (see Figure 25.16: Determining the Free Surface Level and the Bottom Level (p. 1392)). Likewise, if the liquid’s free surface level lies below the origin, then the Free Surface Level is negative. You can also specify a transient profiles for a Free Surface Level for the relevant open channel boundaries as shown in the example below: /********************************************************************* Example UDF that demonstrates transient profile for free surface level **********************************************************************/ #include "udf.h" #define H 1.5 #define T0 0.2

/* Original Free surface level */ /* Time */

DEFINE_TRANSIENT_PROFILE(fs_level, current_time) { real level; if (current_time open-channel-controls Iteration interval for Froude number update [10]

When prompted, set up the following parameter for transient flows: /solve/set> open-channel-controls Time step interval for Froude number update [1]

• For pure open channel flow applications, the inlet and outlet boundary conditions are controlled by the Froude number. In certain cases, it is possible to impose a hydrostatic profile at the outlet without any Froude number dependency. You can use the following text command: solve → set → open-channelcontrols. When prompted, set up the following parameter as shown below: /solve/set> open-channel-controls Use Froude number independent boundary condition at outlet? [no] yes

• Relevant open channel inputs, along with the Froude number, can be reported using the following text command: define → boundary-conditions → openchannel-threads. • In the case of reverse flow, the pressure outlet boundary behaves as a pressure inlet, and the boundaryspecific static pressure is taken as the Total Pressure. In this case, the static pressure is calculated from the total pressure. You can use the following text command to fix the boundary-specified static pressure, which helps to suppress reflections from the pressure boundary for certain cases: solve → set → open-channelcontrols When prompted, set up the following parameter as shown below: /solve/set> open-channel-controls Use boundary specified static pressure for backflow? [no] yes

25.3.3. Modeling Open Channel Wave Boundary Conditions When modeling open channel wave boundary conditions, many of the variables that are used in open channel flow, also exist for open channel wave boundary conditions. You may have to refer to Modeling Open Channel Flows (p. 1388) for information about some of the settings. To use the open channel wave boundary condition, perform the following: 1. Enable Gravity and set the gravitational acceleration fields. Setup → General

Gravity → On

2. Enable the Volume of Fluid model in the Multiphase Model dialog box. Setup →

Models →

Multiphase → Edit...

3. Under Formulation, select either Implicit or Explicit. 4. Under VOF Sub-Models, select Open Channel Wave BC.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1397

Modeling Multiphase Flows In order to set specific parameters for a particular boundary for open channel wave boundaries, enable the Open Channel Wave BC option in the Velocity Inlet boundary condition dialog box (Figure 25.19: The Velocity Inlet for Open Channel Wave BC (p. 1398)). Figure 25.19: The Velocity Inlet for Open Channel Wave BC

The default method is the Averaged Flow Specification Method, where inputs for the moving obstacle and water current are combined. There is no specific treatment for air velocity, which is assumed to be same as the averaged velocity.

Segregated Velocity Inputs The Segregated Velocity Inputs option allows you to prescribe velocity inputs individually for the moving obstacle, Secondary phase (typically water), and Primary phase (typically air).

1398

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model Figure 25.20: Segregated Velocity Inputs for Open Channel Wave BC

You can set the moving object and secondary phase velocity specification methods as: • Magnitude and direction vector • Magnitude and normal to boundary You can set the primary phase velocity specification methods as: • Magnitude and direction vector • Magnitude and normal to boundary • Power law and direction vector • Power law and normal to boundary Power Law (25.5) Where is the vertical distance from the instantaneous free surface level at which the reference velocity magnitude, is specified. is the vertical distance from the free surface level at which,

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1399

Modeling Multiphase Flows velocity sea.

must be estimated.

is the power law coefficient, which is typically 0.16 for an open

Setting Buffer Layer Height The buffer layer is assumed to be the layer above the free surface, in which the effect of air is not felt. This option is provided by assuming that the air in the vicinity of free surface blows with the speed of the water and the waves, so that direct effect of air is not felt in the wave propagation. There are two options for providing the buffer height: 1.

Automatic: the buffer layer is taken as the specified fraction of the maximum wave height.

2.

User-defined: you provide the input for the buffer layer height.

The buffer layer can also be defined using the following text command: /solve/set> open-channel-wave-options /solve/set/open-channel-wave-options> set-buffer-layer-ht set-verbosity

stokes-wave-variants

/solve/set/open-channel-wave-options> set-buffer-layer-ht buffer layer specification method (0 - Automatic, 1 - User-defined) fraction of buffer layer height to maximum wave height [0.02]

[0]

/solve/set/open-channel-wave-options> set-buffer-layer-ht buffer layer specification method (0 - Automatic, 1 - User-defined) enter the value of buffer layer height [0]

[0] 1

In the Momentum tab of the Velocity Inlet dialog box, you can enter the averaged flow velocity, which includes components from the flow current and the moving object. You can specify the Averaged Flow Specification Method as: • Magnitude and Direction • Magnitude and Normal to Boundary • Components In the Multiphase tab (Figure 25.21: The Velocity Inlet for Open Channel Wave BC (p. 1401)), you will specify the following:

1400

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model Figure 25.21: The Velocity Inlet for Open Channel Wave BC

• Secondary Phase for Inlet specifies the phase to which the wave parameters are applied. In case of a threephase flow, select the corresponding secondary phase from this list. • Wave BC Options of which you have a choice of Shallow/Intermediate Waves, Short Gravity Waves, Shallow Waves, and None (for calm sea or pure open channel flow problems without waves). Information about these waves is available in Open Channel Wave Boundary Conditions in the Theory Guide. Note that the short gravity waves expression is derived under the assumption of infinite liquid height. • Free Surface Level is the same definition as for open channel flow, see Modeling Open Channel Flows (p. 1388). • Bottom Level is the same definition as for open channel flow, see Modeling Open Channel Flows (p. 1388), and is valid only for shallow or intermediate depth waves. The bottom level is used for calculating the liquid height. • Reference Wave Direction is the direction of wave propagation with zero wave heading angle. You can specify the wave propagation direction as: – Averaged Flow Direction: In this case, the reference direction is the same as the averaged flow direction.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1401

Modeling Multiphase Flows – Direction Vector – Normal to Boundary • Wave Modeling Options determines how the waves are modeled in the shallow/intermediate and short gravity wave regimes. You can choose to model the waves using either Wave Theories or Wave Spectrum. Wave Theories is usually selected for simulating regular waves. To simulate random waves, select Wave Spectrum. • Depending on your choice of Wave BC Options and Wave Modeling Options, you will need to specify the wave parameters as described in the following sections. Shallow Wave Inputs (p. 1402) Wave Group Inputs (p. 1403) Wave Spectrum Inputs (p. 1403)

Shallow Wave Inputs If you have selected Shallow Waves for Wave BC Options you can specify the following settings for each wave: Number of Waves is the option to set the number of interacting waves (default = 1) Ideally, shallow waves do not support the principle of superposition. The Number of Waves option enables interaction of two different waves originating at unique (non-interfering) locations within the domain. Collision of two counter-propagating solitary waves inside a domain is an example of a shallow wave interaction. Wave Theory of which you have a choice of Fifth Order Solitary (the default) and Fifth Order Cnoidal. Information about the types of wave theory is available in Open Channel Wave Boundary Conditions in the Theory Guide. Wave Height is the height difference between a wave crest to the neighboring trough. Since a solitary wave does not have troughs, the wave height is the distance between a wave crest to mean free surface level. Wave Length is the distance between two consecutive zero crossings. Since solitary waves are derived based on the assumption of infinite wave length, specified wave length is only used to estimate the elliptic function parameter for suitability of the wave theory, and is not used in calculating wave parameters. Inlet Offset Distance is the translational distance from the reference point origin in the reference wave propagation direction. This option is used to generate a wave from a location other than the reference frame origin. For a solitary wave, the hump is always generated at the location where: (25.6) where

1402

and

are spatial coordinates in the reference wave propagation direction. Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model Wave Heading Angle is the angle between the direction of the wavefront and the reference wave propagation direction, in the plane of the flow surface. In 2D, there are only two possibilities, zero degree when the wave is in the reference propagation direction, and 180 degree when the wave Is in the direction opposite to the reference propagation direction.

Wave Group Inputs If you have selected Wave Theories for Wave Modeling Options you can specify the following settings for each wave: Number of Waves is the option to set the number of superposed waves (default = 1) Wave Theory of which you have a choice of First Order Airy (the default), Second Order Stokes, Third Order Stokes, Fourth Order Stokes, and Fifth Order Stokes. Information about the types of wave theory is available in Open Channel Wave Boundary Conditions in the Theory Guide. Wave Height is the height difference between a wave crest to the neighboring trough. Wave Length is the distance between two consecutive crests, troughs or zero crossings. Phase Difference is the phase angle by which one periodic disturbance or wavefront lags behind or precedes another in time or space. Wave Heading Angle is the angle between the direction of the wavefront and the reference wave propagation direction, in the plane of the flow surface. In 2D, there are only two possibilities, zero degree when the wave is in the reference propagation direction, and 180 degree when the wave Is in the direction opposite to the reference propagation direction.

Wave Spectrum Inputs If you have selected Wave Spectrum for Wave Modeling Options you can specify the following settings for each wave: Frequency Spectrum Method specifies the spectrum to use. You can select Pierson-Moskowitz (appropriate for fully-developed seas), Jonswap (appropriate for fetch-limited seas), or TMA (appropriate for fetch-limited, finite-depth seas). Peak Shape Parameter controls the shape and amplitude of the frequency peak in the Jonswap and TMA formulations. This corresponds to in Equation 17.100 in the Fluent Theory Guide. Significant Wave Height is the mean wave height of the largest 1/3 of waves. This corresponds to Theory Guide.

in Equation 17.99 in the Fluent

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1403

Modeling Multiphase Flows Peak Wave Frequency is the wave frequency corresponding to the highest wave energy. This corresponds to in Equation 17.99 and Equation 17.100 in the Fluent Theory Guide. can be expressed in terms of the peak wave period, , as . Minimum/Maximum Wave Frequency specify the frequency range for the spectrum. Note that the Peak Wave Frequency must fall in between Minimum Wave Frequency and Maximum Wave Frequency. Number of Frequency Components specifies the number of components into which the frequency spectrum is divided. Direction Spreading Method specifies the method to use for specifying the directional spreading characteristics. You can choose Unidirectional (for long-crested waves), Frequency Independent Cosine Function (for short-crested waves where the directional component does not depend on frequency), and Frequency Dependant Hyperbolic Function (for short-crested waves where the directional component depends on frequency). Frequency Independent Cosine Exponent specifies the exponent in the Frequency Independent Cosine Function formulation. This corresponds to in Equation 17.104 in the Fluent Theory Guide. Mean Wave Heading Angle specifies the principal wave heading direction. Angular Spread specifies the deviation from the mean wave direction for calculating the angular range. Number of Angular Components specifies the number of components into which the angular range is divided. The total number of wave components is the product of Number of Frequency Components and Number of Angular Components. For modeling random waves, phase differences for the individual wave components are randomly distributed between 0 and 2π.

Note Any change in the input for Number of Wave Components will change the values of phase difference for each component. Therefore, it is recommended that you start the simulation from a saved case file after setting all the wave spectrum user inputs and that you not change the number of wave components during the simulation.

25.3.3.1. Summary Report and Regime Check A useful text command used to print out a summary of the open channel wave boundary condition settings is define/boundary-conditions/open-channel-wave-settings. The output will depend on whether you have chosen Wave Theories or Wave Spectrum.

Sample Output for Wave Theories /define/boundary-conditions> open-channel-wave-settings Wave Input Analysis for Velocity Inlet : Thread ID = 5 ************************************************************

1404

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model Wave-1 Analysis ***************************************** Current Settings : -----------------Wave theory : 5th-order-Stokes , Wave regime = Shallow/Intermediate Wave Height (H) = 0.2160, Wave Length (L) = 1.9400 Liquid Depth (h) = 0.6000, Ursell Number (H*L*L/(h*h*h)) = 3.7636 Mandatory checks for full wave regime within wave breaking limit ----------------------------------------------------------------Relative Height: H/h = 0.3600 , Maximum theoretical limit = 0.7800 Maximum numerical limit = 0.5500 Relative height within wave breaking limit Wave Steepness: H/L = 0.1113 , Maximum theoretical limit = 0.1420 Stable numerical limit = 0.1000 , Maximum numerical limit = 0.1200 Warning: Wave steepness exceeding the stable numerical limit. Waves could be stable or unstable in this regime. Checks for selected wave theory within wave breaking and stability limit ---------------------------------------------------------------------------Relative height check H/h = 0.3600 , Min : 0.0000 , Max : 0.5000 Relative height check : successful Wave Steepness check H/L = 0.1113 , Min : 0.0000 , Max : 0.1363 Wave steepness check : successful Ursell Number check Ur = 3.7636 , Min : 0.0000 , Max : 25.0000 Ursell number check : successful Wave regime check h/L = 0.3093 , Min : 0.0600 , Max : 10000.0000 Wave regime check : successful Summary ---------------------Checks : passed Selected wave theory is appropriate for application.

Sample Output for Wave Spectrum Wave Input Analysis for Velocity Inlet : Thread ID = 6 ************************************************************ Wave Spectrum Analysis ***************************************** Current Settings : -----------------Frequency Spectrum : Jonswap Direction Spreading Method : Unidirectional Significant Wave Height (Hs) = 5.0000 Peak Wave Frequency (wp) = 1.0000, Peak Time Period (Tp) = 6.2832 Minimum Frequency (wi) = 0.6600, Maximum Frequency (we) = 1.6600 Wave Lengths at Min/Peak/Max frequencies (Li, Lp, Le) = (141.5015, 61.6380, 22.3683) Recommendation: Set the min and max wave frequencies so that most of the wave energy is concentrated in the selected regime of spectrum. - Min frequency = 0.5*Peak frequency - Max frequency = 2.5*Peak frequency

Wave Regime Check ---------------------Wave regime type = Short Gravity (Deep) Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1405

Modeling Multiphase Flows Information: Validity of short gravity assumption : Liquid Depth > 0.5*Max Wave Length Sea Steepness Check ----------------------Peak Time Period (Tp) = 6.2832 Zero Upcrossing Time Period (Tz) = 4.7869 Sea Steepness based on Tp (Sp) = 0.0811, Steepness Limit = 0.0667 Sea Steepness based on Tz (Sz) = 0.1398, Steepness Limit = 0.1000 Warning: Sea Steepness based on peak time period exceeding limit. Warning: Sea Steepness based on zero upcrossing time period exceeding limit. Information: High wave steepness of any individual component too could affect the wave pattern, as superposition of wave components is based upon lienar wave theory. Frequency Spectrum Check --------------------------Peak Time Period to Wave Ht Sqrt Ratio (r = Tp/sqrt(Hs)) = 2.8099 Message: Selection of Jonswap spectrum is appropriate. Recommended value of Peak Shape Parameter for r set> open-channel-wave-verbosity to 2 before initialization, 3. Initialize (It would print Spectrum Energy for each frequency/angle.) 4. Copy the information to plot Sw vs Omega and S_theta vs theta 5. Optimize the number of components after repeating steps 1-4

25.3.3.2. Transient Profile Support for Wave Inputs ANSYS Fluent supports transient profiles for all wave inputs using user-defined functions as seen by the example below: /*********************************************************************** UDF for defining transient profile wave inputs ************************************************************************/ #include "udf..h" #define #define #define #define #define #define #define

H 0.02 /* wave height for both waves : same */ LEN1 3. /* wave length for first wave */ LEN2 6. /* wave length for second wave*/ G 9.81 D 10. /* liquid depth */ U 1. /* wave current */ X 0. /* inlet point */

DEFINE_TRANSIENT_PROFILE(wave_ht, current_time) { real k1 = 2.*M_PI/LEN1; real k2 = 2.*M_PI/LEN2; real w1 = sqrt(G*k1*tanh(k1*D)) + k1*U; real w2 = sqrt(G*k2*tanh(k2*D)) + k2*U; real dk = 0.5*(k1 - k2); real dw = 0.5*(w1 - w2); return (2.*H*cos(dk*X - dw*current_time)); }

1406

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model

25.3.3.3. Alternative Stokes Wave Theory Variant Fluent uses Fenton’s formulation for Stokes theories by default. For additional information about the current Stokes theories formulation, see Stokes Wave Theories in the Fluent Theory Guide. To revert to the old formulation, provided by Skjebreia and Hendrickson, use the following text command: /solve/set/open-channel-wave-options> set-buffer-layer-ht set-verbosity

stokes-wave-variants

/solve/set/open-channel-wave-options> stokes-wave-variants Use Fenton's formulation for Stokes wave theories [yes] no Activating old formulation (Skjelbreia and Hendrickson) for Stokes wave theories.

For additional information on the old formulation, refer to Lin’s book [58] (p. 2744).

25.3.4. Recommendations for Open Channel Initialization Once you have selected either the Open Channel Flow or the Open Channel Wave BC option in the Multiphase Model dialog box, then the Open Channel Initialization Method drop-down list appears in the Solution Initialization task page. Solution →

Solution Initialization

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1407

Modeling Multiphase Flows Figure 25.22: The Solution Initialization Task Page

Select an inlet zone from the Compute from drop-down list. You can now make your selection from the Open Channel Initialization Method drop-down list. If only the Open Channel Flow option was enabled, then you only have a choice of None or Flat. If you enabled Open Channel Wave BC, then your choices are None, Flat, or Wavy. The default initialization method is None. If you initialize the solution using None, it has no effect as it does not use any open channel information from the selected zone. The Open Channel Initialization Method comes into effect when you select either Flat or Wavy.

Important This initialization is only valid for pressure-inlets, pressure outlets, and mass-flow inlets for open channel flow and velocity inlets for open channel wave boundary conditions. If the

1408

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model selected inlet zone does not have either open channel flow or open channel wave boundary conditions, ANSYS Fluent will report an error message after you initialize the flow with open channel initialization method of Flat or Wavy. For open channel initialization from the pressure outlet boundary, the hydrostatic pressure profile based on the Free Surface Level is patched in the domain. The volume fraction in the domain is patched based on Free Surface Level provided at the pressure outlet boundary. To patch velocity and other variables, the values in the Solution Initialization task page will be used.

Important • Open channel initialization from the pressure outlet boundary is only supported for two phase flow. • The pressure specification methods, with the exception of Free Surface Level, are not supported for open channel initialization from the pressure outlet boundary.

Initialization will result in the volume fraction, X, Y, and Z velocities, and pressure being patched in the domain. The volume fraction will be patched in the domain based on the free surface level of the selected zone from the Compute from list. The velocities in the domain will be patched assuming the constant value provided for the velocity magnitude in the selected zone.

Important If you specify a profile for the velocity magnitude or direction vectors, the initialization will select the value for the velocity magnitude and direction vectors from only one face. Therefore the initialization may be inaccurate. However, generally, open channel inputs for velocity magnitude and direction vectors are constant. The pressure that is patched is the hydrostatic pressure based on the free surface level specified in the selected zone. You can use the following text command for open channel automatic initialization: solve → initialize → open-channel-auto-init When prompted, set up the following parameters: boundary thread id Enter the thread id for the boundary to be selected for open channel automatic initialization. flat free surface initialization This option is available for both open channel flow and open channel wave boundary conditions. wavy free surface initialization This option appears only for open channel wave boundary conditions, when flat free surface initialization is not selected. The steps to be followed for open channel automatic initialization are

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1409

Modeling Multiphase Flows 1. Compute defaults based on valid open channel boundary thread. This step is required for better initialization of turbulence parameters based on uniform velocity magnitude. solve → initialize → compute defaults 2. This would provide information about the selected boundary and type of initialization. solve → initialize → open-channel-auto-init 3. Initialize solve → initialize → initialize

25.3.4.1. Reporting Parameters for Open Channel Wave BC Option To report values as wave speed, wave frequency, and time period for individual waves during initialization, you can set the following text command: solve → set → open-channel-wave-options → set-verbosity When prompted to set Verbosity for reporting of derived wave inputs during initialization, enter 1 as shown below:

Note You can enter values of 0, 1, or 2. Entering a higher number provides more information. /solve/set/open-channel-wave-options> set-verbosity Verbosity for reporting of derived wave inputs during initialization [0] 1

A sample of the resulting output for wave groups after initializing is shown below: Wave-1 : Wave Height = 0.0200, Wave Length = 3.0000 Wave Number = 2.0944, Wave Speed = 2.1642, Wave Frequency = 4.5328 Effective parameters: Wave Speed = 3.1642, Wave Frequency = 6.6272, Time Period = 0.9481 Wave-2 : Wave Height = 0.0200, Wave Length = 6.0000 Wave Number = 1.0472, Wave Speed = 3.0607, Wave Frequency = 3.2052 Effective parameters: Wave Speed = 4.0607, Wave Frequency = 4.2524, Time Period = 1.4776 Time Period based on average effective frequency: 1.1550

The resultant output for Shallow Waves option is shown below: Wave-1 : Wave Height = 0.2400, Specified Wave Length = 16.0000 Wave Number = 0.5051, Estimated Wave Length = 12.4398 Elliptic Function Parameter (m) : Calculated = 0.9976, Used = 1.0000 Liquid Height = 0.8000, Trough Height = 0.800000 Wave Speed = 3.1868, Wave Frequency = 1.6096 Effective parameters: Wave Speed = 4.1868, Wave Frequency = 2.1147 Time Period based on effective frequency: 2.9712

25.3.5. Numerical Beach Treatment for Open Channels In certain applications, it is desirable to suppress numerical reflection near the outlet boundary for wave dampening. To understand the theory involved in this application, refer to Numerical Beach Treatment. To include numerical beach in your simulation, perform the following: 1410

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model 1. Enable Gravity and set the gravitational acceleration fields. Setup → General

Gravity → On

2. Enable the Volume of Fluid model in the Multiphase Model dialog box. Setup →

Models →

Multiphase → Edit...

3. Under Scheme, select either Implicit or Explicit. 4. Select Open Channel Flow and/or Open Channel Wave BC. In order to set the numerical beach parameters for a fluid zone, go to the Fluid dialog box (Figure 25.23: The Fluid Dialog Box to Enable Numerical Beach (p. 1411)). Figure 25.23: The Fluid Dialog Box to Enable Numerical Beach

In the Multiphase tab of the Fluid dialog box, enable the Numerical Beach option and enter the following: • Beach Group ID represents the cell zones sharing the damping length containing the same input parameters. • Multi-Directional Beach helps to suppress the numerical reflections that arise from multiple open-channel pressure outlet boundaries. This is desirable while modeling oblique waves or when the pressure-outlet boundaries are closer to the zone of interest. (Only available for 3D problems.) • Uni-Directional Beach: should be used to suppress the numerical reflections from a single open channel pressure outlet. This is the case when the flow is generally uni-directional. • Damping Type allows you to choose between Two Dimensional and One Dimensional.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1411

Modeling Multiphase Flows – Two Dimensional is the damping treatment in the beach and gravity direction. – One dimensional is the damping treatment in the beach direction. • Compute From Inlet Boundary is set to none by default. If there are available open channel boundaries (velocity-inlet, pressure-inlet, and mass-flow-inlet), boundary names are added to the drop-down list. If you select a boundary from the list, the Level Inputs, Uni-Directional Beach Inputs or Multi-Directional Beach Inputs in beach direction, and Damping Resistance values will be updated in the interface. You have the option to overwrite the updated inputs with values that are more applicable to your simulation. • Level Inputs is only available for the Two Dimensional damping type. – Free Surface Level is the same definition as for open channel flow, see Modeling Open Channel Flows (p. 1388). – Bottom Level is the same definition as for open channel flow, see Modeling Open Channel Flows (p. 1388). During the automatic calculation from the velocity inlet boundary for short gravity waves, this parameter is updated under some assumptions, as noted in Solution Strategies (p. 1413). The bottom level is used for calculating the liquid height.

Numerical Beach Inputs Numerical beach is assumed as a rectangular domain, where its end-plane (outer surface) is an open channel pressure outlet boundary and start-plane is a plane parallel to a pressure outlet. Beach direction is assumed as the direction normal to a pressure outlet. Damping length is the normal distance between the end and start plane. Uni-Directional Beach Inputs: X, Y, and Z are the vector components of the beach outward normal (typically normal to the nearest pressure outlet). The end point is calculated by taking the dot product of beach direction with any point lying on the end plane. Similarly, the start point is calculated as the dot product of beach direction with any point lying on the start-plane.

Note The automatically calculated value of the end point is assumed based on the domain extents for all of the cell zones. Enter your own value if required. Damping Length Specification is only available if Open Channel Wave BC is enabled in the Multiphase Model dialog box. There are two options you can choose from: • End Point and Wave Lengths (default). • End and Start Points are the limits of the damping zone. Multi-Directional Beach Inputs • Number of Beach The default is 2, the maximum is 3. • X-Direction

1412

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Setting Up the VOF Model • Y-Direction • Z-Direction • End Point • Damping Length See Figure 25.24: Numerical Beach Sketch (p. 1413) for a visual representation of the numerical beach. Figure 25.24: Numerical Beach Sketch

• Relative Velocity Resistance Formulation calculates the source term using relative velocities in the numerical beach zone when using moving/deforming meshes or moving reference frames. • Linear Damping Resistance is the resistance per unit time. • Quadratic Damping Resistance is the resistance per unit length.

25.3.5.1. Solution Strategies Below are some helpful key points when using the Numerical Beach option: 1. The Compute from Inlet Boundary drop-down list is a convenient feature as it provides automatic inputs, which you should check to make sure the values are reasonable. Some of the provided values are calculated under certain assumptions: a. The bottom level, in the case of short gravity waves, is selected in the velocity inlet dialog box for open channel wave boundary conditions. Since there is no user input for this parameter, ANSYS Fluent calculates the bottom level as the value of the free surface level less 2.5 times the wave length. The assumption is that the liquid height is 2.5 times the wave length. b. The automatically calculated value of the end point is assumed based on the domain extents for all of the cell zones.

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

1413

Modeling Multiphase Flows 2. For manual inputs of start and end points, you should verify that these points are calculated correctly in the beach direction. To check for their validity, subtracting the start point from the end point should give you a positive value. 3. For manual inputs of Free Surface Level and Bottom Level, you should verify that these points are calculated correctly in the direction opposite to gravity. To check for their validity, subtracting the bottom level from the free surface level should give you a positive value. 4. In case you create separate damping zones, but the damping length is not sufficient to suppress the waves, clubbing of the beach could be done by selecting the same beach ID for other cell zones. In this case, both the cell zones would share the same information. 5. In case of separate damping zones (without clubbing), you should verify that the damping length is more than or equal to the specified number of wave lengths for the calculation of the start point. 6. Damping resistance should be chosen carefully as too much or too little damping could affect the wave profiles in a no-damping zone. The Compute From Inlet Boundary option automatically populates the values for damping resistances based on analytical correlations for wave energy. However, you may need to further tune these values for certain cases if the computed values are found to be unsuitable. 7. Steep damping at the beginning of the damping zone could affect the wave profile just before the damping zone. 8. It is recommended that you use a coarse mesh in the damping zone with increased coarseness towards the end of the damping zone.

25.3.6. Defining the Phases for the VOF Model Instructions for specifying the necessary information for the primary and secondary phases and their interaction in a VOF calculation are provided below.

Important In general, you can specify the primary and secondary phases whichever way you prefer. It is a good idea, especially in more complicated problems, to consider how your choice will affect the ease of problem setup. For example, if you are planning to patch an initial volume fraction of 1 for one phase in a portion of the domain, it may be more convenient to make that phase a secondary phase. Also, if one of the phases is a compressible ideal gas, it is recommended that you specify it as the primary phase to improve solution stability.

Important Recall that only one of the phases can be a compressible ideal gas. Be sure that you do not select a compressible ideal gas material (that is, a material that uses the compressible ideal gas law for density) for more than one of the phases. See Modeling Compressible Flows (p. 1357) for details.

25.3.6.1. Defining the Primary Phase To define the primary phase in a VOF calculation, perform the following steps:

1414

Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.