OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
gradient_limitation2.F File Reference
#include "implicit_f.inc"
#include "vect01_c.inc"
#include "com04_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine gradient_limitation2 (ixq, x, trimat)

Function/Subroutine Documentation

◆ gradient_limitation2()

subroutine gradient_limitation2 ( integer, dimension(nixq, numelq), intent(in) ixq,
dimension(3,numnod), intent(in) x,
integer, intent(in) trimat )

Definition at line 31 of file gradient_limitation2.F.

32C-----------------------------------------------
33C D e s c r i p t i o n
34C limits the amplitude of this gradient in such a way that
35C extrapolated values on the nodes of the element lie between
36C local minimum and maximum values from the neighboring elements
37C -> maximum principle purpose
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE alemuscl_mod
42 use element_mod , only :nixq
43C-----------------------------------------------
44C I m p l i c i t T y p e s
45C-----------------------------------------------
46#include "implicit_f.inc"
47C-----------------------------------------------
48C C o m m o n B l o c k s
49C-----------------------------------------------
50#include "vect01_c.inc"
51#include "com04_c.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER, INTENT(IN) :: IXQ(NIXQ, NUMELQ), TRIMAT
56 my_real, INTENT(IN) :: x(3,numnod)
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER :: I, II, JJ
61 INTEGER :: NODE_ID
62 my_real :: reduc_factor(trimat), nodal_reduc_factor, yn, zn, valnode
63 INTEGER :: ITRIMAT
64 INTEGER :: NNUM
65 my_real :: yk, zk
66C-----------------------------------------------
67C S o u r c e L i n e s
68C-----------------------------------------------
69 !!! Limiting process for the computed gradient -> maximum principle
70 !!! and stability purposes
71 DO i = lft, llt
72 ii = i + nft
73 !!!centroid element
74 yk = alemuscl_buffer%ELCENTER(ii,2) ; zk = alemuscl_buffer%ELCENTER(ii,3)
75 reduc_factor = ep30
76 nnum = 0
77 DO itrimat = 1, trimat
78 IF(abs(alemuscl_buffer%GRAD(ii,2,itrimat)) +
79 . abs(alemuscl_buffer%GRAD(ii,3,itrimat)) > zero) THEN
80 nnum = nnum + 1
81 !!! Check the nodes of the element
82 DO jj = 1, 4
83 node_id = ixq(jj+1, ii)
84 !!! Get the node coordinates
85 yn = x(2, node_id) ; zn = x(3, node_id)
86 !!! Interpolate the function at the node
87 valnode = alemuscl_buffer%VOLUME_FRACTION(ii,itrimat)
88 . + alemuscl_buffer%GRAD(ii,2,itrimat) * (yn - yk)
89 . + alemuscl_buffer%GRAD(ii,3,itrimat) * (zn - zk)
90 nodal_reduc_factor = one
91 IF (valnode - alemuscl_buffer%VOLUME_FRACTION(ii,itrimat) > zero) THEN
92 nodal_reduc_factor =
93 . min((alemuscl_buffer%NODE_MAX_VALUE(node_id,itrimat) - alemuscl_buffer%VOLUME_FRACTION(ii,itrimat))
94 . / (valnode - alemuscl_buffer%VOLUME_FRACTION(ii,itrimat)), alemuscl_param%BETA)
95 ELSE IF (valnode - alemuscl_buffer%VOLUME_FRACTION(ii,itrimat) < zero) THEN
96 nodal_reduc_factor =
97 . min((alemuscl_buffer%NODE_MIN_VALUE(node_id,itrimat) - alemuscl_buffer%VOLUME_FRACTION(ii,itrimat))
98 . / (valnode - alemuscl_buffer%VOLUME_FRACTION(ii,itrimat)), alemuscl_param%BETA)
99 ENDIF
100 reduc_factor(itrimat) = min(reduc_factor(itrimat), nodal_reduc_factor)
101 ENDDO ! JJ = 1, 8
102 ELSE
103 reduc_factor(itrimat) = zero
104 ENDIF
105 ENDDO ! ITRIMAT = 1, TRIMAT
106
107 DO itrimat = 1, trimat
108 IF(abs(alemuscl_buffer%GRAD(ii,2,itrimat)) + abs(alemuscl_buffer%GRAD(ii,3,itrimat)) > zero) THEN
109 !!! Limitation of the gradient
110 alemuscl_buffer%GRAD(ii,2,itrimat) = reduc_factor(itrimat) * alemuscl_buffer%GRAD(ii,2,itrimat)
111 alemuscl_buffer%GRAD(ii,3,itrimat) = reduc_factor(itrimat) * alemuscl_buffer%GRAD(ii,3,itrimat)
112 ENDIF
113 ENDDO
114 ENDDO ! I = LFT, LLT
115C-----------------------------------------------
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
type(alemuscl_param_) alemuscl_param
type(alemuscl_buffer_) alemuscl_buffer