On Thu, May 18, 2017 at 2:16 PM, Thibault Bridel-Bertomeu <thibault.bridellel...@gmail.com> wrote: > > 1/ for the pressure equation, when you meant implicitTerm were you thinking > about this : > > eqnP = fipy.ImplicitSourceTerm(coeff=1.0, var=p) == gm1*roE - > 0.5*gm1*(roU**2 + roV**2)/ro
Exactly, you can also use implicit terms for roU and roV as well, but linearized. > 2/ Okay, for the dp/dx and dp/dy, I agree now I see that we can use a > centralconvectionterm indeed. Can you confirm they are to be written as : > > coeffForX = fipy.CellVariable(mesh=mesh, rank=1) > coeffForX[0] = 1.0 > coeffForX[1] = 0.0 > fipy.CentralDifferenceConvectionTerm(coeff=coeffForX, var=p) That looks right. > for dp/dx, and as : > > coeffForY = fipy.CellVariable(mesh=mesh, rank=1) > > coeffForY[0] = 0.0 > > coeffForY[1] = 1.0 > > fipy.CentralDifferenceConvectionTerm(coeff=coeffForY, var=p) Seems OK. > > > for dp/dy ? > As for the roE equation, I combined the gradient components into this : > > coeffConv = fipy.CellVariable(mesh=mesh, rank=1) > coeffConv[0] = roU/ro > coeffConv[1] = roV/ro > fipy.CentralDifferenceConvectionTerm(coeff=coeffConv.faceValue, var=p) > > Does it seem reasonable to you ? That last one isn't right. I think that the roU and roV won't be updated as you advance the time steps. I think that you need to define the "coeffConv" to be coeffConv = (fipy.Varialbe((1, 0)) * roU + fipy.Variable((0, 1)) * roV) / ro The assignment into convCoeff that you are using above just inputs the current values from roU / ro into coeffConv not the dependency. > 3/ By non-linear, I get that you mean sweeping the equations several times > before actually updating the solution in time. But I don’t know what > equations i am supposed to be sweeping here, I think I lack the experience. > The whole system should be swept, like so : You need to sweep all of them as you're doing. I don't think that the order matters. -- Daniel Wheeler _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]