7 use hecmw,
only : kint, kreal
19 subroutine stf_c1( etype,nn,ecoord,area,gausses,stiff, u ,temperature )
20 integer(kind=kint),
intent(in) :: etype
21 integer(kind=kint),
intent(in) :: nn
22 real(kind=kreal),
intent(in) :: ecoord(3,nn)
23 real(kind=kreal),
intent(in) :: area
25 real(kind=kreal),
intent(out) :: stiff(:,:)
26 real(kind=kreal),
intent(in),
optional :: u(:,:)
27 real(kind=kreal),
intent(in),
optional :: temperature(nn)
29 real(kind=kreal) llen, llen0, elem(3,nn)
31 real(kind=kreal) ina(1), outa(1), direc(3), direc0(3), coeff, strain
32 integer(kind=kint) :: i,j
36 elem(:,:) = ecoord(:,:) + u(:,:)
38 elem(:,:) = ecoord(:,:)
41 direc = elem(:,2)-elem(:,1)
42 llen = dsqrt( dot_product(direc, direc) )
44 direc0 = ecoord(:,2)-ecoord(:,1)
45 llen0 = dsqrt( dot_product(direc0, direc0) )
47 if(
present(temperature) )
then
48 ina(1) = 0.5d0*(temperature(1)+temperature(2))
49 call fetch_tabledata( mc_isoelastic, gausses(1)%pMaterial%dict, outa, ierr, ina )
51 call fetch_tabledata( mc_isoelastic, gausses(1)%pMaterial%dict, outa, ierr )
53 if( ierr ) outa(1) = gausses(1)%pMaterial%variables(m_youngs)
54 coeff = outa(1)*area*llen0/(llen*llen)
55 strain = gausses(1)%strain(1)
59 stiff(i,i) = coeff*strain
61 stiff(i,j) = stiff(i,j) + coeff*(1.d0-2.d0*strain)*direc(i)*direc(j)
65 stiff(4:6,1:3) = -stiff(1:3,1:3)
66 stiff(1:3,4:6) = transpose(stiff(4:6,1:3))
67 stiff(4:6,4:6) = stiff(1:3,1:3)
74 subroutine update_c1( etype, nn, ecoord, area, u, du, qf ,gausses, TT, T0 )
78 integer(kind=kint),
intent(in) :: etype
79 integer(kind=kint),
intent(in) :: nn
80 real(kind=kreal),
intent(in) :: ecoord(3,nn)
81 real(kind=kreal),
intent(in) :: area
82 real(kind=kreal),
intent(in) :: u(3,nn)
83 real(kind=kreal),
intent(in) :: du(3,nn)
84 real(kind=kreal),
intent(out) :: qf(nn*3)
86 real(kind=kreal),
intent(in),
optional :: tt(nn)
87 real(kind=kreal),
intent(in),
optional :: t0(nn)
90 real(kind=kreal) :: direc(3), direc0(3)
91 real(kind=kreal) :: llen, llen0, ina(1), outa(1)
92 real(kind=kreal) :: elem(3,nn)
93 real(kind=kreal) :: young
94 real(kind=kreal) :: ttc, tt0, alp, alp0, epsth
99 elem(:,:) = ecoord(:,:) + u(:,:) + du(:,:)
101 direc = elem(:,2)-elem(:,1)
102 llen = dsqrt( dot_product(direc, direc) )
104 direc0 = ecoord(:,2)-ecoord(:,1)
105 llen0 = dsqrt( dot_product(direc0, direc0) )
108 if(
present(tt) .and.
present(t0) )
then
109 ttc = 0.5d0*(tt(1)+tt(2))
110 tt0 = 0.5d0*(t0(1)+t0(2))
113 call fetch_tabledata( mc_isoelastic, gausses(1)%pMaterial%dict, outa, ierr, ina )
114 if( ierr ) outa(1) = gausses(1)%pMaterial%variables(m_youngs)
117 call fetch_tabledata( mc_themoexp, gausses(1)%pMaterial%dict, outa(:), ierr, ina )
118 if( ierr ) outa(1) = gausses(1)%pMaterial%variables(m_exapnsion)
122 call fetch_tabledata( mc_themoexp, gausses(1)%pMaterial%dict, outa(:), ierr, ina )
123 if( ierr ) outa(1) = gausses(1)%pMaterial%variables(m_exapnsion)
128 call fetch_tabledata( mc_isoelastic, gausses(1)%pMaterial%dict, outa, ierr )
129 if( ierr ) outa(1) = gausses(1)%pMaterial%variables(m_youngs)
133 gausses(1)%strain(1) = dlog(llen/llen0)
134 gausses(1)%stress(1) = young*(gausses(1)%strain(1)-epsth)
137 gausses(1)%strain_out(1) = gausses(1)%strain(1)
138 gausses(1)%stress_out(1) = gausses(1)%stress(1)
140 qf(1) = gausses(1)%stress(1)*area*llen0/llen
141 qf(1:3) = -qf(1)*direc
152 integer(kind=kint),
intent(in) :: etype,nn
154 real(kind=kreal),
intent(out) :: ndstrain(nn,6)
155 real(kind=kreal),
intent(out) :: ndstress(nn,6)
157 ndstrain(1,1:6) = gausses(1)%strain(1:6)
158 ndstress(1,1:6) = gausses(1)%stress(1:6)
159 ndstrain(2,1:6) = gausses(1)%strain(1:6)
160 ndstress(2,1:6) = gausses(1)%stress(1:6)
170 integer(kind=kint),
intent(in) :: ETYPE
172 real(kind=kreal),
intent(out) :: strain(6)
173 real(kind=kreal),
intent(out) :: stress(6)
176 strain(:) = gausses(1)%strain(1:6)
177 stress(:) = gausses(1)%stress(1:6)
182 subroutine dl_c1(etype, nn, xx, yy, zz, rho, thick, ltype, params, &
188 integer(kind = kint),
intent(in) :: etype, nn
189 real(kind = kreal),
intent(in) :: xx(:), yy(:), zz(:)
190 real(kind = kreal),
intent(in) :: params(0:6)
191 real(kind = kreal),
intent(inout) :: vect(:)
192 real(kind = kreal) :: rho, thick
193 integer(kind = kint) :: ltype, nsize
195 integer(kind = kint) :: ndof = 3
196 integer(kind = kint) :: ivol, isuf, i
197 real(kind = kreal) :: vx, vy, vz, val, a, aa
204 if( ltype .LT. 10 )
then
206 else if( ltype .GE. 10 )
then
213 vect(1:nsize) = 0.0d0
216 if( ivol .EQ. 1 )
then
217 if( ltype .EQ. 4 )
then
218 aa = dsqrt( ( xx(2)-xx(1) )*( xx(2)-xx(1) ) &
219 +( yy(2)-yy(1) )*( yy(2)-yy(1) ) &
220 +( zz(2)-zz(1) )*( zz(2)-zz(1) ) )
226 vx = vx/dsqrt( params(1)**2+params(2)**2+params(3)**2 )
227 vy = vy/dsqrt( params(1)**2+params(2)**2+params(3)**2 )
228 vz = vz/dsqrt( params(1)**2+params(2)**2+params(3)**2 )
231 vect(3*i-2) = val*rho*a*0.5d0*aa*vx
232 vect(3*i-1) = val*rho*a*0.5d0*aa*vy
233 vect(3*i ) = val*rho*a*0.5d0*aa*vz
248 type (hecmwST_matrix) :: hecMAT
249 type (hecmwST_local_mesh) :: hecMESH
250 integer(kind=kint) :: itype, is, iE, ic_type, icel, jS, j, n
252 do itype = 1, hecmesh%n_elem_type
253 ic_type = hecmesh%elem_type_item(itype)
254 if(ic_type == 301)
then
255 is = hecmesh%elem_type_index(itype-1) + 1
256 ie = hecmesh%elem_type_index(itype )
258 js = hecmesh%elem_node_index(icel-1)
260 n = hecmesh%elem_node_item(js+j)
261 if( hecmat%D(9*n-8) == 0.0d0)
then
262 hecmat%D(9*n-8) = 1.0d0
265 if( hecmat%D(9*n-4) == 0.0d0)
then
266 hecmat%D(9*n-4) = 1.0d0
269 if( hecmat%D(9*n ) == 0.0d0)
then
270 hecmat%D(9*n ) = 1.0d0
285 type (hecmwST_matrix) :: hecMAT
286 type (hecmwST_local_mesh) :: hecMESH
287 integer :: n, nn, is, iE, i, a
291 is = hecmat%IndexL(n-1)+1
292 ie = hecmat%IndexL(n )
294 if(hecmat%AL(9*i-8) /= 0.0d0) a = 1
295 if(hecmat%AL(9*i-7) /= 0.0d0) a = 1
296 if(hecmat%AL(9*i-6) /= 0.0d0) a = 1
298 is = hecmat%IndexU(n-1)+1
299 ie = hecmat%IndexU(n )
301 if(hecmat%AU(9*i-8) /= 0.0d0) a = 1
302 if(hecmat%AU(9*i-7) /= 0.0d0) a = 1
303 if(hecmat%AU(9*i-6) /= 0.0d0) a = 1
305 if(hecmat%D(9*n-7) /= 0.0d0) a = 1
306 if(hecmat%D(9*n-6) /= 0.0d0) a = 1
308 hecmat%D(9*n-8) = 1.0d0
314 is = hecmat%IndexL(n-1)+1
315 ie = hecmat%IndexL(n )
317 if(hecmat%AL(9*i-5) /= 0.0d0) a = 1
318 if(hecmat%AL(9*i-4) /= 0.0d0) a = 1
319 if(hecmat%AL(9*i-3) /= 0.0d0) a = 1
321 is = hecmat%IndexU(n-1)+1
322 ie = hecmat%IndexU(n )
324 if(hecmat%AU(9*i-5) /= 0.0d0) a = 1
325 if(hecmat%AU(9*i-4) /= 0.0d0) a = 1
326 if(hecmat%AU(9*i-3) /= 0.0d0) a = 1
328 if(hecmat%D(9*n-5) /= 0.0d0) a = 1
329 if(hecmat%D(9*n-3) /= 0.0d0) a = 1
331 hecmat%D(9*n-4) = 1.0d0
337 is = hecmat%IndexL(n-1)+1
338 ie = hecmat%IndexL(n )
340 if(hecmat%AL(9*i-2) /= 0.0d0) a = 1
341 if(hecmat%AL(9*i-1) /= 0.0d0) a = 1
342 if(hecmat%AL(9*i ) /= 0.0d0) a = 1
344 is = hecmat%IndexU(n-1)+1
345 ie = hecmat%IndexU(n )
347 if(hecmat%AU(9*i-2) /= 0.0d0) a = 1
348 if(hecmat%AU(9*i-1) /= 0.0d0) a = 1
349 if(hecmat%AU(9*i ) /= 0.0d0) a = 1
351 if(hecmat%D(9*n-2) /= 0.0d0) a = 1
352 if(hecmat%D(9*n-1) /= 0.0d0) a = 1
354 hecmat%D(9*n ) = 1.0d0
362 subroutine stf_connector( etype, nn, ecoord, gausses, stiff, u, temperature )
363 integer(kind=kint),
intent(in) :: etype
364 integer(kind=kint),
intent(in) :: nn
365 real(kind=kreal),
intent(in) :: ecoord(3,nn)
367 real(kind=kreal),
intent(out) :: stiff(:,:)
368 real(kind=kreal),
intent(in) :: u(:,:)
369 real(kind=kreal),
intent(in) :: temperature(nn)
371 integer(kind=kint) :: mtype, ctype
372 integer(kind=kint) :: i, j, n_ndof, dof1, dof2, id1, id2
377 if( getnumofspring_dparam( gausses(1)%pMaterial ) > 0 )
then
382 if( getnumofspring_aparam( gausses(1)%pMaterial ) > 0 )
then
389 subroutine dmp_connector( etype, nn, ecoord, gausses, damping, u, temperature )
390 integer(kind=kint),
intent(in) :: etype
391 integer(kind=kint),
intent(in) :: nn
392 real(kind=kreal),
intent(in) :: ecoord(3,nn)
394 real(kind=kreal),
intent(out) :: damping(:,:)
395 real(kind=kreal),
intent(in) :: u(:,:)
396 real(kind=kreal),
intent(in) :: temperature(nn)
398 integer(kind=kint) :: mtype, ctype
399 integer(kind=kint) :: i, j, n_ndof, dof1, dof2, id1, id2
404 if( getnumofdashpot_dparam( gausses(1)%pMaterial ) > 0 )
then
409 if( getnumofdashpot_aparam( gausses(1)%pMaterial ) > 0 )
then
421 integer(kind=kint),
intent(in) :: etype
422 integer(kind=kint),
intent(in) :: nn
423 real(kind=kreal),
intent(in) :: ecoord(3,nn)
424 real(kind=kreal),
intent(in) :: u(3,nn)
425 real(kind=kreal),
intent(in) :: du(3,nn)
426 real(kind=kreal),
intent(out) :: qf(nn*3)
428 real(kind=kreal),
intent(in),
optional :: tt(nn)
431 integer(kind=kint) :: mtype, ctype
432 real(kind=kreal) llen, llen0, elem(3,nn)
433 real(kind=kreal) direc(3), direc0(3), ratio
434 real(kind=kreal) :: params(4)
435 integer(kind=kint) :: i, j, n_ndof, dof1, dof2, id1, id2
439 gausses(1)%strain(:) = 0.d0
440 gausses(1)%stress(:) = 0.d0
443 if( getnumofspring_dparam( gausses(1)%pMaterial ) > 0 )
then
448 if( getnumofspring_aparam( gausses(1)%pMaterial ) > 0 )
then
453 gausses(1)%strain_out(:) = gausses(1)%strain(:)
454 gausses(1)%stress_out(:) = gausses(1)%stress(:)
460 real(kind=kreal),
intent(out) :: stiff(:,:)
462 real(kind=kreal) :: params(1)
463 integer(kind=kint) :: iparams(2)
464 integer(kind=kint) :: i, j, n_ndof, id1, id2
466 n_ndof = getnumofspring_dparam( gausses(1)%pMaterial )
472 stiff(id1,id1) = stiff(id1,id1) + params(1)
473 stiff(id1,id2) = stiff(id1,id2) - params(1)
474 stiff(id2,id1) = stiff(id2,id1) - params(1)
475 stiff(id2,id2) = stiff(id2,id2) + params(1)
481 real(kind=kreal),
intent(in) :: ecoord(:,:)
482 real(kind=kreal),
intent(in) :: u(:,:)
483 real(kind=kreal),
intent(in) :: du(:,:)
484 real(kind=kreal),
intent(out) :: qf(:)
487 real(kind=kreal) :: params(1)
488 integer(kind=kint) :: iparams(2)
489 real(kind=kreal) :: totaldisp(3,2), stretch, sforce
490 integer(kind=kint) :: i, j, n_ndof, dof1, dof2, id1, id2
492 n_ndof = getnumofspring_dparam( gausses(1)%pMaterial )
493 totaldisp(1:3,1:2) = u(1:3,1:2) + du(1:3,1:2)
501 stretch = totaldisp(dof1,1)-totaldisp(dof2,2)
502 sforce = params(1) * stretch
503 if( dof1 == dof2 )
then
504 gausses(1)%strain(dof1) = gausses(1)%strain(dof1) + stretch
505 gausses(1)%stress(dof1) = gausses(1)%stress(dof1) + sforce
507 qf(id1) = qf(id1) + sforce
508 qf(id2) = qf(id2) - sforce
514 real(kind=kreal),
intent(in) :: ecoord(:,:)
515 real(kind=kreal),
intent(in) :: u(:,:)
516 real(kind=kreal),
intent(out) :: stiff(:,:)
518 real(kind=kreal) :: params(1)
519 integer(kind=kint) :: iparams(2)
520 integer(kind=kint) :: i, j, n_ndof, dof1, dof2, id1, id2
521 real(kind=kreal) :: llen, llen0, elem(3,2)
522 real(kind=kreal) :: direc(3), direc0(3), ratio
528 elem(1:3,1:2) = ecoord(1:3,1:2) + u(1:3,1:2)
531 direc = elem(1:3,1) - elem(1:3,2)
532 llen = dsqrt( dot_product(direc, direc) )
535 direc0 = ecoord(1:3,1) - ecoord(1:3,2)
536 llen0 = dsqrt( dot_product(direc0, direc0) )
539 if( llen < 1.d-10 )
then
543 direc(1:3) = direc(1:3) / llen
544 ratio = (llen - llen0) / llen
549 stiff(i,i) = stiff(i,i) + params(1) * ratio
551 stiff(i,j) = stiff(i,j) + params(1) * (1.d0 - ratio) * direc(i) * direc(j)
556 stiff(4:6, 1:3) = -stiff(1:3, 1:3)
557 stiff(1:3, 4:6) = transpose(stiff(4:6, 1:3))
558 stiff(4:6, 4:6) = stiff(1:3, 1:3)
564 real(kind=kreal),
intent(in) :: ecoord(:,:)
565 real(kind=kreal),
intent(in) :: u(:,:)
566 real(kind=kreal),
intent(in) :: du(:,:)
567 real(kind=kreal),
intent(out) :: qf(:)
570 real(kind=kreal) :: params(1)
571 integer(kind=kint) :: iparams(2)
572 real(kind=kreal) :: llen, llen0, elem(3,2)
573 real(kind=kreal) :: direc(3), direc0(3)
579 elem(1:3,1:2) = ecoord(1:3,1:2) + u(1:3,1:2) + du(1:3,1:2)
582 direc = elem(1:3,1) - elem(1:3,2)
583 llen = dsqrt( dot_product(direc, direc) )
586 direc0 = ecoord(1:3,1) - ecoord(1:3,2)
587 llen0 = dsqrt( dot_product(direc0, direc0) )
590 if( llen < 1.d-10 )
then
593 direc(1:3) = direc(1:3) / llen
597 gausses(1)%strain(1) = llen - llen0
598 gausses(1)%stress(1) = params(1) * gausses(1)%strain(1)
601 qf(1:3) = qf(1:3) + gausses(1)%stress(1)*direc(1:3)
602 qf(4:6) = qf(4:6) - gausses(1)%stress(1)*direc(1:3)
607 real(kind=kreal),
intent(out) :: stiff(:,:)
609 real(kind=kreal) :: params(1)
610 integer(kind=kint) :: iparams(2)
611 integer(kind=kint) :: i, j, n_ndof, id1, id2
613 n_ndof = getnumofdashpot_dparam( gausses(1)%pMaterial )
619 stiff(id1,id1) = stiff(id1,id1) + params(1)
620 stiff(id1,id2) = stiff(id1,id2) - params(1)
621 stiff(id2,id1) = stiff(id2,id1) - params(1)
622 stiff(id2,id2) = stiff(id2,id2) + params(1)
628 real(kind=kreal),
intent(in) :: ecoord(:,:)
629 real(kind=kreal),
intent(in) :: u(:,:)
630 real(kind=kreal),
intent(out) :: stiff(:,:)
632 real(kind=kreal) :: params(1)
633 integer(kind=kint) :: iparams(2)
634 integer(kind=kint) :: i, j, n_ndof, dof1, dof2, id1, id2
635 real(kind=kreal) :: llen, elem(3,2)
636 real(kind=kreal) :: direc(3), ratio
642 elem(1:3,1:2) = ecoord(1:3,1:2) + u(1:3,1:2)
645 direc = elem(1:3,1) - elem(1:3,2)
646 llen = dsqrt( dot_product(direc, direc) )
649 if( llen < 1.d-10 )
then
653 direc(1:3) = direc(1:3) / llen
654 ratio = gausses(1)%strain(1) / llen
659 stiff(i,i) = stiff(i,i) + params(1) * ratio
661 stiff(i,j) = stiff(i,j) + params(1) * (1.d0 - ratio) * direc(i) * direc(j)
666 stiff(4:6, 1:3) = -stiff(1:3, 1:3)
667 stiff(1:3, 4:6) = transpose(stiff(4:6, 1:3))
668 stiff(4:6, 4:6) = stiff(1:3, 1:3)
This module encapsulate the basic functions of all elements provide by this software.
This module defines common data and basic structures for analysis.
real(kind=kreal), pointer ref_temp
REFTEMP.
This module manages calculation relates with materials.
subroutine getconnectorproperty(gauss, ctype, dofid, rparams, iparams, stretch)
This module provide common functions of 3D truss elements.
subroutine stf_dashpot_a(gausses, ecoord, u, stiff)
subroutine update_spring_d(gausses, ecoord, u, du, qf)
subroutine update_spring_a(gausses, ecoord, u, du, qf)
subroutine stf_spring_d(gausses, stiff)
subroutine elementstress_c1(ETYPE, gausses, strain, stress)
subroutine nodalstress_c1(ETYPE, NN, gausses, ndstrain, ndstress)
subroutine search_diag_modify(n, nn, hecMAT, hecMESH)
subroutine update_c1(etype, nn, ecoord, area, u, du, qf, gausses, TT, T0)
Update strain and stress inside element.
subroutine stf_connector(etype, nn, ecoord, gausses, stiff, u, temperature)
This subroutine calculate stiff matrix of 2-nodes connector element.
subroutine stf_spring_a(gausses, ecoord, u, stiff)
subroutine dmp_connector(etype, nn, ecoord, gausses, damping, u, temperature)
This subroutine calculate damping matrix of 2-nodes connector element.
subroutine stf_c1(etype, nn, ecoord, area, gausses, stiff, u, temperature)
This subroutine calculate stiff matrix of 2-nodes truss element.
subroutine stf_dashpot_d(gausses, stiff)
subroutine truss_diag_modify(hecMAT, hecMESH)
subroutine dl_c1(etype, nn, xx, yy, zz, rho, thick, ltype, params, vect, nsize)
subroutine update_connector(etype, nn, ecoord, u, du, qf, gausses, TT)
Update strain and stress inside spring element.
This modules defines a structure to record history dependent parameter in static analysis.
All data should be recorded in every quadrature points.