Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ROCSTAR_RocFrac.f90
Go to the documentation of this file.
1 !*********************************************************************
2 !* Illinois Open Source License *
3 !* *
4 !* University of Illinois/NCSA *
5 !* Open Source License *
6 !* *
7 !* Copyright@2008, University of Illinois. All rights reserved. *
8 !* *
9 !* Developed by: *
10 !* *
11 !* Center for Simulation of Advanced Rockets *
12 !* *
13 !* University of Illinois *
14 !* *
15 !* www.csar.uiuc.edu *
16 !* *
17 !* Permission is hereby granted, free of charge, to any person *
18 !* obtaining a copy of this software and associated documentation *
19 !* files (the "Software"), to deal with the Software without *
20 !* restriction, including without limitation the rights to use, *
21 !* copy, modify, merge, publish, distribute, sublicense, and/or *
22 !* sell copies of the Software, and to permit persons to whom the *
23 !* Software is furnished to do so, subject to the following *
24 !* conditions: *
25 !* *
26 !* *
27 !* @ Redistributions of source code must retain the above copyright *
28 !* notice, this list of conditions and the following disclaimers. *
29 !* *
30 !* @ Redistributions in binary form must reproduce the above *
31 !* copyright notice, this list of conditions and the following *
32 !* disclaimers in the documentation and/or other materials *
33 !* provided with the distribution. *
34 !* *
35 !* @ Neither the names of the Center for Simulation of Advanced *
36 !* Rockets, the University of Illinois, nor the names of its *
37 !* contributors may be used to endorse or promote products derived *
38 !* from this Software without specific prior written permission. *
39 !* *
40 !* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
41 !* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
42 !* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
43 !* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
44 !* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
45 !* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
46 !* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
47 !* USE OR OTHER DEALINGS WITH THE SOFTWARE. *
48 !*********************************************************************
49 !* Please acknowledge The University of Illinois Center for *
50 !* Simulation of Advanced Rockets in works and publications *
51 !* resulting from this software or its derivatives. *
52 !*********************************************************************
54 
55 !!****f* Rocfrac/Rocfrac/Source/ROCSTAR_RocFrac.f90
56 !!
57 !! NAME
58 !! ROCSTAR_RocFrac
59 !!
60 !! FUNCTION
61 !! Global variable module
62 !!
63 !!***
64 
66 
67  IMPLICIT NONE
68 
69  SAVE
70 
71  CHARACTER(*), PARAMETER :: surWin = "sfrac"
72  CHARACTER(*), PARAMETER :: volWin = "vfrac"
73 
74 ! - Derive Type for the boundary conditions
75  TYPE bcvalues
76  INTEGER :: BCtypeX, BCtypeY, BCtypeZ
77  REAL*8 :: BCvalueX, BCvalueY, BCvalueZ
78  END TYPE bcvalues
79 
80  TYPE, public :: rocfrac_global
81  LOGICAL :: iDummyRocfrac
82 
83 
84 !---- ** PARALLEL PARAMETER **
85  INTEGER :: MPI_COMM_ROCFRAC ! Communicator of Rocfrac
86 ! -- Processor id number character
87  CHARACTER*4 :: MyIdChr
88 !-- Non-block receive, Non-block send request arrays
89  INTEGER, POINTER, DIMENSION(:) :: ReqRcv,ReqSnd
90 !-- Non-block receive, Non-block send status arrays
91  INTEGER, POINTER, DIMENSION(:,:) :: StatRcv, StatSnd
92 !-- Number of Volumetric elements on Partition Boundary
93  INTEGER :: NumElPartBndry
94 ! -- Total Number of Nodes being communicated
95  INTEGER :: TotNumNdComm
96 ! -- Total Number of Neighoring Processor communicating with.
97  INTEGER :: TotNumNeighProcs
98 ! -- Number of Nodes Communicating per-processor
99  INTEGER, POINTER, DIMENSION(:) :: NumNdComm
100 ! -- Received Data buffer
101  TYPE(rcv_buf), POINTER, DIMENSION(:) :: RecvDataFrm
102 ! -- List of Processors Neighbors
103  INTEGER, POINTER, DIMENSION(:) :: NeighProcList
104 ! -- List of Nodes Communicated
105  TYPE(send_buf), POINTER, DIMENSION(:) :: NdCommList
106 
107 
108 !---- ** FILE PRAMETERS **
109  CHARACTER(LEN=200) :: prefx ! I/O file prefix
110  INTEGER :: prefx_lngth ! length of prefix
111  INTEGER :: io_input ! unit id of control input deck
112  INTEGER :: io_sum ! unit id of summary control inpute deck
113 
114 
115 !---- ANALYSIS PARAMETERS
116  LOGICAL :: ReStart ! Is the analysis a continuation ?
117  ! .FALSE. = NO *
118  ! .TRUE. = YES
119  REAL*8 :: CourantRatio ! ratio of delta and Courant conditon
120 
121  REAL*8 :: DT ! time step (seconds)
122  REAL*8 :: DTInv
123 
124 ! -- Current sytem time
125 
126  REAL*8 :: CurrTime
127 
128  LOGICAL :: ALEenabled ! Is the ALE enabled ?
129  ! .FALSE. = NO *
130  ! .TRUE. = YES
131 
132  INTEGER, POINTER, DIMENSION(:) :: iSolnType ! Analysis Type
133  ! -1 = non-linear geom/ neo-hookean
134  ! 0 = non-linear geom/ arruda Boyce
135  ! 1 = non-linear geom/ linear mat
136  ! 2 = linear geom / linear mat
137  ! 10 = 4node ANDG /arruda Boyce
138 
139  INTEGER, POINTER, DIMENSION(:) :: iSolnTypeHT ! Analysis Type
140  ! 0 = no heat transfer solution
141  ! 1 = heat transfer solution
142 
143 !-- heat conductivity lke variable for mesh motion
144  REAL*8 :: kappa
145 
146 !-- Used to subtract the initial pressure
147  REAL*8, POINTER, DIMENSION(:,:) :: pstatic
148 !-- Used to subtract the initial pressure
149  REAL*8, POINTER, DIMENSION(:,:) :: pstaticnb
150 !-- Flag to subract the initial pressure
151  LOGICAL :: ipstatic
152 
153 !---- ** VOLUMETRIC MATERIAL PROPERTIES **
154 !
155  INTEGER :: NumMatVol ! number of volumetric materials
156 !-- Young's moduli | Poisson's ratios | density | thermal expansion coeffs
157  REAL*8, POINTER, DIMENSION(:) :: E, xnu, rho, alpha
158  REAL*8, POINTER, DIMENSION(:) :: E1, E2, E3, nu12, nu13, nu23, G12, G13, G23
159 ! -- shear Moduls, Bulk Modulus, Lame's Constant
160  REAL*8, POINTER, DIMENSION(:) :: xmu, xkappa, xlambda
161 !-- Fastest Dilation Wave Speed
162  REAL*8 :: cd_fastest
163 !-- elastic stiffness const
164  REAL*8, POINTER, DIMENSION(:,:) :: ci,cj
165 
166 !---- ** Mesh Variables **
167 !
168 
169 ! --- Order of Tetradehral
170  ! iElType = 4 ; Four Node Tetrahedral
171  ! iElType = 10 ; Ten Node Tetrahedral
172  INTEGER :: iElType
173 ! -- Corresponding order for face of Tetrahedral
174  INTEGER :: iElType2D
175 ! -- Number of Gaussian Integration Points
176  INTEGER :: iStrGss
177 
178 ! Number of Nodes, Number of Elements
179  INTEGER :: NumNP, NumElVol
180  INTEGER, POINTER, DIMENSION(:) :: NumElVolMat, NumElPartBndryMat
181 !-- mat number for CST element
182  INTEGER, POINTER, DIMENSION(:) :: MatIdVol
183 !-- connectivity table for CST elem
184  INTEGER, POINTER, DIMENSION(:,:) :: ElConnVol
185 !-- Undeformed Coordinate array (i.e. Original Mesh Coordinates)
186 ! REAL*8, POINTER, DIMENSION(:,:) :: coor
187 !-- Mesh Coordinate array ( meshcoor = coor if ALEenabled = .False.)
188  REAL*8, POINTER, DIMENSION(:,:) :: meshcoor
189 ! - Stores the boundary conditions data values
190  TYPE(bcvalues), POINTER, DIMENSION(:) :: bcCond
191 ! - Stores the boundary conditions data values
192  TYPE(bcvalues), POINTER, DIMENSION(:) :: bcCondHT
193 
194 !- Physical Boundary Flags
195  INTEGER :: NumNdsBC ! number of boundary nodes w/loads
196  INTEGER :: NumNdsBCmm ! number of boundary nodes w/loads mesh motion
197  INTEGER :: NumNdsBCHT ! number of boundary nodes w/loads mesh motion
198 !-- displacement and force dof
199  INTEGER, POINTER, DIMENSION(:,:) :: BCFlag
200 !-- displacement and force dof
201  INTEGER, POINTER, DIMENSION(:,:) :: BCFlagHT
202 !-- applied displacements and loads
203  REAL*8, POINTER, DIMENSION(:,:) :: BCvalue
204 !-- applied displacements and loads
205  REAL*8, POINTER, DIMENSION(:,:) :: BCvalueHT
206 
207 ! - Stores the boundary meshmotion conditions data values
208  TYPE(bcvalues), POINTER, DIMENSION(:) :: bcCondmm
209  INTEGER :: NumBcFlagsmm
210 !-- displacement and force dof mesh motion
211  INTEGER, POINTER, DIMENSION(:,:) :: BCFlagmm
212 !-- applied displacements and loads
213  REAL*8, POINTER, DIMENSION(:,:) :: BCvaluemm
214 
215 ! - Mass Matrix
216  REAL*8, POINTER, DIMENSION(:) :: xmass
217 
218  REAL*8, POINTER, DIMENSION(:) :: CapctInv
219 
220 !--- Additional Arrays for average nodal deformation gradient elements
221 
222 ! - Number of Elements Associated with node
223  INTEGER, POINTER, DIMENSION(:) :: NumELNeigh
224 ! - Element ids of Element Associated with node
225  INTEGER, POINTER, DIMENSION(:,:) :: ElConnNd
226 ! - Volume Ratio Associated with node
227  REAL*8, POINTER, DIMENSION(:,:) :: AlphaR
228 ! - Origonal undeformed Volume of node
229  REAL*8, POINTER, DIMENSION(:) :: VolUndfmd
230 
231 ! ** Solid/Fluid Interface **
232 
233 ! -- Solid communication map, Maps Surface Node to Volume Node
234  INTEGER, POINTER, DIMENSION(:) :: MapNodeSF
235  INTEGER, POINTER, DIMENSION(:) :: MapNodeSFnb
236  INTEGER, POINTER, DIMENSION(:) :: MapNodeS
237 
238 ! -- Number of Nodes and Elements on the Solid/Fluid Interface
239  INTEGER :: InterfaceSFNumNodes, InterfaceSFNumElems
240 ! -- Number of Nodes and Elements on the Solid/Fluid Non-Burning Interface
241  INTEGER :: InterfaceSFnbNumNodes, InterfaceSFnbNumElems
242 ! -- Number of Nodes and Elements on the Non-Solid/Fluid Interface
243  INTEGER :: InterfaceSNumNodes, InterfaceSNumElems
244 
245 ! -- Element connectivity array
246  INTEGER, POINTER, DIMENSION(:,:) :: InterfaceSFElemConn
247  INTEGER, POINTER, DIMENSION(:,:) :: InterfaceSFnbElemConn
248  INTEGER, POINTER, DIMENSION(:,:) :: InterfaceSElemConn
249 ! -- Nodal coordinates
250  REAL*8 , POINTER, DIMENSION(:,:) :: InterfaceSFNodalCoors
251  REAL*8 , POINTER, DIMENSION(:,:) :: InterfaceSFnbNodalCoors
252  REAL*8 , POINTER, DIMENSION(:,:) :: InterfaceSNodalCoors
253 ! -- Displacements (incremental)
254  REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSFNodalDisps
255  REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSFnbNodalDisps
256 ! -- Displacements (total)
257  REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSFTotalNodalDisps
258  REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSFnbTotalNodalDisps
259 ! -- Velocities
260  REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSFNodalVels
261  REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSFnbNodalVels
262 ! -- Tractions
263 !!$ #OLD REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSFElemTract
264  REAL*8, POINTER, DIMENSION(:) :: InterfaceSFElemTract
265  REAL*8, POINTER, DIMENSION(:) :: InterfaceSFnbElemTract
266 
267 ! heat flux
268  REAL*8, POINTER, DIMENSION(:) :: InterfaceSFHeatFlux
269  REAL*8, POINTER, DIMENSION(:) :: InterfaceSFNodalTemp
270 
271 ! -- Vbar
272  REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSFVbar
273  REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSFnbVbar
274  REAL*8, POINTER, DIMENSION(:,:) :: InterfaceSVbar
275 !
276 ! -- Element Integration (10 node)
277 ! 0 - full integration
278 ! 1 - reduced integration
279 
280  INTEGER :: iElIntgratn
281 
282 
283 !---- ** COHESIVE MATERIAL PROPERTIES **
284 ! - Number of cohesive materials
285  INTEGER :: NumMatCoh
286 !-- normal characteristic lengths | tangent characteristic lengths
287  REAL*8, POINTER, DIMENSION(:) :: deltan, deltat
288 !-- max. normal stresses | max. shearing stresses | friction coeffs.
289  REAL*8, POINTER, DIMENSION(:) :: SigmaMax, TauMax
290 !-- initial Sthresholds
291  REAL*8, POINTER, DIMENSION(:) :: Sinit
292 
293 !-- initial Sthresholds
294  REAL*8, POINTER, DIMENSION(:,:) :: Sthresh1,Sthresh2
295 
296 ! -- Solution Dynamic Variables
297 
298 !-- displacement vector
299  REAL*8, POINTER, DIMENSION(:) :: Disp
300 
301 
302 !-- Temperature vector
303  REAL*8, POINTER, DIMENSION(:) :: Temperature
304 
305 !-- previous time step displacement
306  REAL*8, POINTER, DIMENSION(:) :: DispOld
307 !-- mesh displacement vector
308  REAL*8, POINTER, DIMENSION(:) :: DispBar, DispTotal !d_bar, d_total
309 !-- velocity vector at t=t+dt/2
310  REAL*8, POINTER, DIMENSION(:) :: VeloHalf !vhalf
311 !-- mesh velocity vector at previous step
312  REAL*8, POINTER, DIMENSION(:) :: VeloBarOld !v_bar_old
313 !-- mesh velocity vector
314  REAL*8, POINTER, DIMENSION(:) :: VeloBar !v_bar
315 !-- velocity of boundary nodes
316  REAL*8, POINTER, DIMENSION(:) :: VeloBndry !vb
317 !-- acceleration of boundary nodes
318  REAL*8, POINTER, DIMENSION(:) :: AccelBndry !ab
319 !-- mesh acceleration vector
320  REAL*8, POINTER, DIMENSION(:) :: AccelBar !a_bar
321 !-- acceleration vector
322  REAL*8, POINTER, DIMENSION(:) :: Accel !a
323 !-- CST stress
324  REAL*8, POINTER, DIMENSION(:,:) :: S11, S22, S33, S12, S23, S13
325 !-- Von Mises stress
326  REAL*8, POINTER, DIMENSION(:) :: SVonMises
327 
328 ! -- Dummy Variables
329 
330 ! 1-3 for 4 node tet (i.e. 3 node triangles)
331 ! 4-6 for 10 node tet (i.e. 6 node triangles, mid-side nodes get traction)
332  INTEGER :: LwrBnd,UppBnd
333 
334 ! Mass conservation
335 ! single processors total mass for the volume
336  REAL*8 :: TotalMassSolidp
337 ! single processors total mass flux
338  REAL*8 :: xmdot_totalp ! not used
339 ! single processors total burning area
340  REAL*8 :: areap ! not used
341 
342  REAL*8 :: TotalGeomVolp
343  REAL*8 :: TotalGeomUndefVolp
344 ! --- Node tracking
345  INTEGER :: NumNodeIO, NumNodeIOpid
346  INTEGER, POINTER, DIMENSION(:) :: NodeIO
347 
348 ! -- For StandAlone Rocfrac
349  REAL*8 :: DummyTractVal
350  REAL*8 :: DummyBurnRate
351  REAL*8 :: DummyFlux
352 
353  LOGICAL :: IONEWER ! change the input format in 2.5
354 
355 ! -- Damping [C] matrix
356  REAL*8 :: KappaDamp
357  LOGICAL :: DampEnabled
358 
359 ! -- Nodal Elements Mass Lumping
360 
361  INTEGER :: NdMassLump
362 ! -- To enforce traction where no fluid is present
363 ! good for stand-alone mode, or cases like the artery
364  LOGICAL :: EnforceTractionS
365  LOGICAL :: EnforceTractionSF
366 ! -- Associates the surface mesh element with the volumitric element
367  INTEGER, POINTER, DIMENSION(:) :: MapSFElVolEl, MapSFnbElVolEl, MapSElVolEl
368 
369  REAL*8, POINTER, DIMENSION(:,:) :: AmpTable
370  INTEGER :: NumEntries
371 
372 
373 !-- proportionality constant
374  REAL*8 :: prop
375 !-- m%d(prop)/dt
376  REAL*8 :: slope
377 
378  INTEGER :: iAmpCnt
379 
380  LOGICAL :: NdBasedEl
381 
382  LOGICAL :: UnDefConfig
383 
384  INTEGER :: NumMatVolHT
385 
386  logical :: HeatTransSoln
387 
388  real*8 :: Temperature0 ! intial temperature of the model
389  real*8 :: ThermalDiffusivity
390 
391  real*8, POINTER, DIMENSION(:) :: KappaHT, Cp
392 
393  REAL*8, POINTER, DIMENSION(:,:,:) :: mixed_map
394  REAL*8, POINTER, DIMENSION(:,:,:) :: enhanced_map
395  REAL*8, POINTER, DIMENSION(:,:) :: Aenh
396 
397  real*8, pointer, dimension(:,:,:) :: dmat
398 
399  logical :: ArtificialDamping
400  REAL*8, POINTER, DIMENSION(:,:) :: DetF_old
401 
402 
403  REAL*8, POINTER, DIMENSION(:) :: BCValueGlb
404 
405  INTEGER :: NumNdsBCcrypt
406  INTEGER, POINTER, DIMENSION(:,:) :: BCFlagCrypt
407 
408  INTEGER :: NumProbesEl, NumProbesNd
409 
410  REAL*8, POINTER, DIMENSION(:,:) :: ProbeCoorNd, ProbeCoorEl
411  INTEGER, POINTER, DIMENSION(:) :: ProbeNd
412 
413  LOGICAL, POINTER, DIMENSION(:) :: PointOnProc
414 
415  INTEGER :: NSTATEV
416  REAL*8, POINTER, DIMENSION(:) :: STATEV_Part1
417 
418  REAL*8, POINTER, DIMENSION(:) :: STATEV_Part2
419 
420  INTEGER :: NMATRIX
421  REAL*8, POINTER, DIMENSION(:) :: MATRIX
422 
423  integer :: NPARTICLE, NPARTICLETYPE
424  REAL*8, POINTER, DIMENSION(:,:) :: PARTICLE
425 
426  integer :: NINTERFAC
427  REAL*8, POINTER, DIMENSION(:) :: INTERFAC
428 
429 
430  LOGICAL :: DebondPart,DebondPart_Matous
431  LOGICAL :: ThermalExpansion
432 
433  REAL*8, POINTER, DIMENSION(:) :: StrainTrace
434 
435  LOGICAL :: AmplitudeTable
436 
437  REAL*8 :: alpha1, alpha2, c3, p1, p2,Yin, a_eta, a_zeta, cm, cb, c2
438 
439  REAL*8, POINTER, DIMENSION(:,:,:) :: L_tensor, M_tensor
440  REAL*8, DIMENSION(1:6,1:6) :: L_bar, M_bar, Lo
441  REAL*8, POINTER, DIMENSION(:,:) :: StrainOld, SoftParam, cd
442  INTEGER :: NumMatVol_Part
443 
444  REAL*8, DIMENSION(1:2) :: ShrMod, BulkMod, PoisRat
445 
446  LOGICAL :: debug_state
447 
448  INTEGER :: NumNpOverlay,NumElOverlay
449  INTEGER, POINTER, DIMENSION(:,:) :: ElConnOverLay
450  REAL*8, POINTER, DIMENSION(:,:) :: CoorOverlay
451 ! INTEGER, POINTER, DIMENSION(:) :: Map2VolNdOverlay
452 
453  REAL*8, POINTER, DIMENSION(:,:) :: etaOverlay, nuOverlay
454 
455  INTEGER, POINTER, DIMENSION(:) :: MapFaceEl2Vol1, FaceOfVolEL1
456 
457  INTEGER, POINTER, DIMENSION(:) :: MapFaceEl2Vol2, FaceOfVolEL2
458 
459  INTEGER :: nf1, nf2
460 
461  INTEGER:: nsubn1, nsubf1, nsubn2, nsubf2, nn, nf
462  INTEGER, POINTER, DIMENSION(:,:) :: sd_subfaces1,sd_subfaces2
463  INTEGER, POINTER, DIMENSION(:) :: sd_subface_parentsB
464  REAL*8, POINTER, DIMENSION(:,:) :: sd_coor1,sd_coor2
465  INTEGER, POINTER, DIMENSION(:) :: sd_subface_parents1,sd_subface_parents2
466  REAL*4, POINTER, DIMENSION(:,:) :: sd_subface_nat_coors1,sd_subface_nat_coors2
467  INTEGER, POINTER, DIMENSION(:) :: sd_subface_counterparts1,sd_subface_counterparts2
468 
469  INTEGER :: Verb
470 
471  LOGICAL :: OverlayExist
472 
473  END TYPE rocfrac_global
474 
475 
476 CONTAINS
477 
478  FUNCTION gettimestring(time)
479  REAL*8 :: time
480  CHARACTER*9 :: gettimestring
481  CHARACTER*15 :: ichrstring
482 
483  WRITE(ichrstring,'(e13.6)') time*1.e9
484 
485  gettimestring = ichrstring(11:12)//'.'//ichrstring(3:8)
486  END FUNCTION gettimestring
487 
488  SUBROUTINE associate_pointer( attr, ptr)
489  TYPE(rocfrac_global), POINTER :: attr, ptr
490  ptr => attr
491  END SUBROUTINE associate_pointer
492 
493 END MODULE rocstar_rocfrac
494 
character *9 function gettimestring(time)
const COM::Attribute * attr(const COM::Attribute *a) const
Obtain the attribute on the parent pane of the node.
Definition: Manifold_2.h:404
subroutine associate_pointer(attr, ptr)
Aff_transformation_rep_baseS2< FT > * ptr() const