/usr/share/code_saturne/user_examples/cs_user_parameters-output.f90 is in code-saturne-data 4.3.3+repack-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | !-------------------------------------------------------------------------------
! Code_Saturne version 4.3.3
! --------------------------
! This file is part of Code_Saturne, a general-purpose CFD tool.
!
! Copyright (C) 1998-2016 EDF S.A.
!
! This program is free software; you can redistribute it and/or modify it under
! the terms of the GNU General Public License as published by the Free Software
! Foundation; either version 2 of the License, or (at your option) any later
! version.
!
! This program is distributed in the hope that it will be useful, but WITHOUT
! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
! FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
! details.
!
! You should have received a copy of the GNU General Public License along with
! this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
! Street, Fifth Floor, Boston, MA 02110-1301, USA.
!-------------------------------------------------------------------------------
!===============================================================================
! Purpose:
! -------
!> \file cs_user_parameters-ouput.f90
!>
!> \brief Output parameters example
!>
!> See \subpage f_parameters for examples.
!>
!> If the Code_Saturne GUI is used, this file is not required (but may be
!> used to override parameters entered through the GUI, and to set
!> parameters not accessible through the GUI).
!>
!> Several routines are present in the file, each destined to defined
!> specific parameters.
!>
!> To modify the default value of parameters which do not appear in the
!> examples provided, code should be placed as follows:
!> - usipsu for numerical and physical options
!> - usipes for input-output related options
!>
!> As a convention, "specific physics" defers to the following modules only:
!> pulverized coal, gas combustion, electric arcs.
!>
!> In addition, specific routines are provided for the definition of some
!> "specific physics" options.
!> These routines are described at the end of this file and will be activated
!> when the corresponding option is selected in the usppmo routine.
!-------------------------------------------------------------------------------
!===============================================================================
subroutine usipsu &
!================
( nmodpp )
!===============================================================================
! Purpose:
! -------
! User subroutine for the input of additional user parameters.
!-------------------------------------------------------------------------------
! Arguments
!__________________.____._____.________________________________________________.
! name !type!mode ! role !
!__________________!____!_____!________________________________________________!
! nmodpp ! i ! <-- ! number of active specific physics models !
!__________________!____!_____!________________________________________________!
! Type: i (integer), r (real), s (string), a (array), l (logical),
! and composite types (ex: ra real array)
! mode: <-- input, --> output, <-> modifies data, --- work array
!===============================================================================
!===============================================================================
! Module files
!===============================================================================
use paramx
use cstnum
use dimens
use numvar
use optcal
use cstphy
use entsor
use parall
use period
use ihmpre
use ppppar
use ppthch
use ppincl
use coincl
use cpincl
use field
use cavitation
!===============================================================================
implicit none
! Arguments
integer nmodpp
! Local variables
logical inoprv
integer f_id, idim1, itycat, ityloc, iscdri, iscal, ivar, kislts
!===============================================================================
! This subroutine allows setting parameters
! which do not already appear in the other subroutines of this file.
! It is possible to add or remove parameters.
! The number of physical properties and variables is known here.
!===============================================================================
! Enforce existence of 'tplus' and 'tstar' fields, so that
! a boundary temperature or Nusselt number may be computed using the
! post_boundary_temperature or post_boundary_nusselt subroutines.
! When postprocessing of these quantities is activated, those fields
! are present, but if we need to compute them in the
! cs_user_extra_operations user subroutine without postprocessing them,
! forcing the definition of these fields to save the values computed
! for the boundary layer is necessary.
!< [usipsu_ex_1]
itycat = FIELD_INTENSIVE + FIELD_PROPERTY
ityloc = 3 ! boundary faces
inoprv = .false. ! no previous time step values needed
call field_get_id('tplus', f_id)
if (f_id.lt.0) then
call field_create('tplus', itycat, ityloc, idim1, inoprv, f_id)
endif
call field_get_id('tstar', f_id)
if (f_id.lt.0) then
call field_create('tstar', itycat, ityloc, idim1, inoprv, f_id)
endif
!< [usipsu_ex_1]
!< [usipsu_ex_2]
call field_get_key_id("slope_test_upwind_id", kislts)
do ivar = 1, nvar
call field_set_key_int(ivarfl(ivar), kislts, 0)
enddo
!< [usipsu_ex_2]
!----
! Formats
!----
return
end subroutine usipsu
!===============================================================================
subroutine usipes &
!================
( nmodpp )
!===============================================================================
! Purpose:
! --------
! User subroutine for the input of additional user parameters for
! input/output.
!-------------------------------------------------------------------------------
! Arguments
!__________________.____._____.________________________________________________.
! name !type!mode ! role !
!__________________!____!_____!________________________________________________!
! nmodpp ! i ! <-- ! number of active specific physics models !
!__________________!____!_____!________________________________________________!
! Type: i (integer), r (real), s (string), a (array), l (logical),
! and composite types (ex: ra real array)
! mode: <-- input, --> output, <-> modifies data, --- work array
!===============================================================================
!===============================================================================
! Module files
!===============================================================================
use paramx
use cstnum
use dimens
use numvar
use optcal
use cstphy
use entsor
use field
use parall
use period
use ihmpre
use ppppar
use ppthch
use ppincl
use coincl
use cs_coal_incl
use cs_fuel_incl
use cpincl
use ppcpfu
use radiat
!===============================================================================
implicit none
! Arguments
integer nmodpp
! Local variables
integer ii
integer f_id, idim1, ipp, iflpst, ifllog
!===============================================================================
! This subroutine allows setting parameters
! which do not already appear in the other subroutines of this file.
! It is possible to add or remove parameters.
! The number of physical properties and variables is known here.
! If we are using the Code_Saturne GUI:
! we will find in the user subroutines commented examples
! on the model of the present section.
! If necessary, the user may uncomment them and adapt them to
! his needs.
!===============================================================================
!===============================================================================
! 1. Input-output (entsor)
!===============================================================================
! Frequency of log output
!< [usipes_ex_01]
ntlist = 1
!< [usipes_ex_01]
! Log (listing) verbosity
!< [usipes_ex_02]
do ii = 1, nvar
iwarni(ii) = 1
enddo
iwarni(ipr) = 2
iwarni(iu) = 2
iwarni(iv) = 2
iwarni(iw) = 2
!< [usipes_ex_02]
! Logging of variables and properties
! (example for velocity: 1 to activate logging output, 0 to deactivate)
!< [usipes_ex_03]
f_id = ivarfl(iu)
ifllog = 0
call field_set_key_int(f_id, keyvis, ifllog)
!< [usipes_ex_03]
! Change a property's label
! (here for specific heat, first checking if it is variable)
!< [usipes_ex_04]
if (icp.ne.0) then
f_id = iprpfl(icp)
call field_set_key_str (f_id, keylbl, 'Cp')
endif
!< [usipes_ex_04]
! --- probes output step
!< [usipes_ex_05]
nthist = 1
frhist = -1.d0
!< [usipes_ex_05]
! --- Number of monitoring points (probes) and their positions
! (limited to ncaptm=200)
!< [usipes_ex_06]
ncapt = 4
tplfmt = 1 ! time plot format (1: .dat, 2: .csv, 3: both)
xyzcap(1,1) = 0.30d0
xyzcap(2,1) = 0.15d0
xyzcap(3,1) = 0.01d0
xyzcap(1,2) = 0.30d0
xyzcap(2,2) = 0.00d0
xyzcap(3,2) = 0.01d0
xyzcap(1,3) = 0.30d0
xyzcap(2,3) =-0.08d0
xyzcap(3,3) = 0.01d0
xyzcap(1,4) = 0.60d0
xyzcap(2,4) =-0.05d0
xyzcap(3,4) = 0.01d0
!< [usipes_ex_06]
! Postprocessing of variables and properties
! (example for velocity: 1 to activate postprocessing output, 0 to deactivate)
!< [usipes_ex_07]
f_id = ivarfl(iu)
iflpst = 0
call field_set_key_int(f_id, keyvis, iflpst)
!< [usipes_ex_07]
! Probes for variables and properties
! (example for velocity, probes on u component only)
!< [usipes_ex_08]
f_id = ivarfl(iu)
ipp = field_post_id(f_id)
ihisvr(ipp,1) = -1
ihisvr(ipp+1,1) = 0
ihisvr(ipp+2,1) = 0
!< [usipes_ex_08]
! Force postprocessing of projection of some variables at boundary
! with no reconstruction.
! This is handled automatically if the second bit of a field's
! 'post_vis' key value is set to 1 (which amounts to adding 2
! to that key value).
!< [usipes_ex_09]
f_id = ivarfl(iu)
if (iand(iflpst, 2) .eq. 0) then
call field_get_key_int(f_id, keyvis, iflpst)
iflpst = ior(iflpst, 2)
call field_set_key_int(f_id, keyvis, iflpst)
endif
f_id = ivarfl(ipr)
if (iand(iflpst, 2) .eq. 0) then
call field_get_key_int(f_id, keyvis, iflpst)
iflpst = ior(iflpst, 2)
call field_set_key_int(f_id, keyvis, iflpst)
endif
!< [usipes_ex_09]
! Probes for Radiative Transfer (Luminance and radiative density flux vector)
! for all probes (ihisvr = -1)
!< [usipes_ex_10]
call field_get_id_try('luminance', f_id)
ipp = field_post_id(f_id)
ihisvr(ipp,1) = -1
call field_get_id_try('radiative_flux', f_id)
! X component
ipp = field_post_id(f_id)
ihisvr(ipp,1) = -1
! Y component
ihisvr(ipp+1,1) = -1
! Z component
ihisvr(ipp+2,1) = -1
!< [usipes_ex_10]
!--------
! Formats
!--------
return
end subroutine usipes
|