- boundaryBoundary ID(s) for which to compute the postprocessor
C++ Type:std::vector<int>
Controllable:No
Description:Boundary ID(s) for which to compute the postprocessor
NekYPlus
Compute y+ on boundaries
Description
This postprocessor computes the maximum, minimum, or average value of on given sidesets in the domain. The value of at a point on the boundary is
where is the distance from the wall of the nearest GLL point, is the kinematic viscosity is the friction velocity,
The numerator in this expression represents the viscous force on the wall, but only the components parallel to the wall. To be clear, the wall exerts a viscous force on the fluid expressed by a vector with components
where are the components of the unit outward normal on the wall. This vector in general has components in all directions, including some directions perpendicular to the wall. is the magnitude of the vector , but only the components parallel to the wall.
Or, written in tensor notation, the -th component of the expression above is
Computing the Distance to the Wall
To use this postprocessor, you need to compute the wall distance in NekRS, which can be done in the .usr file. First, in usrdat2 you need to explicitly set the cbc array to 'W ' for any sidesets which correspond to walls. The 1 in cbc(ifc,iel,1) corresponds to the sideset ID.
Then, you need to compute the wall distance in usrdat3 by calling the distf function. The 1 in distf(ywd,1,'W ',w1,w2,w3,w4,w5) is the sideset ID corresponding to the wall. If you have multiple walls in the problem, simply call dist multiple times. Finally, you need to expose the wall distance to the C++ side of NekRS by assigning the nrs_scptr. The 1 in nrs_scptr(1) is the wall_distance_index parameter that this object will ask you to provide.
c-----------------------------------------------------------------------
subroutine useric(i,j,k,eg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
integer i,j,k,e,eg
return
end
c-----------------------------------------------------------------------
subroutine userchk
include 'SIZE'
include 'TOTAL'
return
end
c-----------------------------------------------------------------------
subroutine usrdat
include 'SIZE'
include 'TOTAL'
return
end
c-----------------------------------------------------------------------
subroutine usrdat2
include 'SIZE'
include 'TOTAL'
do iel=1,nelt
do ifc=1,2*ndim
if (boundaryID(ifc,iel).eq. 1) then
cbc(ifc,iel,1)= 'W '
endif
enddo
enddo
return
end
c-----------------------------------------------------------------------
subroutine usrdat3
include 'SIZE'
include 'TOTAL'
common /scrach_o1/ w1(lx1*ly1*lz1*lelv),
$ w2(lx1*ly1*lz1*lelv),
$ w3(lx1*ly1*lz1*lelv),
$ w4(lx1*ly1*lz1*lelv),
$ w5(lx1*ly1*lz1*lelv)
common /scrach_o2/ ywd(lx1,ly1,lz1,lelv)
COMMON /NRSSCPTR/ nrs_scptr(1)
integer*8 nrs_scptr
call distf(ywd,1,'W ',w1,w2,w3,w4,w5)
nrs_scptr(1) = loc(ywd)
return
end
c-----------------------------------------------------------------------
(test/tests/postprocessors/nek_yplus/pipe.usr)Example Input Syntax
As an example, the postprocessors below compute the on a wall sideset in the NekRS mesh.
[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
[avg_yp]
type = NekYPlus<<<{"description": "Compute y+ on boundaries", "href": "NekYPlus.html"}>>>
boundary<<<{"description": "Boundary ID(s) for which to compute the postprocessor"}>>> = '1'
mesh<<<{"description": "NekRS mesh to compute postprocessor on"}>>> = 'fluid'
value_type<<<{"description": "Type of value to report"}>>> = 'avg'
[]
[min_yp]
type = NekYPlus<<<{"description": "Compute y+ on boundaries", "href": "NekYPlus.html"}>>>
boundary<<<{"description": "Boundary ID(s) for which to compute the postprocessor"}>>> = '1'
mesh<<<{"description": "NekRS mesh to compute postprocessor on"}>>> = 'fluid'
value_type<<<{"description": "Type of value to report"}>>> = 'min'
[]
[max_yp]
type = NekYPlus<<<{"description": "Compute y+ on boundaries", "href": "NekYPlus.html"}>>>
boundary<<<{"description": "Boundary ID(s) for which to compute the postprocessor"}>>> = '1'
mesh<<<{"description": "NekRS mesh to compute postprocessor on"}>>> = 'fluid'
[]
[](test/tests/postprocessors/nek_yplus/nek.i)Input Parameters
- meshallNekRS mesh to compute postprocessor on
Default:all
C++ Type:MooseEnum
Controllable:No
Description:NekRS mesh to compute postprocessor on
- value_typemaxType of value to report
Default:max
C++ Type:MooseEnum
Controllable:No
Description:Type of value to report
- wall_distance_index1Index into nek::scPtr where the wall distance is stored
Default:1
C++ Type:unsigned int
Controllable:No
Description:Index into nek::scPtr where the wall distance is stored
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
Execution Scheduling Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.