|
From: | Renard Yves |
Subject: | Re: Periodic problem |
Date: | Wed, 20 Jul 2022 11:59:20 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
Yes, normally, you do not have to add something to prescribe the periodicity of derivatives.
BR,
Yves
So doing just what i did provide two things :
u(left) =- u(right)
and
du/dn1 = - du/dn2
Or i have to add another line in the code ?
Cordialement
Lahoussaine BOURRICHE
3A, ENSEEIHT , Physique numérique
+33 6 20 76 17 12
De: "Yves Renard" <yves.renard@insa-lyon.fr>
À: "Lahoussaine Bourriche" <lahoussaine.bourriche@etu.toulouse-inp.fr>
Envoyé: Mercredi 20 Juillet 2022 11:32:33
Objet: Re: Periodic problem
What I mean is that prescribing in a weak manner (or directly on the dof as you done) the periodic condition with a multiplier implicitely prescribe du/dn1 = lambda and du/dn2 = -lambda and thus the periodicity of derivatives.
BR
Yves
Le 20/07/2022 à 11:27, Bourriche Lahoussaine a écrit :
If you re talking about Neumman condition ( i suppose ), no it's not my case. i might not have understood what you said because when you impose lambda then its just two simple neumman condition.In my case is du/dn1 = - du/dn2 ? (More precisely i work on a heat study and i m looking to impose thermal periodic condition : equality of the flow )
BRLahoussaine
De: "Yves Renard" <yves.renard@insa-lyon.fr>
À: "Lahoussaine Bourriche" <lahoussaine.bourriche@etu.toulouse-inp.fr>
Envoyé: Mercredi 20 Juillet 2022 11:18:20
Objet: Re: Periodic problem
Normally, on the weak form, the condition du/dn1 = lambda and du/dn2 = -lambda will be prescribed by the multiplier technique.
Is it the case in your problem ?
BR
Yves
Le 20/07/2022 à 10:55, Bourriche Lahoussaine a écrit :
Thanks for your quick response
when i do the weak formulation i find something like :[int(omega1) du/dn1 ] + [int(omega2)) du/dn2 ] = ...
and the condition is du/dn1 = - du/dn2
omega1 ( resp omega2 ) are the right side (left side )# the geometry is a triangle
how i can proced
Thanks
BRLahoussaine
De: "Yves Renard" <yves.renard@insa-lyon.fr>
À: "Lahoussaine Bourriche" <lahoussaine.bourriche@etu.toulouse-inp.fr>
Envoyé: Mercredi 20 Juillet 2022 10:01:48
Objet: Re: Periodic problem
Dear Lahoussaine,
You can indeed prescribe a periodic condition with a constraint matrix if you can establish a one to one correspondance between the dof on each side. Otherwise, you can prescribe a weak condition, still with a lagrange multiplier but using the interpolate transformation (https://getfem.org/userdoc/gasm_high.html#interpolate-transformations) from a side to the other and use the generic assembly.
Concerning the periodicity of the derivatives, it is normally implicit in the weak formulation for order two problems, so that you do not have an additional condition to prescribe.
Best regards,
Yves
Le 20/07/2022 à 09:40, Bourriche Lahoussaine a écrit :
Hy;
For periodic condition i do something like :
--------------------------------------------------------------------------------------------------------------------ConstraintMatrix = gf.Spmat('empty',1 ,mfu.nb_basic_dof())
L=np.zeros((mfu.nb_basic_dof(),1))
for i in range(len(leftDof)):
ConstraintMatrix[0,leftDof[i]]=1
ConstraintMatrix[0,rightDof[i]]=1
md.add_variable('mult_spec'+str(i),1)
# print(i)
md.add_constraint_with_multipliers( 'u','mult_spec'+str(i), ConstraintMatrix,0)
--------------------------------------------------------------------------------------------------------------------And it worked perfectly;Now i want to add another periodic condition: this new on derivativesThe derivative of u in leftDof must equal the derivative of T in rightDOF
Do you have ideas
Best regardsLahoussaine
[Prev in Thread] | Current Thread | [Next in Thread] |