poisson's equation, flow calculation, standalone
Hi,
I am trying to write a standalone script, which solves the Poisson's equation and calculates flux over a given surface area. The flux calculation does not work and this line
flow = problem.evaluate('d_surface_flux.2.top(m.elcond, phi)', mode='eval', copy_materials=True, verbose=False)
gives me this error: ValueError: material argument m not found!
I have done it many times successfuly before, but I was using standard way of writing sfepy applications using dictionaries in configuration file.
I am trying different way now. I attach the file. What am I doing wrong?
Thank you Jan
Hi Jan,
On 04/16/2018 03:31 PM, Jan Martinek wrote:
Hi,
I am trying to write a standalone script, which solves the Poisson's equation and calculates flux over a given surface area. The flux calculation does not work and this line
flow = problem.evaluate('d_surface_flux.2.top(m.elcond, phi)', mode='eval', copy_materials=True, verbose=False)
gives me this error: ValueError: material argument m not found!
I have done it many times successfuly before, but I was using standard way of writing sfepy applications using dictionaries in configuration file.
Yes, there are some quirks...
I am trying different way now. I attach the file. What am I doing wrong?
Just use copy_materials=False in the flux evaluation  then the materials are reused from the problem solution.
Also, use
problem.set_bcs(ebcs=Conditions([ebc_top, ebc_bottom]))
instead of
problem.time_update(ebcs=Conditions([ebc_top, ebc_bottom]))
The problem.time_update() is called automatically in problem.solve() (if you are using 2018.1 or a newer version).
r.
Thank you Jan
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
participants (2)

Jan Martinek

Robert Cimrman