Hello, I'm trying to simulate a problem which physics remains the same but which driving force changes with time. My code can be found on http://pastebin.com/BgBxJajA. The three coupled equations I solve are on lines 43-57 Then I impose fixed boundary conditions (lines 59-69) for a few time steps (76-104) Finally, I would like to change my boundary conditions with time, to have an explicit solving. To do so, I want to delete the previous boundary conditions at each time step (lines 165-169) and write new ones (174-179).
On this last point, I noticed that when deleting the boundary conditions, the first element of the faceGrad arrays was replaced by a 0. And I don't know how to keep the old value. Moreover, I cannot explain why if the line 161 (printing the first value of the faceGrad vector) is commented, the first value of the phi.faceGrad vector is 0., whereas it is a positive value (equal to 20.949) if this same line is not commented. That would mean that printing a value or not changes the behavior of the following code, and seems weird to me. Could you please help me understand what is going on? Thank you, Ianis Bernard _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
