11 subroutine mass_c2(etype, nn, ecoord, gausses, sec_opt, thick, mass, lumped, temperature)
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 type(tmaterial),
pointer :: matl
24 integer(kind=kint),
parameter :: ndof = 2
25 integer(kind=kint) :: i, j, lx, sec_opt
26 real(kind=kreal) :: naturalcoord(2)
27 real(kind=kreal) :: func(nn), thick
28 real(kind=kreal) :: det, wg, rho
29 real(kind=kreal) :: d(2,2), n(2, nn*ndof), dn(2, nn*ndof)
30 real(kind=kreal) :: gderiv(nn,2)
35 matl => gausses(1)%pMaterial
37 if(sec_opt == 2) thick = 1.0d0
44 if(
present(temperature))
then
48 rho = matl%variables(m_density)
55 rho = matl%variables(m_density)
73 dn(1:2, 1:nn*ndof) = matmul(d, n(1:2, 1:nn*ndof))
76 mass(i,j) = mass(i,j) + dot_product(n(:,i), dn(:,j))*wg
85 subroutine mass_c3(etype, nn, ecoord, gausses, mass, lumped, temperature)
91 integer(kind=kint),
intent(in) :: etype
92 integer(kind=kint),
intent(in) :: nn
93 real(kind=kreal),
intent(in) :: ecoord(3,nn)
94 real(kind=kreal),
intent(out) :: mass(:,:)
95 real(kind=kreal),
intent(out) :: lumped(:)
96 real(kind=kreal),
intent(in),
optional :: temperature(nn)
97 type(tmaterial),
pointer :: matl
98 integer(kind=kint),
parameter :: ndof = 3
99 integer(kind=kint) :: i, j, lx
100 real(kind=kreal) :: naturalcoord(3)
101 real(kind=kreal) :: func(nn)
102 real(kind=kreal) :: det, wg, rho
103 real(kind=kreal) :: d(3, 3), n(3, nn*ndof), dn(3, nn*ndof)
104 real(kind=kreal) :: gderiv(nn, 3)
109 matl => gausses(1)%pMaterial
116 if(
present(temperature))
then
120 rho = matl%variables(m_density)
127 rho = matl%variables(m_density)
147 dn(1:3, 1:nn*ndof) = matmul(d, n(1:3, 1:nn*ndof))
150 mass(i,j) = mass(i,j) + dot_product(n(:,i), dn(:,j))*wg
161 real(kind=kreal) :: surf
162 real(kind=kreal) :: thick
163 real(kind=kreal) :: rho
164 real(kind=kreal),
intent(out) :: mass(:,:)
168 mass(i,i) = surf*thick*rho/3.0d0
174 real(kind=kreal) :: surf
175 real(kind=kreal) :: thick
176 real(kind=kreal) :: rho
177 real(kind=kreal),
intent(out) :: mass(:,:)
181 mass(i,i) = surf*thick*rho/4.0d0
187 real(kind=kreal) :: surf
188 real(kind=kreal) :: length
189 real(kind=kreal) :: rho
190 real(kind=kreal),
intent(out) :: mass(:,:)
194 mass(i,i) = 0.5d0*surf*length*rho
200 real(kind=kreal) :: surf
201 real(kind=kreal) :: length
202 real(kind=kreal) :: rho
203 real(kind=kreal),
intent(out) :: mass(:,:)
207 mass(i,i) = 0.5d0*surf*length*rho
214 integer(kind=kint) :: i, j, nn, ndof
215 real(kind=kreal) :: lumped(:), mass(:,:)
216 real(kind=kreal) :: diag_mass, total_mass
219 do i = 1, nn*ndof, ndof
220 do j = 1, nn*ndof, ndof
221 total_mass = total_mass + mass(j,i)
226 do i = 1, nn*ndof, ndof
227 diag_mass = diag_mass + mass(i,i)
230 diag_mass = 1.0d0/diag_mass
232 lumped(i) = lumped(i) + mass(i,i)*total_mass*diag_mass
237 mass(i,i) = lumped(i)
247 (ecoord(1,2) - ecoord(1,1))**2 + &
248 (ecoord(2,2) - ecoord(2,1))**2 + &
249 (ecoord(3,2) - ecoord(3,1))**2 )
255 real(kind=kreal) ::
get_face3, ecoord(3,20)
256 real(kind=kreal) :: a1, a2, a3
257 real(kind=kreal) :: x(3), y(3), z(3)
259 x(1) = ecoord(1,1); y(1) = ecoord(2,1); z(1) = ecoord(3,1)
260 x(2) = ecoord(1,2); y(2) = ecoord(2,2); z(2) = ecoord(3,2)
261 x(3) = ecoord(1,3); y(3) = ecoord(2,3); z(3) = ecoord(3,3)
263 a1 = (x(2) - x(1))**2 + (y(2) - y(1))**2 + (z(2) - z(1))**2
264 a2 = (x(1) - x(3))*(x(2) - x(1)) &
265 & + (y(1) - y(3))*(y(2) - y(1)) &
266 & + (z(1) - z(3))*(z(2) - z(1))
267 a3 = (x(3) - x(1))**2 + (y(3) - y(1))**2 + (z(3) - z(1))**2
275 integer(kind=kint) :: lx, ly
276 real(kind=kreal) ::
get_face4, ecoord(3,20)
277 real(kind=kreal) :: xg(2), ri, si, rp, sp, rm, sm, hr(4), hs(4)
278 real(kind=kreal) :: xr, xs, yr, ys, zr, zs
279 real(kind=kreal) :: x(4), y(4), z(4), det
281 x(1) = ecoord(1,1); y(1) = ecoord(2,1); z(1) = ecoord(3,1)
282 x(2) = ecoord(1,2); y(2) = ecoord(2,2); z(2) = ecoord(3,2)
283 x(3) = ecoord(1,3); y(3) = ecoord(2,3); z(3) = ecoord(3,3)
284 x(4) = ecoord(1,4); y(4) = ecoord(2,4); z(4) = ecoord(3,4)
286 xg(1) = -0.5773502691896258d0
312 xr = hr(1)*x(1) + hr(2)*x(2) + hr(3)*x(3) + hr(4)*x(4)
313 xs = hs(1)*x(1) + hs(2)*x(2) + hs(3)*x(3) + hs(4)*x(4)
314 yr = hr(1)*y(1) + hr(2)*y(2) + hr(3)*y(3) + hr(4)*y(4)
315 ys = hs(1)*y(1) + hs(2)*y(2) + hs(3)*y(3) + hs(4)*y(4)
316 zr = hr(1)*z(1) + hr(2)*z(2) + hr(3)*z(3) + hr(4)*z(4)
317 zs = hs(1)*z(1) + hs(2)*z(2) + hs(3)*z(3) + hs(4)*z(4)
319 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)
subroutine mass_c2(etype, nn, ecoord, gausses, sec_opt, thick, mass, lumped, temperature)
real(kind=kreal) function get_face4(ecoord)
subroutine mass_s3(surf, thick, rho, mass)
real(kind=kreal) function get_face3(ecoord)
subroutine mass_c3(etype, nn, ecoord, gausses, mass, lumped, temperature)
subroutine mass_beam(surf, length, rho, mass)
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.