one more fix md.add_linear_term(mim9, 'alpha*Grad(p).Test_u-g*(rho_tissue-rho_air*Heaviside(X(1))-rho_water*Heaviside(-X(1)))*Test_u(1)' )
BR Kostas On Sat, Nov 20, 2021 at 1:32 AM Konstantinos Poulios < logar...@googlemail.com> wrote: > you are right, it should be > > md.add_linear_term(mim9, > '(alpha*Grad(p)-g*(rho_tissue-rho_air*Heaviside(X(1))-rho_water*Heaviside(-X(1))))*Test_u(1)' > ) > > BR > Kostas > > On Fri, Nov 19, 2021 at 11:47 PM Lesage,Anne Cecile J < > ajles...@mdanderson.org> wrote: > >> Dear Konstantinos >> >> >> >> I understand the use of the Heaviside function but I do not get how you >> impose that the gravity is along the x axis >> >> >> >> Thank you >> >> Regards >> >> AC >> >> >> >> >> >> *From:* Konstantinos Poulios <logar...@googlemail.com> >> *Sent:* Wednesday, November 17, 2021 1:37 AM >> *To:* Lesage,Anne Cecile J <ajles...@mdanderson.org> >> *Cc:* getfem-users@nongnu.org >> *Subject:* [EXT] Re: adding buoyancy forces to Biot poroelastic equations >> >> >> >> *WARNING: *This email originated from outside of MD Anderson. Please >> validate the sender's email address before clicking on links or attachments >> as they may not be safe. >> >> >> >> Dear Anne-Cecile, >> >> >> >> The GetFEM model object does not differentiate between left and right >> side of an equation (there is no reason for splitting equations like this), >> all equations are assumed to be in the form R(...)=0. So just move all >> terms on the same side. >> >> >> >> The equation you provide is in strong form, you need to convert it to the >> respective weak form and apply the necessary integration by parts to get >> rid of higher order derivatives as you showed in your add_linear_term >> expression. After all these steps you should have >> >> >> >> md.add_linear_term(mim9, >> 'G*Grad(u):Grad(Test_u)+G/(1-2*nu)*Div(u)*Div(Test_u)+(alpha*Grad(p)-g*(rho_tissue-rho_air*Heaviside(X(1))-rho_water*Heaviside(-X(1)))).Test_u' >> ) >> >> >> >> you can also choose to split the term in two lines >> >> >> >> md.add_linear_term(mim9, >> 'G*Grad(u):Grad(Test_u)+G/(1-2*nu)*Div(u)*Div(Test_u)') >> >> md.add_linear_term(mim9, >> '(alpha*Grad(p)-g*(rho_tissue-rho_air*Heaviside(X(1))-rho_water*Heaviside(-X(1)))).Test_u' >> ) >> >> >> >> but there is no reason for not keeping everything just in one term. >> >> >> >> >> >> BR >> >> Kostas >> >> >> >> >> >> On Tue, Nov 16, 2021 at 11:12 PM Lesage,Anne Cecile J < >> ajles...@mdanderson.org> wrote: >> >> Dear all >> >> >> >> To implement the building of my fem matrix for the mechanical >> equilibrium, I presently write >> >> md.add_linear_term(mim9, >> 'G*Grad(u):Grad(Test_u)+G/(1-2*nu)*Div(u)*Div(Test_u)+alpha*Grad(p).Test_u' >> ) >> >> >> >> How can i add an additional buoyancy terms to the equation (see >> right-hand side attached equation picture)? >> >> gravity is vector g = - 9180 N along the x axis for my mesh >> >> rhot (density tissue is constant) but rhof = rho water for x<0 and rhof = >> rho air for x>0 >> >> >> >> Thank you >> >> Anne-Cecile Lesage >> >> >> >> >> >> >> >> 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. >> >> 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. >> >