I think I have found something with the issue with Normal-Tangential Displacement BC with UMAT, (1) in previous post. Here in ElasticSolve, DValues refer to the NT-rotated coords while Displacement refers to cartesian.
Code: Select all
1201 IF (UseUMAT) THEN
1202 ! ---------------------------------------------------------------------------------
1203 ! Now the solution variable is the solution increment while the sif-file specifies
1204 ! the Dirichlet BCs for the complete field. Modify BCs so that the right BC
1205 ! is obtained for the solution increment.
1206 ! ---------------------------------------------------------------------------------
1207 IF (ALLOCATED(StiffMatrix % ConstrainedDOF)) THEN
1208 DO i=1,StiffMatrix % NumberOfRows
1209 IF (StiffMatrix % ConstrainedDOF(i)) THEN
1210 StiffMatrix % DValues(i) = StiffMatrix % DValues(i) - Displacement(i)
1211 END IF
1212 END DO
With the following modification it seems to work
Code: Select all
**** DisplacementRot = Displacement
**** CALL RotateNTSystemAll( DisplacementRot, StressPerm, STDOFs)
1207 IF (ALLOCATED(StiffMatrix % ConstrainedDOF)) THEN
1208 DO i=1,StiffMatrix % NumberOfRows
1209 IF (StiffMatrix % ConstrainedDOF(i)) THEN
1210 !StiffMatrix % DValues(i) = StiffMatrix % DValues(i) - Displacement(i)
**** StiffMatrix % DValues(i) = StiffMatrix % DValues(i) - DisplacementRot(i)
1211 END IF
1212 END DO
Also I had to modify
Code: Select all
1163 IF (UseUmat .AND. Iter == 1) THEN
1164 ! ---------------------------------------------------------------------------
1165 ! Update the RHS vector which contains just the contribution of external loads
1166 ! for the purpose of nonlinear error estimation:
1167 ! ---------------------------------------------------------------------------
1168 ValuesSaved => StiffMatrix % RHS
1169 StiffMatrix % RHS => StiffMatrix % BulkRHS
1170 CALL DefaultUpdateForce(LocalForce)
1171 Solver % Matrix % RHS => ValuesSaved
1172 END IF
--
1187 CALL DefaultUpdateEquations( LocalStiffMatrix, LocalForce )
to
Code: Select all
1163 IF (UseUmat .AND. Iter == 1) THEN
1164 ! ---------------------------------------------------------------------------
1165 ! Update the RHS vector which contains just the contribution of external loads
1166 ! for the purpose of nonlinear error estimation:
1167 ! ---------------------------------------------------------------------------
1168 ValuesSaved => StiffMatrix % RHS
1169 StiffMatrix % RHS => StiffMatrix % BulkRHS
**** LocalForceSaved = LocalForce
1170 CALL DefaultUpdateForce(LocalForce)
**** LocalForce = LocalForceSaved
1171 Solver % Matrix % RHS => ValuesSaved
1172 END IF
because LocalForce gets rotated in DefaultUpdateForce. Later DefaultUpdateEquations is also rotating LocalForce so it must be sent in "unrotated".
I'm out on deep water here. Maybe someone from the Elmer team can have a look at this and see if this is the proper way of solving it. For instance, is it the StressPerm that should be used for displacement or does it have it own permutation?
Best regards Fredrik