Re: material_nonlinearity example
Yes, the function should return a value of mu in each quadrature point. So the "fill" line initializes those values to a constant 1, which is then modified according to the strain, also evaluated in the quadrature points.
And all is for all quad. points, for all elements at once.
So essentialy, mu = tile(mu, n_element * n_qp)
I see that many more things need to be documented :)
r.
----- Reply message ----- From: "Andre Smit" <freev...@gmail.com> To: <sfepy...@googlegroups.com> Subject: material_nonlinearity example Date: Mon, Dec 20, 2010 20:44 Robert
In the get_pars function you prepare the mu or val matrix:
if mode != 'qp': return
val = nm.empty((coors.shape[0], 1, 1), dtype=nm.float64) val.fill(1e0)
I'm trying to make sense of this. Are you repeating the material parameter for each gauss point? So for example, for a quad, there are 4 gauss points and essentially mu = tile(mu,4) and reshaped?
a
On Mon, Dec 20, 2010 at 11:08 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
On 12/20/10 17:45, Andre Smit wrote:
Robert - in the new example I notice you are not using presolve in the
solver definition or definition the history term for the displacement
variable:
'ls' : ('ls.scipy_direct', {
'presolve' : True
}),
presolve set to True means that, for linear problems ('problem' : 'linear' in newton configuration), the matrix is assembled and factorized before the time-stepping starts - the factors are then reused in each time step to quickly solve the linear systems.
It also assumes that the matrix is the same in each time step - this is not the case here, as 'mu' changes... So presolve does not have sense in this example.
variables = {
'u' : ('unknown field', 'displacement', 0., 'previous'),
'v' : ('test field', 'displacement', 'u'),
}
but consistently used these for other time step problems. Any reason? This
really emphasizes my lack of understanding of the internals.
For linear problems with constant matrix, the most efficient would be:
solvers = {
'ls' : ('ls.scipy_direct',
{'presolve' : True
}),
'newton' : ('nls.newton',
{ 'i_max' : 1,
'eps_a' : 1e-10,
'eps_r' : 1.0,
'problem' : 'linear'}),
'ts' : ('ts.simple',
{'t0' : 0.0,
't1' : 1.0,
'dt' : None,
'n_step' : 5,
'quasistatic' : True, # or False
}),
}
I have just fixed a small bug with 'quasistatic' : True
r.
--
You received this message because you are subscribed to the Google Groups "sfepy-devel" group.
To post to this group, send email to sfepy...@googlegroups.com.
To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
-- Andre
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To post to this group, send email to sfepy...@googlegroups.com. To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
Thanks - where can I retrieve the number of quadrature points used for an element (n_qp)? If I remember correctly an SfePy model can comprise different elements e.g. a mixture of quads and tris.
a
On Mon, Dec 20, 2010 at 3:08 PM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Yes, the function should return a value of mu in each quadrature point. So the "fill" line initializes those values to a constant 1, which is then modified according to the strain, also evaluated in the quadrature points.
And all is for all quad. points, for all elements at once.
So essentialy, mu = tile(mu, n_element * n_qp)
I see that many more things need to be documented :)
r.
----- Reply message ----- From: "Andre Smit" <freev...@gmail.com> To: <sfepy...@googlegroups.com> Subject: material_nonlinearity example Date: Mon, Dec 20, 2010 20:44
Robert
In the get_pars function you prepare the mu or val matrix:
if mode != 'qp': return val = nm.empty((coors.shape[0], 1, 1), dtype=nm.float64) val.fill(1e0)
I'm trying to make sense of this. Are you repeating the material parameter for each gauss point? So for example, for a quad, there are 4 gauss points and essentially mu = tile(mu,4) and reshaped?
a
On Mon, Dec 20, 2010 at 11:08 AM, Robert Cimrman <cimr...@ntc.zcu.cz>wrote:
On 12/20/10 17:45, Andre Smit wrote:
Robert - in the new example I notice you are not using presolve in the solver definition or definition the history term for the displacement variable:
'ls' : ('ls.scipy_direct', { 'presolve' : True }),
presolve set to True means that, for linear problems ('problem' : 'linear' in newton configuration), the matrix is assembled and factorized before the time-stepping starts - the factors are then reused in each time step to quickly solve the linear systems.
It also assumes that the matrix is the same in each time step - this is not the case here, as 'mu' changes... So presolve does not have sense in this example.
variables = {
'u' : ('unknown field', 'displacement', 0., 'previous'), 'v' : ('test field', 'displacement', 'u'),
}
but consistently used these for other time step problems. Any reason? This really emphasizes my lack of understanding of the internals.
For linear problems with constant matrix, the most efficient would be:
solvers = {
'ls' : ('ls.scipy_direct', {'presolve' : True }), 'newton' : ('nls.newton', { 'i_max' : 1, 'eps_a' : 1e-10, 'eps_r' : 1.0, 'problem' : 'linear'}), 'ts' : ('ts.simple', {'t0' : 0.0, 't1' : 1.0, 'dt' : None, 'n_step' : 5, 'quasistatic' : True, # or False }), }
I have just fixed a small bug with 'quasistatic' : True
r.
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To post to this group, send email to sfepy...@googlegroups.com. To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com<sfepy-devel%...@googlegroups.com> . For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
-- Andre
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To post to this group, send email to sfepy...@googlegroups.com. To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com<sfepy-devel%...@googlegroups.com> . For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To post to this group, send email to sfepy...@googlegroups.com. To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com<sfepy-devel%...@googlegroups.com> . For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
-- Andre
Check term.integral in the get_pars() function. Try e.g.
term.integral.get_qp('3_4')
Otherwise, n_qp_all = coors.shape[0] is the total number of the quadrature points in all the elements of the term integration domain.
BTW. I do not know what you use for debugging, but there is a debug() function in sfepy.base.base, that uses IPython if available (-> tab completion etc.)
Also, 'print term' will show you all the attributes of the term - this works for all sfepy classes (that inherit from Struct, that is).
As for mixing quads with tris, I frankly do not know if that still works after the recent massive changes. There is no example in the code, that would test it...
cheers, r.
On 12/21/10 15:04, Andre Smit wrote:
Thanks - where can I retrieve the number of quadrature points used for an element (n_qp)? If I remember correctly an SfePy model can comprise different elements e.g. a mixture of quads and tris.
a
On Mon, Dec 20, 2010 at 3:08 PM, Robert Cimrman<cimr...@ntc.zcu.cz> wrote:
Yes, the function should return a value of mu in each quadrature point. So the "fill" line initializes those values to a constant 1, which is then modified according to the strain, also evaluated in the quadrature points.
And all is for all quad. points, for all elements at once.
So essentialy, mu = tile(mu, n_element * n_qp)
I see that many more things need to be documented :)
r.
----- Reply message ----- From: "Andre Smit"<freev...@gmail.com> To:<sfepy...@googlegroups.com> Subject: material_nonlinearity example Date: Mon, Dec 20, 2010 20:44
Robert
In the get_pars function you prepare the mu or val matrix:
if mode != 'qp': return val = nm.empty((coors.shape[0], 1, 1), dtype=nm.float64) val.fill(1e0)
I'm trying to make sense of this. Are you repeating the material parameter for each gauss point? So for example, for a quad, there are 4 gauss points and essentially mu = tile(mu,4) and reshaped?
a
On Mon, Dec 20, 2010 at 11:08 AM, Robert Cimrman<cimr...@ntc.zcu.cz>wrote:
On 12/20/10 17:45, Andre Smit wrote:
Robert - in the new example I notice you are not using presolve in the solver definition or definition the history term for the displacement variable:
'ls' : ('ls.scipy_direct', { 'presolve' : True }),
presolve set to True means that, for linear problems ('problem' : 'linear' in newton configuration), the matrix is assembled and factorized before the time-stepping starts - the factors are then reused in each time step to quickly solve the linear systems.
It also assumes that the matrix is the same in each time step - this is not the case here, as 'mu' changes... So presolve does not have sense in this example.
variables = {
'u' : ('unknown field', 'displacement', 0., 'previous'), 'v' : ('test field', 'displacement', 'u'),
}
but consistently used these for other time step problems. Any reason? This really emphasizes my lack of understanding of the internals.
For linear problems with constant matrix, the most efficient would be:
solvers = {
'ls' : ('ls.scipy_direct', {'presolve' : True }), 'newton' : ('nls.newton', { 'i_max' : 1, 'eps_a' : 1e-10, 'eps_r' : 1.0, 'problem' : 'linear'}), 'ts' : ('ts.simple', {'t0' : 0.0, 't1' : 1.0, 'dt' : None, 'n_step' : 5, 'quasistatic' : True, # or False }),
}
I have just fixed a small bug with 'quasistatic' : True
r.
Just to confirm - the reshaping of dstrain:
dstrain = (strain - strain0) / ts.dt
dstrain.shape = (strain.shape[0] * strain.shape[1], strain.shape[2])
results in matrix strain rates in principal directions: d11,d22,d33,d12,d13,d23.
Is that correct?
On Tue, Dec 21, 2010 at 8:13 AM, Robert Cimrman <cimr...@ntc.zcu.cz> wrote:
Check term.integral in the get_pars() function. Try e.g.
term.integral.get_qp('3_4')
Otherwise, n_qp_all = coors.shape[0] is the total number of the quadrature points in all the elements of the term integration domain.
BTW. I do not know what you use for debugging, but there is a debug() function in sfepy.base.base, that uses IPython if available (-> tab completion etc.)
Also, 'print term' will show you all the attributes of the term - this works for all sfepy classes (that inherit from Struct, that is).
As for mixing quads with tris, I frankly do not know if that still works after the recent massive changes. There is no example in the code, that would test it...
cheers, r.
On 12/21/10 15:04, Andre Smit wrote:
Thanks - where can I retrieve the number of quadrature points used for an element (n_qp)? If I remember correctly an SfePy model can comprise different elements e.g. a mixture of quads and tris.
a
On Mon, Dec 20, 2010 at 3:08 PM, Robert Cimrman<cimr...@ntc.zcu.cz> wrote:
Yes, the function should return a value of mu in each quadrature point.
So the "fill" line initializes those values to a constant 1, which is then modified according to the strain, also evaluated in the quadrature points.
And all is for all quad. points, for all elements at once.
So essentialy, mu = tile(mu, n_element * n_qp)
I see that many more things need to be documented :)
r.
----- Reply message ----- From: "Andre Smit"<freev...@gmail.com> To:<sfepy...@googlegroups.com> Subject: material_nonlinearity example Date: Mon, Dec 20, 2010 20:44
Robert
In the get_pars function you prepare the mu or val matrix:
if mode != 'qp': return val = nm.empty((coors.shape[0], 1, 1), dtype=nm.float64) val.fill(1e0)
I'm trying to make sense of this. Are you repeating the material parameter for each gauss point? So for example, for a quad, there are 4 gauss points and essentially mu = tile(mu,4) and reshaped?
a
On Mon, Dec 20, 2010 at 11:08 AM, Robert Cimrman<cimr...@ntc.zcu.cz
wrote:
On 12/20/10 17:45, Andre Smit wrote:
Robert - in the new example I notice you are not using presolve in the
solver definition or definition the history term for the displacement variable:
'ls' : ('ls.scipy_direct', { 'presolve' : True }),
presolve set to True means that, for linear problems ('problem' : 'linear' in newton configuration), the matrix is assembled and factorized before the time-stepping starts - the factors are then reused in each time step to quickly solve the linear systems.
It also assumes that the matrix is the same in each time step - this is not the case here, as 'mu' changes... So presolve does not have sense in this example.
variables = {
'u' : ('unknown field', 'displacement', 0., 'previous'), 'v' : ('test field', 'displacement', 'u'),
}
but consistently used these for other time step problems. Any reason? This really emphasizes my lack of understanding of the internals.
For linear problems with constant matrix, the most efficient would be:
solvers = {
'ls' : ('ls.scipy_direct', {'presolve' : True }), 'newton' : ('nls.newton', { 'i_max' : 1, 'eps_a' : 1e-10, 'eps_r' : 1.0, 'problem' : 'linear'}), 'ts' : ('ts.simple', {'t0' : 0.0, 't1' : 1.0, 'dt' : None, 'n_step' : 5, 'quasistatic' : True, # or False }), }
I have just fixed a small bug with 'quasistatic' : True
r.
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To post to this group, send email to sfepy...@googlegroups.com. To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com<sfepy-devel%...@googlegroups.com> . For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.
-- Andre
On 12/21/10 15:53, Andre Smit wrote:
Just to confirm - the reshaping of dstrain:
dstrain = (strain - strain0) / ts.dt dstrain.shape = (strain.shape[0] * strain.shape[1], strain.shape[2])
results in matrix strain rates in principal directions: d11,d22,d33,d12,d13,d23.
those are the columns after the reshape, yes.
before, the shape is (n_el, n_qp, 1, 6), after the reshape it is (n_el * n_qp, 6), so e.g. dstrain[:, 2] are d33 in all the quadrature points.
r.
Is that correct?
On Tue, Dec 21, 2010 at 8:13 AM, Robert Cimrman<cimr...@ntc.zcu.cz> wrote:
Check term.integral in the get_pars() function. Try e.g.
term.integral.get_qp('3_4')
Otherwise, n_qp_all = coors.shape[0] is the total number of the quadrature points in all the elements of the term integration domain.
BTW. I do not know what you use for debugging, but there is a debug() function in sfepy.base.base, that uses IPython if available (-> tab completion etc.)
Also, 'print term' will show you all the attributes of the term - this works for all sfepy classes (that inherit from Struct, that is).
As for mixing quads with tris, I frankly do not know if that still works after the recent massive changes. There is no example in the code, that would test it...
cheers, r.
On 12/21/10 15:04, Andre Smit wrote:
Thanks - where can I retrieve the number of quadrature points used for an element (n_qp)? If I remember correctly an SfePy model can comprise different elements e.g. a mixture of quads and tris.
a
On Mon, Dec 20, 2010 at 3:08 PM, Robert Cimrman<cimr...@ntc.zcu.cz> wrote:
Yes, the function should return a value of mu in each quadrature point.
So the "fill" line initializes those values to a constant 1, which is then modified according to the strain, also evaluated in the quadrature points.
And all is for all quad. points, for all elements at once.
So essentialy, mu = tile(mu, n_element * n_qp)
I see that many more things need to be documented :)
r.
----- Reply message ----- From: "Andre Smit"<freev...@gmail.com> To:<sfepy...@googlegroups.com> Subject: material_nonlinearity example Date: Mon, Dec 20, 2010 20:44
Robert
In the get_pars function you prepare the mu or val matrix:
if mode != 'qp': return val = nm.empty((coors.shape[0], 1, 1), dtype=nm.float64) val.fill(1e0)
I'm trying to make sense of this. Are you repeating the material parameter for each gauss point? So for example, for a quad, there are 4 gauss points and essentially mu = tile(mu,4) and reshaped?
a
On Mon, Dec 20, 2010 at 11:08 AM, Robert Cimrman<cimr...@ntc.zcu.cz
wrote:
On 12/20/10 17:45, Andre Smit wrote:
Robert - in the new example I notice you are not using presolve in the
solver definition or definition the history term for the displacement variable:
'ls' : ('ls.scipy_direct', { 'presolve' : True }),
presolve set to True means that, for linear problems ('problem' : 'linear' in newton configuration), the matrix is assembled and factorized before the time-stepping starts - the factors are then reused in each time step to quickly solve the linear systems.
It also assumes that the matrix is the same in each time step - this is not the case here, as 'mu' changes... So presolve does not have sense in this example.
variables = {
'u' : ('unknown field', 'displacement', 0., 'previous'), 'v' : ('test field', 'displacement', 'u'),
}
but consistently used these for other time step problems. Any reason? This really emphasizes my lack of understanding of the internals.
For linear problems with constant matrix, the most efficient would be:
solvers = {
'ls' : ('ls.scipy_direct', {'presolve' : True }), 'newton' : ('nls.newton', { 'i_max' : 1, 'eps_a' : 1e-10, 'eps_r' : 1.0, 'problem' : 'linear'}), 'ts' : ('ts.simple', {'t0' : 0.0, 't1' : 1.0, 'dt' : None, 'n_step' : 5, 'quasistatic' : True, # or False }),
}
I have just fixed a small bug with 'quasistatic' : True
r.
participants (2)
-
Andre Smit
-
Robert Cimrman