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) tSurfFluxR = Term.new('dw_surface_flux(flux.val, u, v)', integral, Right, flux=flux, u=u, v=v)
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?
Thanks, David
https://lh3.googleusercontent.com/-cTRMmEvK4b0/WGy-o0MCHaI/AAAAAAAAA8s/F0T6S...
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.
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/F0T6...
-- 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.
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/F0T6...
-- 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.
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.
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/F0T6...
-- 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.
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/F0T6...
-- 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.
Hi Robert,
I agree that K_ij n_i dv/dx_j = 0 is the condition that needs to be satisfied, but as the off-diagonal entries in K_ij should be zero, this implies that dv/dx_j = 0. I'll have to check the definition of the viscosity function.
Thank you for your help. David
On 4 January 2017 at 16:10, Robert Cimrman cimr...@ntc.zcu.cz wrote:
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/F0T6...
--
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.
-- 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.
On 01/05/2017 10:25 AM, David Jessop wrote:
Hi Robert,
I agree that K_ij n_i dv/dx_j = 0 is the condition that needs to be satisfied, but as the off-diagonal entries in K_ij should be zero, this implies that dv/dx_j = 0. I'll have to check the definition of the viscosity function.
Yes, but as it is, your K_ij can be zero, or almost zero, depending on the initial v - then dv/dx_j can be whatever, am I right?
r.
Thank you for your help. David
On 4 January 2017 at 16:10, Robert Cimrman cimr...@ntc.zcu.cz wrote:
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.
-- 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.
True indeed.
On 5 January 2017 at 10:35, Robert Cimrman cimr...@ntc.zcu.cz wrote:
On 01/05/2017 10:25 AM, David Jessop wrote:
Hi Robert,
I agree that K_ij n_i dv/dx_j = 0 is the condition that needs to be satisfied, but as the off-diagonal entries in K_ij should be zero, this implies that dv/dx_j = 0. I'll have to check the definition of the viscosity function.
Yes, but as it is, your K_ij can be zero, or almost zero, depending on the initial v - then dv/dx_j can be whatever, am I right?
r.
Thank you for your help.
David
On 4 January 2017 at 16:10, Robert Cimrman cimr...@ntc.zcu.cz wrote:
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.
-- 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.
Hi Robert.
How can material properties, such as "viscosity" in my problem be saved to file (say vtk format) for inspection? I'd like to be able to do this at two points in my programme - following the call to set the initial guess for the velocity field and once the solution has converged.
Also, can material parameters be evaluated at arbitrary regions, such as the edges of the domain?
Thanks David
On Thursday, 5 January 2017 10:38:54 UTC+1, David Jessop wrote: >
True indeed.
On 5 January 2017 at 10:35, Robert Cimrman cimr...@ntc.zcu.cz wrote:
On 01/05/2017 10:25 AM, David Jessop wrote:
Hi Robert,
I agree that K_ij n_i dv/dx_j = 0 is the condition that needs to be satisfied, but as the off-diagonal entries in K_ij should be zero, this implies that dv/dx_j = 0. I'll have to check the definition of the viscosity function.
Yes, but as it is, your K_ij can be zero, or almost zero, depending on the initial v - then dv/dx_j can be whatever, am I right?
r.
Thank you for your help.
David
On 4 January 2017 at 16:10, Robert Cimrman cimr...@ntc.zcu.cz wrote:
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.
-- 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.
Hi David,
On 01/11/2017 09:32 AM, David Jessop wrote:
Hi Robert.
How can material properties, such as "viscosity" in my problem be saved to file (say vtk format) for inspection? I'd like to be able to do this at two points in my programme - following the call to set the initial guess for the velocity field and once the solution has converged.
See post_process() in [1]. The term ev_integrate_mat used there allows also obtaining the material evaluated in the quadrature points of all elements, in case you need that.
[1] http://sfepy.org/doc-devel/examples/linear_elasticity/material_nonlinearity....
Also, can material parameters be evaluated at arbitrary regions, such as the edges of the domain?
You mean manually? What exactly do you need?
Each term evaluates a material where needed - volume integrals in volume quadrature points, surface integrals in the surface (edge or face) quadrature points.
r.
Thanks David
On Thursday, 5 January 2017 10:38:54 UTC+1, David Jessop wrote: >
True indeed.
On 5 January 2017 at 10:35, Robert Cimrman cimr...@ntc.zcu.cz wrote:
On 01/05/2017 10:25 AM, David Jessop wrote:
Hi Robert,
I agree that K_ij n_i dv/dx_j = 0 is the condition that needs to be satisfied, but as the off-diagonal entries in K_ij should be zero, this implies that dv/dx_j = 0. I'll have to check the definition of the viscosity function.
Yes, but as it is, your K_ij can be zero, or almost zero, depending on the initial v - then dv/dx_j can be whatever, am I right?
r.
Thank you for your help.
David
On 4 January 2017 at 16:10, Robert Cimrman cimr...@ntc.zcu.cz wrote:
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. > > > -- 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.
Hi Robert,
I get how 'ev_integrate_mat' etc. can be used to evaluate the material values but I want specifically to output these values, say as part of the solution vector. In material_nonlinearity.py there is a post-processing hook that does this, but how would this work in interactive mode?
Regarding the second part of my question, I want to call the value of "viscosity" on the boundaries within another function (my "flux" function depends on viscosity).
Cheers, David
On Wednesday, 11 January 2017 11:35:25 UTC+1, Robert Cimrman wrote: >
Hi David,
On 01/11/2017 09:32 AM, David Jessop wrote:
Hi Robert.
How can material properties, such as "viscosity" in my problem be saved to file (say vtk format) for inspection? I'd like to be able to do this at two points in my programme - following the call to set the initial guess for the velocity field and once the solution has converged.
See post_process() in [1]. The term ev_integrate_mat used there allows also obtaining the material evaluated in the quadrature points of all elements, in case you need that.
[1]
http://sfepy.org/doc-devel/examples/linear_elasticity/material_nonlinearity....
Also, can material parameters be evaluated at arbitrary regions, such as the edges of the domain?
You mean manually? What exactly do you need?
Each term evaluates a material where needed - volume integrals in volume quadrature points, surface integrals in the surface (edge or face) quadrature points.
r.
Thanks David
On Thursday, 5 January 2017 10:38:54 UTC+1, David Jessop wrote:
True indeed.
On 5 January 2017 at 10:35, Robert Cimrman <cim...@ntc.zcu.cz
<javascript:>> wrote:
On 01/05/2017 10:25 AM, David Jessop wrote:
Hi Robert,
I agree that K_ij n_i dv/dx_j = 0 is the condition that needs to be satisfied, but as the off-diagonal entries in K_ij should be zero, this implies that dv/dx_j = 0. I'll have to check the definition of the viscosity function.
Yes, but as it is, your K_ij can be zero, or almost zero, depending on the initial v - then dv/dx_j can be whatever, am I right?
r.
Thank you for your help.
David
On 4 January 2017 at 16:10, Robert Cimrman <cim...@ntc.zcu.cz
<javascript:>> wrote:
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 <cim...@ntc.zcu.cz <javascript:>> > 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 <cim...@ntc.zcu.cz <javascript:>> >>> 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-d...@googlegroups.com <javascript:>. >>>> To post to this group, send email to sfep...@googlegroups.com <javascript:>. >>>> 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-d...@googlegroups.com <javascript:>. >> To post to this group, send email to sfep...@googlegroups.com <javascript:>. >> 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-d...@googlegroups.com <javascript:>. To post to this group, send email to sfep...@googlegroups.com <javascript:>. 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-d...@googlegroups.com <javascript:>. To post to this group, send email to sfep...@googlegroups.com
<javascript:>. Visit this group at https://groups.google.com/group/sfepy-devel.
On 01/11/2017 05:14 PM, David Jessop wrote:
Hi Robert,
I get how 'ev_integrate_mat' etc. can be used to evaluate the material values but I want specifically to output these values, say as part of the solution vector. In material_nonlinearity.py there is a post-processing hook that does this, but how would this work in interactive mode?
It is the same. Note that pb.solve() returns a State instance, not a simple vector. So:
state = pb.solve() out = state.create_output_dict()
# Add to out as in post_process()
pb.save_state('foo.vtk', out=out)
Regarding the second part of my question, I want to call the value of "viscosity" on the boundaries within another function (my "flux" function depends on viscosity).
You can call get_viscosity() (talking about nonLinearPoisson.py) directly, no?
r.
Cheers, David
On Wednesday, 11 January 2017 11:35:25 UTC+1, Robert Cimrman wrote: >
Hi David,
On 01/11/2017 09:32 AM, David Jessop wrote:
Hi Robert.
How can material properties, such as "viscosity" in my problem be saved to file (say vtk format) for inspection? I'd like to be able to do this at two points in my programme - following the call to set the initial guess for the velocity field and once the solution has converged.
See post_process() in [1]. The term ev_integrate_mat used there allows also obtaining the material evaluated in the quadrature points of all elements, in case you need that.
[1]
http://sfepy.org/doc-devel/examples/linear_elasticity/material_nonlinearity....
Also, can material parameters be evaluated at arbitrary regions, such as the edges of the domain?
You mean manually? What exactly do you need?
Each term evaluates a material where needed - volume integrals in volume quadrature points, surface integrals in the surface (edge or face) quadrature points.