Dear Fipy Team,
First of all I would like to thank you for your amazing work! I love working
with fipy.
I have a problem when I calculate the gradient of my variable in cylindrical
coordinates. You can see the code I used below this line.
from fipy import *
from fipy import CellVariable, FaceVariable, Grid2D, TransientTerm, \
UpwindConvectionTerm, DiffusionTerm, ImplicitSourceTerm, CylindricalGrid2D
L = 89e-3 # m
diameterChamber = 13.75e-3
radius = diameterChamber/2
dz = 1e-3
dr = 0.75e-3
nz = round(L/dz)
nr = round(radius/dr)
#mesh = Grid2D(dx=dx, nx=nx, dy=dy, ny=ny)
mesh = CylindricalGrid2D(dz=dz, nz=nz, dr=dr, nr=nr)
pressure_0 = CellVariable(mesh=mesh, name='Pressure Gas', hasOld=1)
pressure_0.setValue(1e5)
pressure_0.grad.value
The pressure is constant all over the domain so I would expect the gradient to
be zero. just as it is in Cartesian coordinates. But I get this:
array([[ 2666.66666667, 888.88888889, 533.33333333, ...,
205.12820513, 177.77777778, 156.8627451 ],
[ 0. , 0. , 0. , ...,
0. , 0. , 0. ]])
Could you please help me? Am I doing something wrong? is it a bug?
I would like also to contribute to the community with an example of
compressible flow with euler equations in 2D Cartesian coordinates. I validated
the results with SOD shock tube and I was quite happy with it. With whom should
I talk to review it and possibly upload it?
Kind regards,
Leyton
________________________________
ACHTUNG neue e-Mail Adresse:
[email protected]<mailto:[email protected]>
Nachrichten an die alte E-Mail Adresse werden vor?bergehend auf die neue
Adresse umgeleitet.
ATTENTION new e-mail address:
[email protected]<mailto:[email protected]>
Messages to the old address are temporarily redirected to the new address.
________________________________
P Bitte pr?fen Sie der Umwelt zuliebe, ob der Ausdruck dieser Mail
erforderlich ist. / Please consider your environmental responsibility before
printing this email.
Diese Nachricht und allfaellige angehaengte Dokumente sind vertraulich und nur
f?r den/die Adressaten bestimmt. Sollten Sie nicht der beabsichtigte Adressat
sein, ist jede Offenlegung, Weiterleitung oder sonstige Verwendung dieser
Information nicht gestattet. In diesem Fall bitten wir, den Absender zu
verstaendigen und die Information zu vernichten. F?r Uebermittlungsfehler oder
sonstige Irrtuemer bei der Uebermittlung besteht keine Haftung.
This message and any attached files are confidential and intended solely for
the addressee(s). Any publication, transmission or other use of the information
by a person or entity other than the intended addressee is prohibited. If you
receive this in error please contact the sender and delete the material. The
sender does not accept liability for any errors or missions as a result of the
transmission. Please destroy this message and notify the sender.
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]