Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UpdateTbcSinusoidal.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 !******************************************************************************
24 !
25 ! Purpose: update values for Sinusoidal TBC
26 !
27 ! Description: none.
28 !
29 ! Input: pointer to TBC, substep time
30 !
31 ! Output: modifies TBC data
32 !
33 ! Notes:
34 !
35 ! * Example input section:
36 !
37 !-----
38 ! # TBC_SINUSOIDAL
39 ! OUTFLOW PRESS ! BC and variable to which TBC applies
40 ! BLOCK 0 0 ! applies to block ... (0 0 = to all)
41 ! PATCH 0 0 ! applies to patch ... (0 0 = to all patches from blocks)
42 ! ONTIME 1.e-3 ! time to start using this TBC
43 ! OFFTIME 2.e-3 ! time to stop using this TBC
44 ! AMP 0.2 ! amplitude of sinusoid
45 ! FREQ 1.e4 ! frequency of sinusoid
46 ! PHASE 0.0 ! argument of sin() for t=0
47 ! #
48 !-----
49 !
50 ! * The value used in the boundary condition is the one input times the factor
51 ! (1 + AMP*sin(FREQ*t+PHASE)), provided OFFTIME <= t <= ONTIME.
52 !
53 !******************************************************************************
54 !
55 ! $Id: UpdateTbcSinusoidal.F90,v 1.3 2008/12/06 08:44:10 mtcampbe Exp $
56 !
57 ! Copyright: (c) 2001 by the University of Illinois
58 !
59 !******************************************************************************
60 
61 SUBROUTINE updatetbcsinusoidal( global,tbc,t )
62 
63  USE moddatatypes
64  USE modbndpatch, ONLY : t_tbcvalues
65  USE modglobal, ONLY : t_global
66  USE modparameters
67  USE moderror
68  IMPLICIT NONE
69 
70 ! ... parameters
71  TYPE(t_global), POINTER :: global
72  TYPE(t_tbcvalues), INTENT(INOUT) :: tbc
73 
74  REAL(RFREAL), INTENT(IN) :: t
75 
76 !******************************************************************************
77 
78  CALL registerfunction( global,'UpdateTbcSinusoidal',&
79  'UpdateTbcSinusoidal.F90' )
80 
81  tbc%svals(tbcsto_val) = tbc%params(tbcdat_amp) * &
82  sin(tbc%params(tbcdat_freq) * t + tbc%params(tbcdat_phase))
83 
84 ! finalize --------------------------------------------------------------------
85 
86  CALL deregisterfunction( global )
87 
88 END SUBROUTINE updatetbcsinusoidal
89 
90 !******************************************************************************
91 !
92 ! RCS Revision history:
93 !
94 ! $Log: UpdateTbcSinusoidal.F90,v $
95 ! Revision 1.3 2008/12/06 08:44:10 mtcampbe
96 ! Updated license.
97 !
98 ! Revision 1.2 2008/11/19 22:17:24 mtcampbe
99 ! Added Illinois Open Source License/Copyright
100 !
101 ! Revision 1.1 2004/12/01 16:52:10 haselbac
102 ! Initial revision after changing case
103 !
104 ! Revision 1.6 2003/06/10 22:52:48 jferry
105 ! Added documentation for input section
106 !
107 ! Revision 1.5 2003/05/15 02:57:02 jblazek
108 ! Inlined index function.
109 !
110 ! Revision 1.4 2002/09/27 00:57:09 jblazek
111 ! Changed makefiles - no makelinks needed.
112 !
113 ! Revision 1.3 2002/09/25 18:29:57 jferry
114 ! simplified TBC parameter lists
115 !
116 ! Revision 1.2 2002/09/20 22:22:35 jblazek
117 ! Finalized integration into GenX.
118 !
119 ! Revision 1.1 2002/09/17 13:42:59 jferry
120 ! Added Time-dependent boundary conditions
121 !
122 !******************************************************************************
123 
124 
125 
126 
127 
128 
129 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine updatetbcsinusoidal(global, tbc, t)
NT & sin
subroutine deregisterfunction(global)
Definition: ModError.F90:469