CellVariable(...hasOld=0) influences results from solve() #1019
Replies: 5 comments 1 reply
-
I think it will influence the result. If |
Beta Was this translation helpful? Give feedback.
-
thanks there was a bit of a confusion on the updateOld. We thought it was more to save the result of previous timestep but for solving in implicit form ct is the current input variable |
Beta Was this translation helpful? Give feedback.
-
Have you seen the documentation of the general form of an equation and the descretization of the terms in that equation? Any term involving what you refer to as the primary term, e.g. |
Beta Was this translation helpful? Give feedback.
-
Great thanks for the explaination this makes things more clear. Just a short follow up if " + k * phis will be explicit (and go to the RHS) " then if phis updates RHS matrix would automatically get updated ? Second is if the coefficient are not values but function calls does fipy call this function on every time iteration? |
Beta Was this translation helpful? Give feedback.
-
The current value of |
Beta Was this translation helpful? Give feedback.
-
I was running the 1D diffusion example. I realised, that using
CellVariable(...hasOld=0)
andCellVariable(...hasOld=1)
give different results. From my understandinghasOld
should not influence the result ofsolve
.CellVariable(...hasOld=0)
, which is the correct solution according to the analytical solution given in 1D diffusion example:From my understanding
![hasold1](https://private-user-images.githubusercontent.com/117668253/305415372-00f0c9a8-8f57-492d-af1b-8033a3843160.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMTEyMjAsIm5iZiI6MTczOTAxMDkyMCwicGF0aCI6Ii8xMTc2NjgyNTMvMzA1NDE1MzcyLTAwZjBjOWE4LThmNTctNDkyZC1hZjFiLTgwMzNhMzg0MzE2MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOFQxMDM1MjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNzA1YjEyMWQ1NjdjYTQ0MzJkNDA4ODc2OWRiMWRiZjFiMmZkY2M2YmY1YjIyNjg2ZjI3YWEyMjllOGMwYjk4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.21_9kibBzUwb_R83uawCGDiiJ0u0dte5Jizgl1F9BCI)
hasOld
should not influence the result ofsolve
. ButCellVariable(...hasOld=1)
:Note: In the documentation of CellVariable
hasOld
is not described.Version: 3.4.4
Beta Was this translation helpful? Give feedback.
All reactions