CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
approxplane.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine approxplane (col, straight, xn, nopes)
 

Function/Subroutine Documentation

◆ approxplane()

subroutine approxplane ( real*8, dimension(3,nopes)  col,
real*8, dimension(36)  straight,
real*8, dimension(3)  xn,
integer  nopes 
)
20 !
21 ! calculate the equation of the planes through the
22 ! edges of a quadrilateral and parallel to the vector xn together
23 ! with a plane perpendicular to xn and through the center of gravity
24 ! of the four corner nodes of the quadrilateral
25 ! (so-called mean quadrilateral plane) with
26 ! (col(1,1),col(2,1),col(3,1)),(col(1,2),col(2,2),col(3,2)),
27 ! (col(1,3),col(2,3),col(3,3)),(col(1,4),col(2,4),col(3,4))
28 ! as vertices. The equation of the planes through the first edge
29 ! (connecting the first and the second node) is of the form
30 ! straight(1)*x+straight(2)*y+straight(3)*z+straight(4)=0, such that the
31 ! vector (straight(1),straight(2),straight(3)) points outwards (replace
32 ! (1) by (5),(9) and (13) for the second, third and fourth edge,
33 ! similar offset for (2),(3) and (4);
34 ! The equation of the mean quadrilateral plane is
35 ! straight(17)*x+straight(18)*y+straight(19)*z+straight(20)=0 such
36 ! that the quadrilateral is numbered clockwise when looking in the
37 ! direction of vector (straight(17),straight(18),straight(19)).
38 !
39 ! adapted for quadratic elements hex20, tet10
40 ! Author: Saskia Sitzmann
41 !
42  implicit none
43 !
44  integer i,j,k,nopes
45 !
46  real*8 col(3,nopes),colmean(3),straight(36),ps(8,3),dd,xn(3)
47 !
48 ! sides of the quadrilateral
49 !
50  do i=1,3
51  do j=1,nopes-1
52  ps(j,i)=col(i,j+1)-col(i,j)
53  enddo
54  ps(nopes,i)=col(i,1)-col(i,nopes)
55  enddo
56 !
57 ! mean normal to the quadrilateral (given)
58 !
59  do i=1,3
60  straight(4*nopes+i)=xn(i)
61  enddo
62 !
63 ! ps(j,:) x xn
64 !
65  do j=1,nopes
66  k=(j-1)*4
67  straight(k+1)=ps(j,2)*xn(3)-ps(j,3)*xn(2)
68  straight(k+2)=ps(j,3)*xn(1)-ps(j,1)*xn(3)
69  straight(k+3)=ps(j,1)*xn(2)-ps(j,2)*xn(1)
70  dd=dsqrt(straight(k+1)*straight(k+1)
71  & +straight(k+2)*straight(k+2)
72  & +straight(k+3)*straight(k+3))
73  do i=1,3
74  straight(k+i)=straight(k+i)/dd
75  enddo
76  enddo
77 !
78 ! determining the inhomogeneous terms
79 !
80  do i=1,3
81  colmean(i)=0.0
82  enddo
83  do j=1,nopes
84  k=(j-1)*4
85  straight(k+4)=-straight(k+1)*col(1,j)
86  & -straight(k+2)*col(2,j)
87  & -straight(k+3)*col(3,j)
88  do i=1,3
89  colmean(i)=colmean(i)+col(i,j)
90  enddo
91  enddo
92  straight(4*nopes+4)=(-xn(1)*colmean(1)
93  & -xn(2)*colmean(2)
94  & -xn(3)*colmean(3))/nopes
95 !
96  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)