-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathmodlfl.f
93 lines (72 loc) · 2.92 KB
/
modlfl.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
!$Id:$
subroutine modlfl(ii,d,ta,eps,veps,h1,h2,nh,istrt, dd,sig,
& alam,ha,isw)
! * * F E A P * * A Finite Element Analysis Program
!.... Copyright (c) 1984-2024: Regents of the University of California
! All rights reserved
!-----[--.----+----.----+----.-----------------------------------------]
! Modification log Date (dd/mm/year)
! Original version 02/04/2018
!-----[--.----+----.----+----.-----------------------------------------]
! Purpose: Fluid Constitutive Equation Driver
! Input parameters
! ii - Point being processed
! d(*) - up to ndd-nud-1 material parameters
! ta - Temperature change from stress free state
! eps(9,3) - Current strain rates and fluxes at point
! h(nh) - History terms at point
! nh - Number of history terms
! istrt - Start state: 0 = elastic; 1 = last solution
! alam - Augmented multiplier
! im - Material type
! Ouput parameters
! dd(6,6,5) - Current material tangent moduli
! Coupled problems: | dd_1 dd_2 |
! | dd_3 dd_4 |
! Rayleigh damping: dd_5
! sig(6) - Stresses at point.
! ha - Augmented function (trace-eps)
!-----[--.----+----.----+----.-----------------------------------------]
implicit none
include 'cdat1.h'
include 'eldata.h'
include 'pointer.h'
include 'comblk.h'
integer :: ii,nh,istrt,isw, umat,uprm, imat
real (kind=8) :: alam, ha, ta, epsth, veps, elamd,eha
real (kind=8) :: d(*),eps(9,*),dd(6,6,5),sig(*),theta(3)
real (kind=8) :: h1(*),h2(*)
save
! Check for user model
uprm = ndd-nud
umat = int(d(uprm)) - 100
! Zero stress and dd arrays
sig(1:6) = 0.0d0
dd(:,:,:) = 0.0d0
epsth = 0.0d0 ! Thermal strain rate for augmenting
! Set constant initial stresses
if(nint(d(160)).eq.1) then
sig(1:6) = d(161:166)
end if
! Program material models
if(umat.lt.0) then
imat = nint(d(20))
! Newtonian fluid
if(imat.eq.1) then
call newtonian(d,eps,veps, sig, dd(1,1,1))
endif
! U s e r M o d e l I n t e r f a c e
else
! Compute trace to pass to user module
theta(1:3) = eps(1,1:3) + eps(2,1:3) + eps(3,1:3)
elamd = alam
eha = ha
call umodel(umat,eps,theta,ta,d(1),d(uprm+1),h1(1),h2(1),nh,
& ii,istrt,sig,dd,isw)
alam = elamd
ha = eha
end if
! Compute augmented function (trace-epsilon = 0)
ha = veps- epsth
sig(1:3) = sig(1:3) + alam
end subroutine modlfl