Re: [deal.II] Looking for clarification on a few places on Step-44

2022-10-17 Thread Matthew Rich
Hi Ester

I plan to dive into your code example next. There is another jump in
complexity when you fold in the biphasic aspects of the tissue. As someone
coming from the comparatively simpler materials, I am used to thinking of
everything in terms of displacements. I know when you start dealing with
fluids velocity is a more natural descriptor. I will definitely be
wrestling with that change. Ideally I would like to keep the three field
formulation of Step-44 and just add fluid displacement to the
system, however I understand that may not be possible. I am also a complete
novice at Sacado and how automatic differentiation fits into the solution
scheme, but I haven't gotten that far yet. I will probably be posting for
clarification when I get there.

I hope to submit my learnings as addendums to the tutorials and hopefully
pay it forward the support I have received thus far.

On Thu, 6 Oct 2022 at 11:04, Ester Comellas  wrote:

> Hi Matt,
>
> Maybe the nonlinear poro-viscoelastic code Jean-Paul and I contributed to
> the Code Gallery may help you decide whether adding another phase would be
> feasible for your application. Our formulation models a biphasic material
> that consists in a nonlinear (finite-strain) viscoelastic solid and a pore
> fluid. We solve monolithically for solid displacements and fluid pressure
> with a direct solver. The whole code structure is based on that of step-44,
> so it should be relatively easy to navigate if you're already familiar with
> step-44.
>
> Best,
> Ester
>
> El dia dimecres, 5 d’octubre de 2022 a les 15:30:49 UTC+2,
> mjri...@gmail.com va escriure:
>
>> This was very helpful!
>>
>> I am trying to understand the process so I could potentially extend this
>> formulation for biphasic materials. The way it handles incompressibility is
>> perfect for high water content tissues. My concern revolves around adding
>> another phase and explicitly solving for the fluid displacements in the
>> system. I was going to follow a similar strategy, but I am worried that
>> this approach is very specific.
>>
>> IMHO the key feature for this approach is the ability to condense out the
>> pressure and volumetric ratio variables and recover the displacement only
>> formulation but with anti-locking properties baked in as opposed to
>> starting with a pure displacement formulation. I would like to preserve
>> that if possible. I am just worried I will wind up in a hole I cannot climb
>> out of...
>>
>> These comments were very helpful. One quick question if you just
>> proceed without the condensation would that still work? In one of the
>> tutorials, If I abandoned the notion of using the CG solver and used
>> something like GMRES can I avoid some of the manipulation after I have the
>> linearized system?
>>
>> Thanks for the prompt response and thoughtful answers! This stuff is hard
>> and fascinating at the same time.
>>
>> Matt
>>
>> On Tue, 4 Oct 2022 at 14:03, Jean-Paul Pelteret 
>> wrote:
>>
>>> Hi Matthew,
>>>
>>> I'm glad that you find step-44 to be a useful tutorial! Let me try to
>>> answer your questions directly.
>>>
>>> *My first question deals with the statement "The Euler-Lagrange
>>> equations corresponding to the residual"*
>>>
>>> *Directly above this sentence is the residual, whose derivation I
>>> understand. Where I am lost is that s tact on to equations. I have**
>>> only one residual equation. I cannot bridge that disconnect. *
>>>
>>> This is just another way of saying that the three equations listed there
>>> (these E-L equations) are the strong form of the governing equations.
>>> Basically, if you take each of these equations (along the way, modifying
>>> the definition of the stress in the equilibrium equation), test them with
>>> the appropriate test function and sum up the three residual contributions
>>> then you recover the (total) residual, or stationary point of the residual,
>>> that is listed above. The point is that it not necessarily so straight
>>> forward to go from the strong form to the weak form for this mixed
>>> formulation, so identifying the conservation equations a-postori is a
>>> helpful sanity check here. They seem to align with what we're trying to do
>>> here.
>>>
>>>
>>> *I am completely lost here. What is the significance of p and J not
>>> having derivatives on them that makes it "easy" to solve for those terms in
>>> isolation? *
>>>
>>> Well, that's a valid point. I can't quite recall what exactly we were
>>> trying to identify with this comment. I'll think about it, as that seems to
>>> be a point that we could improve on in the documentation. That there is no
>>> K_{pp} contribution is significant, because it makes condensing out the p
>>> and J fields easier. Maybe we meant to refer to the lack of contribution to
>>> K_{pp} (as there is no second derivative involving a variation and
>>> linearisation of p.
>>>
>>> *I am also confused how K_pJ, K_Jp and K_JJ  form a block diagonal
>>> matrix. I could get there if I ignore the 

Re: [deal.II] Looking for clarification on a few places on Step-44

2022-10-06 Thread Ester Comellas
Hi Matt, 

Maybe the nonlinear poro-viscoelastic code Jean-Paul and I contributed to 
the Code Gallery may help you decide whether adding another phase would be 
feasible for your application. Our formulation models a biphasic material 
that consists in a nonlinear (finite-strain) viscoelastic solid and a pore 
fluid. We solve monolithically for solid displacements and fluid pressure 
with a direct solver. The whole code structure is based on that of step-44, 
so it should be relatively easy to navigate if you're already familiar with 
step-44.

Best,
Ester

El dia dimecres, 5 d’octubre de 2022 a les 15:30:49 UTC+2, 
mjri...@gmail.com va escriure:

> This was very helpful! 
>
> I am trying to understand the process so I could potentially extend this 
> formulation for biphasic materials. The way it handles incompressibility is 
> perfect for high water content tissues. My concern revolves around adding 
> another phase and explicitly solving for the fluid displacements in the 
> system. I was going to follow a similar strategy, but I am worried that 
> this approach is very specific. 
>
> IMHO the key feature for this approach is the ability to condense out the 
> pressure and volumetric ratio variables and recover the displacement only 
> formulation but with anti-locking properties baked in as opposed to 
> starting with a pure displacement formulation. I would like to preserve 
> that if possible. I am just worried I will wind up in a hole I cannot climb 
> out of...
>
> These comments were very helpful. One quick question if you just 
> proceed without the condensation would that still work? In one of the 
> tutorials, If I abandoned the notion of using the CG solver and used 
> something like GMRES can I avoid some of the manipulation after I have the 
> linearized system?  
>
> Thanks for the prompt response and thoughtful answers! This stuff is hard 
> and fascinating at the same time. 
>
> Matt 
>
> On Tue, 4 Oct 2022 at 14:03, Jean-Paul Pelteret  
> wrote:
>
>> Hi Matthew,
>>
>> I'm glad that you find step-44 to be a useful tutorial! Let me try to 
>> answer your questions directly.
>>
>> *My first question deals with the statement "The Euler-Lagrange equations 
>> corresponding to the residual"*
>>
>> *Directly above this sentence is the residual, whose derivation I 
>> understand. Where I am lost is that s tact on to equations. I have** 
>> only one residual equation. I cannot bridge that disconnect. *
>>
>> This is just another way of saying that the three equations listed there 
>> (these E-L equations) are the strong form of the governing equations. 
>> Basically, if you take each of these equations (along the way, modifying 
>> the definition of the stress in the equilibrium equation), test them with 
>> the appropriate test function and sum up the three residual contributions 
>> then you recover the (total) residual, or stationary point of the residual, 
>> that is listed above. The point is that it not necessarily so straight 
>> forward to go from the strong form to the weak form for this mixed 
>> formulation, so identifying the conservation equations a-postori is a 
>> helpful sanity check here. They seem to align with what we're trying to do 
>> here.  
>>
>>
>> *I am completely lost here. What is the significance of p and J not 
>> having derivatives on them that makes it "easy" to solve for those terms in 
>> isolation? *
>>
>> Well, that's a valid point. I can't quite recall what exactly we were 
>> trying to identify with this comment. I'll think about it, as that seems to 
>> be a point that we could improve on in the documentation. That there is no 
>> K_{pp} contribution is significant, because it makes condensing out the p 
>> and J fields easier. Maybe we meant to refer to the lack of contribution to 
>> K_{pp} (as there is no second derivative involving a variation and 
>> linearisation of p.
>>
>> *I am also confused how K_pJ, K_Jp and K_JJ  form a block diagonal 
>> matrix. I could get there if I ignore the top row but then the equations 
>> below do not make sense I think. Some detail on this part of the process 
>> would be great. *
>>
>> So this is more easy to explain. We specifically choose discontinuous 
>> shape function to discretise these fields. As there are no interface/flux 
>> contributions, all local element contributions for these terms will remain 
>> local and you therefore end up with an assembled matrix for these 
>> contributions that has a block-like structure. The K_{JJ} matrix is 
>> evidently block-diagonal, as it is a field that couples with itself. As for 
>> the coupling matrices K_{pJ} and K_{Jp}, they are block-diagonal because we 
>> chose *exactly* the same discretisation for both fields (i.e. the shape 
>> functions and polynomial order match).
>>
>> Does that make sense? 
>>
>> Best,
>>
>> Jean-Paul
>> On 2022/09/30 19:16, Matthew Rich wrote:
>>
>> Hi, 
>>
>> Step-44 has a lot going on and really sets you up to tackle a variety of 
>> real 

Re: [deal.II] Looking for clarification on a few places on Step-44

2022-10-05 Thread Wolfgang Bangerth

On 10/5/22 07:30, Matthew Rich wrote:


I am trying to understand the process so I could potentially extend this 
formulation for biphasic materials. The way it handles incompressibility is 
perfect for high water content tissues. My concern revolves around adding 
another phase and explicitly solving for the fluid displacements in the 
system. I was going to follow a similar strategy, but I am worried that this 
approach is very specific.


IMHO the key feature for this approach is the ability to condense out the 
pressure and volumetric ratio variables and recover the displacement only 
formulation but with anti-locking properties baked in as opposed to starting 
with a pure displacement formulation. I would like to preserve that if 
possible. I am just worried I will wind up in a hole I cannot climb out of...


These comments were very helpful. One quick question if you just 
proceed without the condensation would that still work? In one of the 
tutorials, If I abandoned the notion of using the CG solver and used something 
like GMRES can I avoid some of the manipulation after I have the linearized 
system?


Thanks for the prompt response and thoughtful answers! This stuff is hard and 
fascinating at the same time.


Matthew -- a common problem when writing tutorials is that it's hard to 
anticipate what will be clear to readers and what will not. If you think that 
there are things you learned from Jean-Paul's email that you wished had been 
part of the text surrounding step-44, would you be interested in extending the 
documentation of that program?


Best
 Wolfgang

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/13d9662f-75f4-33ec-6a99-e12a98e5fd38%40colostate.edu.


Re: [deal.II] Looking for clarification on a few places on Step-44

2022-10-05 Thread Matthew Rich
This was very helpful!

I am trying to understand the process so I could potentially extend this
formulation for biphasic materials. The way it handles incompressibility is
perfect for high water content tissues. My concern revolves around adding
another phase and explicitly solving for the fluid displacements in the
system. I was going to follow a similar strategy, but I am worried that
this approach is very specific.

IMHO the key feature for this approach is the ability to condense out the
pressure and volumetric ratio variables and recover the displacement only
formulation but with anti-locking properties baked in as opposed to
starting with a pure displacement formulation. I would like to preserve
that if possible. I am just worried I will wind up in a hole I cannot climb
out of...

These comments were very helpful. One quick question if you just
proceed without the condensation would that still work? In one of the
tutorials, If I abandoned the notion of using the CG solver and used
something like GMRES can I avoid some of the manipulation after I have the
linearized system?

Thanks for the prompt response and thoughtful answers! This stuff is hard
and fascinating at the same time.

Matt

On Tue, 4 Oct 2022 at 14:03, Jean-Paul Pelteret 
wrote:

> Hi Matthew,
>
> I'm glad that you find step-44 to be a useful tutorial! Let me try to
> answer your questions directly.
>
> *My first question deals with the statement "The Euler-Lagrange equations
> corresponding to the residual"*
>
> *Directly above this sentence is the residual, whose derivation I
> understand. Where I am lost is that s tact on to equations. I have** only
> one residual equation. I cannot bridge that disconnect. *
>
> This is just another way of saying that the three equations listed there
> (these E-L equations) are the strong form of the governing equations.
> Basically, if you take each of these equations (along the way, modifying
> the definition of the stress in the equilibrium equation), test them with
> the appropriate test function and sum up the three residual contributions
> then you recover the (total) residual, or stationary point of the residual,
> that is listed above. The point is that it not necessarily so straight
> forward to go from the strong form to the weak form for this mixed
> formulation, so identifying the conservation equations a-postori is a
> helpful sanity check here. They seem to align with what we're trying to do
> here.
>
>
> *I am completely lost here. What is the significance of p and J not having
> derivatives on them that makes it "easy" to solve for those terms in
> isolation? *
>
> Well, that's a valid point. I can't quite recall what exactly we were
> trying to identify with this comment. I'll think about it, as that seems to
> be a point that we could improve on in the documentation. That there is no
> K_{pp} contribution is significant, because it makes condensing out the p
> and J fields easier. Maybe we meant to refer to the lack of contribution to
> K_{pp} (as there is no second derivative involving a variation and
> linearisation of p.
>
> *I am also confused how K_pJ, K_Jp and K_JJ  form a block diagonal matrix.
> I could get there if I ignore the top row but then the equations below do
> not make sense I think. Some detail on this part of the process would be
> great. *
>
> So this is more easy to explain. We specifically choose discontinuous
> shape function to discretise these fields. As there are no interface/flux
> contributions, all local element contributions for these terms will remain
> local and you therefore end up with an assembled matrix for these
> contributions that has a block-like structure. The K_{JJ} matrix is
> evidently block-diagonal, as it is a field that couples with itself. As for
> the coupling matrices K_{pJ} and K_{Jp}, they are block-diagonal because we
> chose *exactly* the same discretisation for both fields (i.e. the shape
> functions and polynomial order match).
>
> Does that make sense?
>
> Best,
>
> Jean-Paul
> On 2022/09/30 19:16, Matthew Rich wrote:
>
> Hi,
>
> Step-44 has a lot going on and really sets you up to tackle a variety of
> real world problems. There is a significant jump in complexity between this
> tutorial and steps 8,17 & 18.
>
> I have been reading the references and I am about there but need few
> clarifications for why things are the way they are.
>
> Any assistance would be much appreciated...
>
> My first question deals with the statement "The Euler-Lagrange equations
> corresponding to the residual"
>
> Directly above this sentence is the residual, whose derivation I
> understand. Where I am lost is that s tact on to equations. I have only one
> residual equation. I cannot bridge that disconnect.
>
> My other question has to deal with the solving procedure for K (see
> snippet below)
> [image: Ksolve.png]
>
>
> I am completely lost here. What is the significance of p and J not having
> derivatives on them that makes it "easy" to solve 

Re: [deal.II] Looking for clarification on a few places on Step-44

2022-10-04 Thread Jean-Paul Pelteret

Hi Matthew,

I'm glad that you find step-44 to be a useful tutorial! Let me try to 
answer your questions directly.


   /My first question deals with the statement "The Euler-Lagrange
   equations corresponding to the residual"/
   /
   /
   /Directly above this sentence is the residual, whose derivation I
   understand. Where I am lost is that s tact on to equations. I
   have//only one residual equation. I cannot bridge that disconnect. /

This is just another way of saying that the three equations listed there 
(these E-L equations) are the strong form of the governing equations. 
Basically, if you take each of these equations (along the way, modifying 
the definition of the stress in the equilibrium equation), test them 
with the appropriate test function and sum up the three residual 
contributions then you recover the (total) residual, or stationary point 
of the residual, that is listed above. The point is that it not 
necessarily so straight forward to go from the strong form to the weak 
form for this mixed formulation, so identifying the conservation 
equations a-postori is a helpful sanity check here. They seem to align 
with what we're trying to do here.


   /I am completely lost here. What is the significance of p and J not
   having derivatives on them that makes it "easy" to solve for those
   terms in isolation?
   /

Well, that's a valid point. I can't quite recall what exactly we were 
trying to identify with this comment. I'll think about it, as that seems 
to be a point that we could improve on in the documentation. That there 
is no K_{pp} contribution is significant, because it makes condensing 
out the p and J fields easier. Maybe we meant to refer to the lack of 
contribution to K_{pp} (as there is no second derivative involving a 
variation and linearisation of p.


   /I am also confused how K_pJ, K_Jp and K_JJ  form a block diagonal
   matrix. I could get there if I ignore the top row but then the
   equations below do not make sense I think. Some detail on this part
   of the process would be great. /

So this is more easy to explain. We specifically choose discontinuous 
shape function to discretise these fields. As there are no 
interface/flux contributions, all local element contributions for these 
terms will remain local and you therefore end up with an assembled 
matrix for these contributions that has a block-like structure. The 
K_{JJ} matrix is evidently block-diagonal, as it is a field that couples 
with itself. As for the coupling matrices K_{pJ} and K_{Jp}, they are 
block-diagonal because we chose *exactly* the same discretisation for 
both fields (i.e. the shape functions and polynomial order match).


Does that make sense?

Best,

Jean-Paul

On 2022/09/30 19:16, Matthew Rich wrote:

Hi,

Step-44 has a lot going on and really sets you up to tackle a variety 
of real world problems. There is a significant jump in complexity 
between this tutorial and steps 8,17 & 18.


I have been reading the references and I am about there but need few 
clarifications for why things are the way they are.


Any assistance would be much appreciated...

My first question deals with the statement "The Euler-Lagrange 
equations corresponding to the residual"


Directly above this sentence is the residual, whose derivation I 
understand. Where I am lost is that s tact on to equations. I have 
only one residual equation. I cannot bridge that disconnect.


My other question has to deal with the solving procedure for K (see 
snippet below)

Ksolve.png


I am completely lost here. What is the significance of p and J not 
having derivatives on them that makes it "easy" to solve for those 
terms in isolation? I am also confused how K_pJ, K_Jp and K_JJ  form a 
block diagonal matrix. I could get there if I ignore the top row but 
then the equations below do not make sense I think. Some detail on 
this part of the process would be great.


Thanks in advance,

Matt
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en

---
You received this message because you are subscribed to the Google 
Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/a090a200-fa7a-44d9-ba59-6c5e6064fd5bn%40googlegroups.com 
.


--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on 

[deal.II] Looking for clarification on a few places on Step-44

2022-09-30 Thread Matthew Rich
Hi,

Step-44 has a lot going on and really sets you up to tackle a variety of 
real world problems. There is a significant jump in complexity between this 
tutorial and steps 8,17 & 18. 

I have been reading the references and I am about there but need few 
clarifications for why things are the way they are. 

Any assistance would be much appreciated...

My first question deals with the statement "The Euler-Lagrange equations 
corresponding to the residual"

Directly above this sentence is the residual, whose derivation I 
understand. Where I am lost is that s tact on to equations. I have only one 
residual equation. I cannot bridge that disconnect. 

My other question has to deal with the solving procedure for K (see snippet 
below) 
[image: Ksolve.png]


I am completely lost here. What is the significance of p and J not having 
derivatives on them that makes it "easy" to solve for those terms in 
isolation? I am also confused how K_pJ, K_Jp and K_JJ  form a block 
diagonal matrix. I could get there if I ignore the top row but then the 
equations below do not make sense I think. Some detail on this part of the 
process would be great. 

Thanks in advance, 

Matt

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/a090a200-fa7a-44d9-ba59-6c5e6064fd5bn%40googlegroups.com.