UMAT and mortar BC, 3

Numerical methods and mathematical models of Elmer
Post Reply
FredrikR
Posts: 13
Joined: 08 Aug 2023, 13:49
Antispam: Yes

UMAT and mortar BC, 3

Post by FredrikR »

Hello!
To follow up from on an old post. UMAT with Mortar BC didn't seem to give proper displacement contact load values at the mortar boundaries.
I think it has to do with ElasticSolver is normally (without UMAT) solving Ku = F using the total displacement while with UMAT it is solving for the incremental displacement.

I tried with the following modification in CalculateLoads in SolverUtils.F90

Code: Select all

13655       CALL MatrixVectorMultiply( Aaid, x, TempVector )
...
13713     ELSE
13714       UseUMAT = ListCheckPresentAnyMaterial(CurrentModel, 'UMAT Subroutine')
13715       IF (UseUmat) THEN
13716         CALL Info( 'CalculateLoads', 'Umat, omitting K*x', Level=5)
13717         TempVector = -RHS
13718       ELSE
13719         CALL Info( 'CalculateLoads', 'Not Umat, using K*x', Level=5)
13720         TempVector = TempVector - RHS
13721       END IF
13722       !TempVector = TempVector - RHS
13723     END IF
(line 13714-13721 are added)

It seems to give reasonable values.

/Fredrik
mika
Posts: 244
Joined: 15 Sep 2009, 07:44

Re: UMAT and mortar BC, 3

Post by mika »

Thanks for suggesting this - What might not yet be ideal is that the test

Code: Select all

UseUMAT = ListCheckPresentAnyMaterial(CurrentModel, 'UMAT Subroutine')
leads to altering the way of computing loads in a coupled analysis even when the solver doesn't use UMAT in any way. Probably it would be better to apply a different way of load computation if the solver were the finite elasticity solver.

-- Mika
FredrikR
Posts: 13
Joined: 08 Aug 2023, 13:49
Antispam: Yes

Re: UMAT and mortar BC, 3

Post by FredrikR »

Hi!

Yes, that's right. I didn't think of that. Could this be a better way:
In ElasticSolver.F90

Code: Select all

 544   UseUMAT = ListCheckPresentAnyMaterial(Model, 'UMAT Subroutine')
 545   IF (UseUMAT) THEN
 546     CALL ListAddNewLogical( SolverParams,'UseUMAT',.TRUE.)
 547   END IF 
then in CalculateLoads in SolverUtils.F90

Code: Select all

14081     UseUMAT = ListGetLogical( Solver % Values, 'UseUMAT', Found)
14082     IF (.NOT. Found) UseUMAT = .FALSE.
...
14187       IF (UseUMAT) THEN
14189         TempVector = -RHS
14191       ELSE
14193         TempVector = TempVector - RHS
14194       END IF
/Fredrik
Post Reply