Dear feap forum,
I recently encountered strange Paraview output files when using PVIEw,TIME. I implemented a linear elastic fictitious domain material routine, which I tested using a square domain with a circular inclusion. The attachment "orderParameter.png" shows the order parameter p with the circular inclusion p=0 and the surrounding material p=1. A smooth transition is established via a hypberbolic tangent and the gradient, which is needed for some computations in the vicinity of the interface is depicted by the white arrows. The order parameter and all gradient components are saved to the time independent history once at the beginning.
The input file reads as follows:
FEAP * * 2D: 6-node triangle
INCLude,PROB_2dellnco
MATErial,1
user 01
Umat 3
E1 1000.0d0 ! stiff inclusion
nu1 0.25d0
E2 100.0d0 ! matrix
nu2 0.25d0
INCLude,MESH_2dellnco
EBOUndary
1 0 1 0
2 0 0 1
1 10 1 0
EDISplacement
1 10 2.0 0
END mesh
! Solution
BATCh
PVIEw,TIME
TOL,ITER,1.0d-7,1.0d-7
LOOP iter 5
TANG,,1
NEXT iter
PVIEw,TIME
END
STOP
As you can see, the paraview file is written twice and hence is the projection of Gauss point variables to the nodes. The first file (orderparameter.png) contains 12 values, which are zero (stress and strain), which is obvious, because loading hasn't started yet, and 4 nonzero values (order parameter and gradient). Everything looks fine at this moment. However, when I write the paraview file the second time, each of the 16 projected values shows strange behaviour as you can see from the exemplary picture I attached (strange_projection.png). To verify the simulation result, I had a look at the primary field (warped_displacement.png), but everything seems fine.
It gets even stranger, when I test the same setup with my linear elastic testing routine. For this case, I do not observe those oscillations/artifacts at all, but rather can observe the homogeneous stress and strain response. The relevant code snipped of the projection routine for the quadratic triangles reads as follows:
...
elseif (nel.eq.6 .and. ndm.eq.2) then ! quadratic tri elements
mattri(:,:) = 0.0d0
siggtri(:,:) = 0.0d0
! loop over al QPs
do l = 1,lint
do i = 1,iste
if (i.le.dep) then
field(i)=hr(nh2+dep*(l-1)+i-1)
else
field(i)=hr(nh3+indep*(l-1)+(i-dep)-1)
endif
end do
do j = 1,3
xj = el2(j,l)*el2(4,l)
mattri(:,j) = mattri(:,j) + el2(1:3,l)*xj
siggtri(j,1:iste) = siggtri(j,1:iste) + field(1:iste)*xj
end do ! j
end do ! l
call invert(mattri,3,3)
do j = 1,iste
gsigtri(:,j) = mattri(:,1)*siggtri(1,j)+ mattri(:,2)*siggtri(2,j)+ mattri(:,3)*siggtri(3,j)
end do ! j
p(1:6) = 1.0d0
! Project stresses
do j = 1,iste
s(1:3,j) = gsigtri(1:3,j) ! Vertex nodes
s( 4,j) = (gsigtri(1,j) + gsigtri(2,j))*0.5d0 ! Mid-edge node
s( 5,j) = (gsigtri(2,j) + gsigtri(3,j))*0.5d0
s( 6,j) = (gsigtri(3,j) + gsigtri(1,j))*0.5d0
end do ! j
write(*,*) dep,indep,iste,istv
...
The parameters dep and indep reflect the number of time dependent and independent history variables. The values iste and istv are set before the projection routine is called. For the linear elastic case, dep=12, indep=0, iste=istv=12 and for the fictitious domain case, dep=12, indep=4, iste=istv=16.
Does anybody have an idea, why the projection is sensitive to the number of projected values even if all variables seem to be set correctly?
Warm regards,
a118145