Closed ghost closed 1 year ago
The error means that the variable velocity
of eqn1
is rank-1 (vector) and the variable C
of eqn2
is rank-0 (scalar). FiPy doesn't support this.
Further issues:
velocity
is a FaceVariable
and the solution variable of an equation must be a CellVariable
fluidCoeff
is a scalar field, so fluidCoeff.divergence
doesn't make senseThe error means that the variable
velocity
ofeqn1
is rank-1 (vector) and the variableC
ofeqn2
is rank-0 (scalar). FiPy doesn't support this.Further issues:
velocity
is aFaceVariable
and the solution variable of an equation must be aCellVariable
fluidCoeff
is a scalar field, sofluidCoeff.divergence
doesn't make sense
Would you mind correcting the code?
I don't know what you're trying to represent with ImplicitSourceTerm(coeff=1./fluidCoeff.divergence, var=pressure)
, so I couldn't guess what this term should be.
I have previously referred you to https://github.com/usnistgov/fipy/blob/master/examples/reactiveWetting/liquidVapor2D.py. That example treats velocity as it needs to be in 2D in FiPy. I strongly recommend you use that example as the foundation for your code.
I don't know what you're trying to represent with
ImplicitSourceTerm(coeff=1./fluidCoeff.divergence, var=pressure)
, so I couldn't guess what this term should be.I have previously referred you to https://github.com/usnistgov/fipy/blob/master/examples/reactiveWetting/liquidVapor2D.py. That example treats velocity as it needs to be in 2D in FiPy. I strongly recommend you use that example as the foundation for your code.
I've tried to write the continuity equrstion in Navier-Stokes, is it correct?
Acid_Model_9.zip