On 01/04/2017 03:32 PM, David Jessop wrote:
Hi Robert,
That all makes sense and I had previously been using dw_surface_integrate for my Neumann BCs: I thought that dw_surface_flux might rectify the dv/dn \neq 0 problem and I should have been clearer about this in my post. However, regardless of which term I use, nothing changes the fact that the dv/dn = 0 conditions are not being met on the left and top boundaries.
Note that not dv/dn = 0, but K_ij n_i dv/dx_j = 0. Your K_ij depends on v.
When I tried with a constant visc.val = 50, and checked the fluxes with:
fl = ev('d_surface_flux.2.Left(visc.vi, v)', copy_materials=False)
print fl
ft = ev('d_surface_flux.2.Top(visc.vi, v)', copy_materials=False)
print ft
fr = ev('d_surface_flux.2.Right(visc.vi, v)', copy_materials=False)
print fr
and used order = 2, the fluxes pretty much agreed. See the attached modified script (my additions marked by "# !!!!!!!!!!!!!!").
So the problems you encounter might be related to the way you define the viscosity.
r.
Cheers, David
On 4 January 2017 at 13:23, Robert Cimrman cimr...@ntc.zcu.cz wrote:
Hi David,
check the section of the manual on Neumann conditions in [1]. You need to use dw_surface_integrate term for the Neumann conditions, as in [2], not dw_surface_flux.
Zero flux = no term in the zero flux boundary part Non-zero flux = g = K grad(p) * n (scalar value!) needs to be given in dw_surface_integrate.
Also note, that the coefficient in the flux K is the same as the one in the Laplacian.
Does it make sense?
r.
[1] http://sfepy.org/doc-devel/solving_pdes_by_fem.html [2] http://sfepy.org/doc-devel/examples/diffusion/poisson_neumann.html
On 01/04/2017 11:28 AM, David Jessop wrote:
Hi Robert,
Here's the problem script. The regions were being saved as you suggested and they agree with what I expect them to be.
Cheers, David
On 4 January 2017 at 11:12, Robert Cimrman cimr...@ntc.zcu.cz wrote:
Hi David,
On 01/04/2017 10:28 AM, David Jessop wrote:
Hi,
I need to set insulated boundaries on two edges of my problem, and set the flux on a third. I've specified material properties (2D problem) as ins = Material('ins', val=[[0.0, 0.0], [0.0, 0.0]]) flux = Material('flux', val=[[-1.0, 0.0], [0.0, -1.0]])
and then I write my BCs as tSurfInsT = Term.new('dw_surface_flux(ins.val, u, v)', integral, Top, ins= ins, u=u, v=v) tSurfInsL = Term.new('dw_surface_flux(ins.val, u, v)', integral, Left, ins= ins, u=u, v=v)
The "insulated" boundary condition is equavalent to omitting the above two terms (ins.val is zero). Does that work?
tSurfFluxR = Term.new('dw_surface_flux(flux.val, u, v)', integral, Right,
flux=flux, u=u, v=v)
On the other hand omitting this term should make also the 'Right' region insulated, so a change in solution should be visible.
As you might infer from the visualisation of the solution below, thes BCs
are not being met (slope of the contours should be flat on the LHS and not flat on the right). Indeed, if I comment these out of the equation definition, the solution remains unchanged. What is going on?
Not sure - try sending me the example. Also, double check your region definitions. You can use problem.save_regions_as_groups('regions') to see the actual regions.
r.
Thanks,
David
<https://lh3.googleusercontent.com/-cTRMmEvK4b0/WGy-o0MCHaI/ AAAAAAAAA8s/F0T6S8bll4IFiFHlTUCMd810VOg3cWNugCLcB/s1600/NLP_ surfFlux-reduced.png>
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sfepy-devel...@googlegroups.com. To post to this group, send email to sfepy...@googlegroups.com. Visit this group at https://groups.google.com/group/sfepy-devel.
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sfepy-devel...@googlegroups.com. To post to this group, send email to sfepy...@googlegroups.com. Visit this group at https://groups.google.com/group/sfepy-devel.