Obtaining residual values from the EnthalpySolver

Extension of Elmer in computational glaciology
Post Reply
rlaw
Posts: 9
Joined: 11 May 2021, 13:33
Antispam: Yes

Obtaining residual values from the EnthalpySolver

Post by rlaw »

Hi There!

I'm looking to extract the residual from the Elmer/Ice EnthalpySolver that arises from complying with the Enthalpy_h upper limit inequality.

I can set the limit in the <Body Force> section as e.g. <Enthalpy_h Upper Limit = Real 143000.0> but from looking through the EnthalpySolver.F90 source code I am unable to locate the required keyword or .sif section for exporting the residual.

Any advice much appreciated.

Best,
Rob
kevinarden
Posts: 2221
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Obtaining residual values from the EnthalpySolver

Post by kevinarden »

You could try a unix/linux approach to capture the residual using pipe and grep

ElmerSolver case.sif | grep "residual" > outputlog.txt
rlaw
Posts: 9
Joined: 11 May 2021, 13:33
Antispam: Yes

Re: Obtaining residual values from the EnthalpySolver

Post by rlaw »

Thanks for this, I'll try it out start of next week and get back to you.
raback
Site Admin
Posts: 4801
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Obtaining residual values from the EnthalpySolver

Post by raback »

Hi Rob,

So you want to know who computed the r=Ax-b?

I think it is hidden as a library operation behind DefaultSolve. The A and b are stored before setting Dirichlet BCs (on BCs or bodies) and after the simulation the residual is computed. The soft limiter activates this as does "calculate loads = true".

Also you could be looking at the error of a nonlinear system the L2 norm of which may appear in the output and Kevin is probably referring to this possibility.

-Peter
rlaw
Posts: 9
Joined: 11 May 2021, 13:33
Antispam: Yes

Re: Obtaining residual values from the EnthalpySolver

Post by rlaw »

Hi Peter,

That's really useful, thanks for the explanation.
rlaw
Posts: 9
Joined: 11 May 2021, 13:33
Antispam: Yes

Re: Obtaining residual values from the EnthalpySolver

Post by rlaw »

Hi Peter,

That all works and I found out some interesting stuff about DefaultSolve, thanks!
Post Reply