11 subroutine mass_c2(etype, nn, ecoord, gausses, sec_opt, thick, mass, lumped, temperature, is_lumped)
17 integer(kind=kint),
intent(in) :: etype
18 integer(kind=kint),
intent(in) :: nn
19 real(kind=kreal),
intent(in) :: ecoord(2,nn)
20 real(kind=kreal),
intent(out) :: mass(:,:)
21 real(kind=kreal),
intent(out) :: lumped(:)
22 real(kind=kreal),
intent(in),
optional :: temperature(nn)
23 logical,
intent(in),
optional :: is_lumped
24 type(tmaterial),
pointer :: matl
25 integer(kind=kint),
parameter :: ndof = 2
26 integer(kind=kint) :: i, j, LX, sec_opt
27 real(kind=kreal) :: naturalcoord(2)
28 real(kind=kreal) :: func(nn), thick
29 real(kind=kreal) :: det, wg, rho
30 real(kind=kreal) :: d(2,2), n(2, nn*ndof), dn(2, nn*ndof)
31 real(kind=kreal) :: gderiv(nn,2)
36 matl => gausses(1)%pMaterial
38 if(sec_opt == 2) thick = 1.0d0
45 if(
present(temperature))
then
49 rho = matl%variables(m_density)
56 rho = matl%variables(m_density)
74 dn(1:2, 1:nn*ndof) = matmul(d, n(1:2, 1:nn*ndof))
77 mass(i,j) = mass(i,j) + dot_product(n(:,i), dn(:,j))*wg
83 if(
present(is_lumped)) do_lumping = is_lumped
87 subroutine mass_c3(etype, nn, ecoord, gausses, mass, lumped, temperature, is_lumped)
93 integer(kind=kint),
intent(in) :: etype
94 integer(kind=kint),
intent(in) :: nn
95 real(kind=kreal),
intent(in) :: ecoord(3,nn)
96 real(kind=kreal),
intent(out) :: mass(:,:)
97 real(kind=kreal),
intent(out) :: lumped(:)
98 real(kind=kreal),
intent(in),
optional :: temperature(nn)
99 logical,
intent(in),
optional :: is_lumped
100 type(tmaterial),
pointer :: matl
101 integer(kind=kint),
parameter :: ndof = 3
102 integer(kind=kint) :: i, j, LX
103 real(kind=kreal) :: naturalcoord(3)
104 real(kind=kreal) :: func(nn)
105 real(kind=kreal) :: det, wg, rho
106 real(kind=kreal) :: d(3, 3), n(3, nn*ndof), dn(3, nn*ndof)
107 real(kind=kreal) :: gderiv(nn, 3)
108 logical :: do_lumping
112 matl => gausses(1)%pMaterial
119 if(
present(temperature))
then
123 rho = matl%variables(m_density)
130 rho = matl%variables(m_density)
150 dn(1:3, 1:nn*ndof) = matmul(d, n(1:3, 1:nn*ndof))
153 mass(i,j) = mass(i,j) + dot_product(n(:,i), dn(:,j))*wg
159 if(
present(is_lumped)) do_lumping = is_lumped
165 real(kind=kreal) :: surf
166 real(kind=kreal) :: thick
167 real(kind=kreal) :: rho
168 real(kind=kreal),
intent(out) :: mass(:,:)
172 mass(i,i) = surf*thick*rho/3.0d0
178 real(kind=kreal) :: surf
179 real(kind=kreal) :: thick
180 real(kind=kreal) :: rho
181 real(kind=kreal),
intent(out) :: mass(:,:)
185 mass(i,i) = surf*thick*rho/4.0d0
191 real(kind=kreal) :: surf
192 real(kind=kreal) :: length
193 real(kind=kreal) :: rho
194 real(kind=kreal),
intent(out) :: mass(:,:)
198 mass(i,i) = 0.5d0*surf*length*rho
204 real(kind=kreal) :: surf
205 real(kind=kreal) :: length
206 real(kind=kreal) :: rho
207 real(kind=kreal),
intent(out) :: mass(:,:)
211 mass(i,i) = 0.5d0*surf*length*rho
218 integer(kind=kint) :: i, j, nn, ndof
219 real(kind=kreal) :: lumped(:), mass(:,:)
220 real(kind=kreal) :: diag_mass, total_mass
223 do i = 1, nn*ndof, ndof
224 do j = 1, nn*ndof, ndof
225 total_mass = total_mass + mass(j,i)
230 do i = 1, nn*ndof, ndof
231 diag_mass = diag_mass + mass(i,i)
234 diag_mass = 1.0d0/diag_mass
236 lumped(i) = lumped(i) + mass(i,i)*total_mass*diag_mass
241 mass(i,i) = lumped(i)
251 (ecoord(1,2) - ecoord(1,1))**2 + &
252 (ecoord(2,2) - ecoord(2,1))**2 + &
253 (ecoord(3,2) - ecoord(3,1))**2 )
259 real(kind=kreal) ::
get_face3, ecoord(3,20)
260 real(kind=kreal) :: a1, a2, a3
261 real(kind=kreal) :: x(3), y(3), z(3)
263 x(1) = ecoord(1,1); y(1) = ecoord(2,1); z(1) = ecoord(3,1)
264 x(2) = ecoord(1,2); y(2) = ecoord(2,2); z(2) = ecoord(3,2)
265 x(3) = ecoord(1,3); y(3) = ecoord(2,3); z(3) = ecoord(3,3)
267 a1 = (x(2) - x(1))**2 + (y(2) - y(1))**2 + (z(2) - z(1))**2
268 a2 = (x(1) - x(3))*(x(2) - x(1)) &
269 & + (y(1) - y(3))*(y(2) - y(1)) &
270 & + (z(1) - z(3))*(z(2) - z(1))
271 a3 = (x(3) - x(1))**2 + (y(3) - y(1))**2 + (z(3) - z(1))**2
279 integer(kind=kint) :: lx, ly
280 real(kind=kreal) ::
get_face4, ecoord(3,20)
281 real(kind=kreal) :: xg(2), ri, si, rp, sp, rm, sm, hr(4), hs(4)
282 real(kind=kreal) :: xr, xs, yr, ys, zr, zs
283 real(kind=kreal) :: x(4), y(4), z(4), det
285 x(1) = ecoord(1,1); y(1) = ecoord(2,1); z(1) = ecoord(3,1)
286 x(2) = ecoord(1,2); y(2) = ecoord(2,2); z(2) = ecoord(3,2)
287 x(3) = ecoord(1,3); y(3) = ecoord(2,3); z(3) = ecoord(3,3)
288 x(4) = ecoord(1,4); y(4) = ecoord(2,4); z(4) = ecoord(3,4)
290 xg(1) = -0.5773502691896258d0
316 xr = hr(1)*x(1) + hr(2)*x(2) + hr(3)*x(3) + hr(4)*x(4)
317 xs = hs(1)*x(1) + hs(2)*x(2) + hs(3)*x(3) + hs(4)*x(4)
318 yr = hr(1)*y(1) + hr(2)*y(2) + hr(3)*y(3) + hr(4)*y(4)
319 ys = hs(1)*y(1) + hs(2)*y(2) + hs(3)*y(3) + hs(4)*y(4)
320 zr = hr(1)*z(1) + hr(2)*z(2) + hr(3)*z(3) + hr(4)*z(4)
321 zs = hs(1)*z(1) + hs(2)*z(2) + hs(3)*z(3) + hs(4)*z(4)
323 det = (yr*zs - zr*ys)**2 + (zr*xs - xr*zs)**2 + (xr*ys - yr*xs)**2
This module encapsulate the basic functions of all elements provide by this software.
subroutine getshapefunc(fetype, localcoord, func)
Calculate the shape function in natural coordinate system.
subroutine getquadpoint(fetype, np, pos)
Fetch the coordinate of gauss point.
subroutine getglobalderiv(fetype, nn, localcoord, elecoord, det, gderiv)
Calculate shape derivative in global coordinate system.
real(kind=kreal) function getweight(fetype, np)
Fetch the weight value in given gauss point.
integer function numofquadpoints(fetype)
Obtains the number of quadrature points of the element.
This module contains subroutines used in 3d eigen analysis for.
real(kind=kreal) function get_length(ecoord)
subroutine mass_beam_33(surf, length, rho, mass)
real(kind=kreal) function get_face4(ecoord)
subroutine mass_s3(surf, thick, rho, mass)
real(kind=kreal) function get_face3(ecoord)
subroutine mass_beam(surf, length, rho, mass)
subroutine mass_c3(etype, nn, ecoord, gausses, mass, lumped, temperature, is_lumped)
subroutine mass_c2(etype, nn, ecoord, gausses, sec_opt, thick, mass, lumped, temperature, is_lumped)
subroutine mass_s4(surf, thick, rho, mass)
subroutine get_lumped_mass(nn, ndof, mass, lumped)
This module defines common data and basic structures for analysis.
This module manages calculation relates with materials.
This modules defines a structure to record history dependent parameter in static analysis.
All data should be recorded in every quadrature points.