Civil Engineering Reference
In-Depth Information
Equation (4.16) can also be rewritten as
cos
T
(4.19)
T
P
,
Q
2
r
S
where
1
^
`
^ `
cos
T
n
x
r
with
n
n
,n
and
r
r
,r
(4.20)
x
y
x
y
r
Subroutines for the isotropic solutions are presented below.
MODULE
Laplace_lib
REAL :: PI=3.14159265359
CONTAINS
REAL FUNCTION
U(r,k,Cdim)
!
Fundamental solution for Potential problems
!
Temperature/Potential isotropic material
REAL,INTENT(IN) ::
r !
Distance source and field point
REAL,INTENT(IN) ::
k !
Conducivity
INTEGER,INTENT(IN) ::
Cdim !
Cartesian dimension (2-D,3-D)
SELECT CASE
(CDIM)
CASE
(2)
!
Two-dimensional solution
U= 1.0/(2.0*Pi*k)*LOG(1/r)
CASE
(3) !
Three-dimensional solution
U= 1.0/(4.0*Pi*r*k)
CASE DEFAULT
U=0.0
WRITE
(11,*)'Cdim not equal 2 or 3 in Function U(...)'
END SELECT
END FUNCTION
U
REAL FUNCTION
T(r,dxr,Vnorm,Cdim)
!
Fundamental solution for Potential problems
!
Flow, isotropic material
REAL,INTENT(IN)::
r !
Distance source and field point
REAL,INTENT(IN)::
dxr(:) !
r
,x
,r
,y
,r
,z
REAL,INTENT(IN)::
Vnorm(:) !
Normal vector
INTEGER,INTENT(IN) ::
Cdim !
Cartesian dimension
SELECT CASE
(Cdim)
CASE
(2) !
Two-dimensional solution
T=
DOT_PRODUCT
(Vnorm,dxr)/(2.0*Pi*r)
CASE
(3) !
Three-dimensional solution
T=
DOT_PRODUCT
(Vnorm,dxr)/(4.0*Pi*r*r)
CASE DEFAULT
T=0.0
WRITE (11,*)'Cdim not equal 2 or 3 in Function T(...)'
END SELECT
END FUNCTION T
END
MODULE
Laplace_lib
Search WWH ::
Custom Search