getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding non zero integral surface term in fem equations


From: Konstantinos Poulios
Subject: Re: adding non zero integral surface term in fem equations
Date: Thu, 21 Apr 2022 11:22:53 +0200

Dear Anne-Cecile

The syntax of the add_linear_term command is
add_linear_term(mim, _expression_, region=None, *args)
and it doesn't depend on whether the term is in a volume or on a surface. You should just provide the correct region id as the third argument.

One thing that you need to be careful about is that in GetFEM (and in math in general) there is no left and right hand side of an equation, move all your terms to one side so that you will have zero on the other side, otherwise you will end up with wrong signs in your terms.

Best regards
Kostas


On Thu, Apr 21, 2022 at 2:40 AM Lesage,Anne Cecile J <AJLesage@mdanderson.org> wrote:

Dear all

 

In the variational formulation of the poroelastic equations I use

(see attached picture) I have surface integral terms (in purple). When there are non zero like

The second one when the normal pressure gradient is non zero because there is fluid flux on the surface

What shall I add in my python scrip on top of the volume integral terms (see python script below)?

 

Thank you

Regards

Anne-Cecile

 

# Brain poroelastic with buoyancy term = -(rhot-rhof) g ex

# Equation 1

md.add_linear_term(mimu3b, 'smf*Grad(ub):Grad(Test_ub)+smf/(1-2*nub)*Div(ub)*Div(Test_ub)+Grad(pb).Test_ub')

if(buoyancy):

   print('Assembling buoyancy term along -ex\n');

   md.add_linear_term(mimu3b, 'Test_ub(1)*g*(rhot-rhoa*Heaviside(X(1)-csflevel)-rhow*Heaviside(-X(1)+csflevel))')

# Equation 2

md.add_linear_term(mimp3b, '1.0/dt*(Div(ub)-Div(ub_prev))*Test_pb+kb*Grad(pb).Grad(Test_pb)') # no shrinking

if shrinking==1:

   print('Assembling shrinking term kc1 \n');

   md.add_linear_term(mimp3b, 'kcsh1*(pb-pcs)*Test_pb')

if shrinking==2:

   print('Assembling shrinking term kc2 \n');

   md.add_linear_term(mimp3b, 'kcsh2*(pb-pcs)*Test_pb')

if shrinking==3:

   print('Assembling shrinking term kc3\n');

   md.add_linear_term(mimp3b, 'kcsh3*(pb-pcs)*Test_pb')

#mfouth = gf.MeshFem(meshh)

The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]