Open JaroslavHron opened 5 months ago
Hi! It's been a while since I ran a Stokes solver myself. I will take a look at this over the weekend. In the meanwhile, I suggest posting a link to this issue in the Firedrake Slack there are many smart and helpful people.
Hi, thanks, actually there is a silly typo in the code above: vdot, _ = split(w)
should be vdot, _ = split(wdot)
...
which was part of the problem. Correcting that and with the updates in #20 the stokes problem works.
The last issue which remains is a time dependent DirichletBC
- can this be done?
Something like this
t = Constant(0.0)
v_in = as_vector([4.0*t, 0.0])
problem = firedrake_ts.DAEProblem(F, w, wdot, (0,10.0), bcs=bcs, time=t)
doesn't seem to work....
Nice that you got it working!
One way to get time-dependent BC is to include the condition in the weak form using Nitsche's method. Daniel Shapero has a post about this topic with example Firedrake code: https://shapero.xyz/posts/nitsches-method-nonlinear/
It seems that currently time=
constant is unused:
https://github.com/IvanYashchuk/firedrake-ts/blob/1186966053ff7ce04b80bc15c02f91f35c0ba476/firedrake_ts/ts_solver.py#L101
I think it should be possible to fetch the current time from PETSc TS (https://petsc.org/release/manualpages/TS/TSGetTime/), update the self.time
constant with the fetched value, and do this right before the application of BCs here:
https://github.com/IvanYashchuk/firedrake-ts/blob/1186966053ff7ce04b80bc15c02f91f35c0ba476/firedrake_ts/ts_solver.py#L341
Would you try that?
Hi, I am trying to use the
DAEProblem/DAESolver
for the mixed Stokes problem with Taylor-Hood discretization.Setup is a simple Poiseuille flow with parabolic inflow (one has analytic solution, which is included in the FE space).
However, the DAESolver does not seem to work. Even if I set the analytic solution as the initial data, the initial SNES residuum is large. Am I doing something wrong?
The output of the script:
The script: