You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sfepy...@googlegroups.com
Hi,
I have just updated the time stepping solvers in sfepy for interactive use, as
demonstrated in the new example [1]. For basic use, ignore the probing code -
the time stepper can be used as simply as:
tss = SimpleTimeSteppingSolver({'t0' : 0.0, 't1' : 100.0, 'n_step' : 11},
problem=problem)
tss.init_time()
for step, time, state in tss():
pass
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sfepy-devel
Hi,
I tried to use this approach ([1]) to solve a diffusion problem with a field-dependent material as in [2], but I got:
ValueError: material data notset!(call time_update())
By adding some print-calls to the material-defining function, I found out that the function gets called, but with mode='special' instead of 'qp'. As a result None is returned instead of the values that correspond to the initial conditions.
My question(s): - Is the SimpleTimeSteppingSolver usable for such problem? Is there an example? - Should I use/implement a different time-stepper?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sfepy-devel
Update: There was a mistake in naming the materials. With things corrected, however, the problem remains. I attach the file (oxygen_diffusion.py). Running it results in
ValueError: data of variable are notset!(q, step 0)
When the material parameters are set to constants, the computation runs. The same happens when using the config-file with `ts` time-stepper, e.g. changing [2] to time-dependent problem (time_field_dependent.py).
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sfepy...@googlegroups.com
Hi Jan,
SimpleTimeSteppingSolver just calls Problem.solve(), so it should update the
materials as usual (= also in QP). I will check it when I get to it.
r.
Robert Cimrman
unread,
Mar 13, 2017, 4:49:18 AM3/13/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sfepy...@googlegroups.com
Hi Jan,
the problem is, that the material update is called before the initial time
step, and the initial conditions (i.e., the values of DOFs in variables) are
not set yet. I will make a PR fixing that soon.
r.
Jan Heczko
unread,
Mar 13, 2017, 6:23:17 AM3/13/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sfepy-devel
Yes, that's probably the reason, why I added
if ts.step ==0: state = problem.create_state() state.apply_ic() problem.equations.variables.set_data(state())
to `get_reaction_coefs`. But even with that piece of code, the solution fails in the second step. The error message says `step 0`, but it is actually the second time-step.
I was hoping to only get some clues to fix things myself, but you doing the work is ok as well :-) J.
Robert Cimrman
unread,
Mar 13, 2017, 6:26:20 AM3/13/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sfepy...@googlegroups.com
Try [1], please. The time_field_dependent.py example seems to be working. With
oxygen_difusion.py I no longer get the exception, but NaNs are in the solution
- this might be unrelated to the issue, though.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sfepy-devel
Works for me. The NaNs are most probably a convergence-related issue, but that is what I actually wanted to work on. Thanks a lot for fixing the solver!
Robert Cimrman
unread,
Mar 13, 2017, 9:21:24 AM3/13/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message