Page 1 of 1

Obtaining residual values from the EnthalpySolver

Posted: 11 May 2021, 13:43
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

Re: Obtaining residual values from the EnthalpySolver

Posted: 12 May 2021, 15:41
by kevinarden
You could try a unix/linux approach to capture the residual using pipe and grep

ElmerSolver case.sif | grep "residual" > outputlog.txt

Re: Obtaining residual values from the EnthalpySolver

Posted: 14 May 2021, 18:41
by rlaw
Thanks for this, I'll try it out start of next week and get back to you.

Re: Obtaining residual values from the EnthalpySolver

Posted: 15 May 2021, 00:30
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

Re: Obtaining residual values from the EnthalpySolver

Posted: 18 May 2021, 15:27
by rlaw
Hi Peter,

That's really useful, thanks for the explanation.

Re: Obtaining residual values from the EnthalpySolver

Posted: 12 Jul 2021, 12:58
by rlaw
Hi Peter,

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