
Hi R,
I was very sick for the past few days. Just got up from bed yesterday. Earlier I went through the docs, samples, guide as you had instructed. Also I got the weak form of the equations. Kindly look at the attached PDF and suggest me the path I should take.
From today onwards I will remain online all day and will ping you whenever I get struck.
Regards Ankit

- Solve the Navier Stokes equations (in time?) -> u, p
- No, currently I was beginning with steady state to see how things work out.
(Do you plan to introduce temperature dependence of viscosity later?) -> No, instead of temperature dependence of viscosity more focus will be to reach enthalpy and phase change part first.
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes terms support only 3D - update will be needed - make a new issue, please) and setting up some test problems. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started. -> Okie
-- Hi,
it seems that the only term that is missing is the "c".
So there is just a one-way coupling, right?
- Solve the Navier Stokes equations (in time?) -> u, p
- Solve the Poisson equation with c(u) -> T
(Do you plan to introduce temperature dependence of viscosity later?)
The second part should be ok, the first one might be tricky, depending on the magnitude of viscosity. We do have the Navier-Stokes example, but it's more or less a toy example. Implementing a good flow solver (with some stabilization) might be needed. I will not be of much help in this respect...
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes terms support only 3D - update will be needed - make a new issue, please) and setting up some test problems.
The first thing to do is to have all terms ready - start with the "c" term, as then the energy equation can be tried for some given velocity. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started.
r.
On Friday, 21 June 2013 17:36:48 UTC+5:30, Ankit Mahato wrote:
Hi R,
I was very sick for the past few days. Just got up from bed yesterday. Earlier I went through the docs, samples, guide as you had instructed. Also I got the weak form of the equations. Kindly look at the attached PDF and suggest me the path I should take. From today onwards I will remain online all day and will ping you whenever I get struck.
Regards Ankit

Hi Ankit,
On 06/21/2013 02:35 PM, Ankit Mahato wrote:
- Solve the Navier Stokes equations (in time?) -> u, p
- No, currently I was beginning with steady state to see how things work out.
Ok. So be prepared that the default nonlinear solver that we have might not be enough to solve the stationary Navier Stokes equations. As having a good flow solver available in sfepy would be greatly appreciated, it could be a nice side-effect of the GSoC ;)
(Do you plan to introduce temperature dependence of viscosity later?) -> No, instead of temperature dependence of viscosity more focus will be to reach enthalpy and phase change part first.
Ok.
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes terms support only 3D - update will be needed - make a new issue, please) and setting up some test problems. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started. -> Okie
How is it going? I think we could agree on some status report schedule, like twice(?) in a week, so that I know that you are not stuck?
r.
-- Hi,
it seems that the only term that is missing is the "c".
So there is just a one-way coupling, right?
- Solve the Navier Stokes equations (in time?) -> u, p
- Solve the Poisson equation with c(u) -> T
(Do you plan to introduce temperature dependence of viscosity later?)
The second part should be ok, the first one might be tricky, depending on the magnitude of viscosity. We do have the Navier-Stokes example, but it's more or less a toy example. Implementing a good flow solver (with some stabilization) might be needed. I will not be of much help in this respect...
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes terms support only 3D - update will be needed - make a new issue, please) and setting up some test problems.
The first thing to do is to have all terms ready - start with the "c" term, as then the energy equation can be tried for some given velocity. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started.
r.
On Friday, 21 June 2013 17:36:48 UTC+5:30, Ankit Mahato wrote:
Hi R,
I was very sick for the past few days. Just got up from bed yesterday. Earlier I went through the docs, samples, guide as you had instructed. Also I got the weak form of the equations. Kindly look at the attached PDF and suggest me the path I should take. From today onwards I will remain online all day and will ping you whenever I get struck.
Regards Ankit

Hi R,
I read the implementation of terms and ran the example. http://docs.sfepy.org/doc-devel/examples/navier_stokes/navier_stokes.html Then I looked deeper into: terms/termsNavierStokes.py terms/extmod/termsNavierStokes.h terms/extmod/termsNavierStokes.c
And to tell you the truth, I am scared. I think I will need more guidance from you regarding the implementation of my project.
For the energy equation .. I think you are talking about { c \del^2 T } where in my case I have written as { \alpha \del^2 T}. { \alpha } is the thermal diffusivity which is a constant. So kindly guide me on how to implement the energy equation alone with a given velocity field. I will try out 2 cases :
- Flow in a tube
- Flow over a Flat plate
On Monday, 24 June 2013 22:24:46 UTC+5:30, Robert Cimrman wrote:
Hi Ankit,
On 06/21/2013 02:35 PM, Ankit Mahato wrote:
- Solve the Navier Stokes equations (in time?) -> u, p
- No, currently I was beginning with steady state to see how things work out.
Ok. So be prepared that the default nonlinear solver that we have might not be enough to solve the stationary Navier Stokes equations. As having a good flow solver available in sfepy would be greatly appreciated, it could be a nice side-effect of the GSoC ;)
Yes a good flow solver will be very good for sfepy as many future projects might require coupling with navier strokes equation. I will give my best to develop it. Can you provide me the initial set of tasks that needs to be done to improve it.
(Do you plan to introduce temperature dependence of viscosity later?) -> No, instead of temperature dependence of viscosity more focus will be to reach enthalpy and phase change part first.
Ok.
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes
terms
support only 3D - update will be needed - make a new issue, please) and setting up some test problems. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started. -> Okie
How is it going? I think we could agree on some status report schedule, like twice(?) in a week, so that I know that you are not stuck?
You were right R. I got stuck. It would be wonderful if we have status report schedule - twice or more(the more the better! please) times in a week.
Regards, Ankit
r.
-- Hi,
it seems that the only term that is missing is the "c".
So there is just a one-way coupling, right?
- Solve the Navier Stokes equations (in time?) -> u, p
- Solve the Poisson equation with c(u) -> T
(Do you plan to introduce temperature dependence of viscosity later?)
The second part should be ok, the first one might be tricky, depending on the magnitude of viscosity. We do have the Navier-Stokes example, but it's more or less a toy example. Implementing a good flow solver (with some stabilization) might be needed. I will not be of much help in this respect...
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes terms support only 3D - update will be needed - make a new issue, please) and setting up some test problems.
The first thing to do is to have all terms ready - start with the "c" term, as then the energy equation can be tried for some given velocity. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started.
r.
On Friday, 21 June 2013 17:36:48 UTC+5:30, Ankit Mahato wrote:
Hi R,
I was very sick for the past few days. Just got up from bed yesterday. Earlier I went through the docs, samples, guide as you had instructed. Also I got the weak form of the equations. Kindly look at the attached PDF and suggest me the path I should take. From today onwards I will remain online all day and will ping you
whenever
I get struck.
Regards Ankit

On 06/25/2013 10:36 AM, Ankit Mahato wrote:
Hi R,
I read the implementation of terms and ran the example. http://docs.sfepy.org/doc-devel/examples/navier_stokes/navier_stokes.html Then I looked deeper into: terms/termsNavierStokes.py terms/extmod/termsNavierStokes.h terms/extmod/termsNavierStokes.c
And to tell you the truth, I am scared.
:) This is the oldest "legacy" code in SfePy, so yes, it's quite hairy.
I think I will need more guidance from you regarding the implementation of my project.
I was going to fix the Navier Stokes terms for 2D myself, do not worry about this.
For the energy equation .. I think you are talking about { c \del^2 T } where in my case I have written as { \alpha \del^2 T}. { \alpha } is the thermal diffusivity which is a constant.
No, this is the standard Laplace term. The one that is missing is the one with the convective velocity. It is somewhat similar to dw_v_dot_grad_s but not quite. Anyway, there are much simpler terms then the Navier Stokes ones, e.g. in sfepy/terms/termsBasic.py.
So kindly guide me on how to implement the energy equation alone with a given velocity field.
Implementing a new term is difficult because
- either in Python it has to be vectorized over all elements to get a decent speed
- or one must dive into C, and the C data structures / code flow are not well documented.
I can implement the term as well, since this is probably not the thing you should waste your time with. IMHO you should focus on making cases and developing fast and robust solvers for them, if needed, right?
I will try out 2 cases :
- Flow in a tube
- Flow over a Flat plate
Sounds ok.
So prepare your cases, for the moment without the convective term. I will add the term in the meantime.
BTW. how are we going to share the code? I guess you should make a branch in sfepy and put your cases into a new subdirectory of examples/.
r.
On Monday, 24 June 2013 22:24:46 UTC+5:30, Robert Cimrman wrote:
Hi Ankit,
On 06/21/2013 02:35 PM, Ankit Mahato wrote:
- Solve the Navier Stokes equations (in time?) -> u, p
- No, currently I was beginning with steady state to see how things work out.
Ok. So be prepared that the default nonlinear solver that we have might not be enough to solve the stationary Navier Stokes equations. As having a good flow solver available in sfepy would be greatly appreciated, it could be a nice side-effect of the GSoC ;)
Yes a good flow solver will be very good for sfepy as many future projects might require coupling with navier strokes equation. I will give my best to develop it. Can you provide me the initial set of tasks that needs to be done to improve it.
(Do you plan to introduce temperature dependence of viscosity later?) -> No, instead of temperature dependence of viscosity more focus will be to reach enthalpy and phase change part first.
Ok.
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes
terms
support only 3D - update will be needed - make a new issue, please) and setting up some test problems. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started. -> Okie
How is it going? I think we could agree on some status report schedule, like twice(?) in a week, so that I know that you are not stuck?
You were right R. I got stuck. It would be wonderful if we have status report schedule - twice or more(the more the better! please) times in a week.
Regards, Ankit
r.
-- Hi,
it seems that the only term that is missing is the "c".
So there is just a one-way coupling, right?
- Solve the Navier Stokes equations (in time?) -> u, p
- Solve the Poisson equation with c(u) -> T
(Do you plan to introduce temperature dependence of viscosity later?)
The second part should be ok, the first one might be tricky, depending on the magnitude of viscosity. We do have the Navier-Stokes example, but it's more or less a toy example. Implementing a good flow solver (with some stabilization) might be needed. I will not be of much help in this respect...
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes terms support only 3D - update will be needed - make a new issue, please) and setting up some test problems.
The first thing to do is to have all terms ready - start with the "c" term, as then the energy equation can be tried for some given velocity. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started.
r.
On Friday, 21 June 2013 17:36:48 UTC+5:30, Ankit Mahato wrote:
Hi R,
I was very sick for the past few days. Just got up from bed yesterday. Earlier I went through the docs, samples, guide as you had instructed. Also I got the weak form of the equations. Kindly look at the attached PDF and suggest me the path I should take. From today onwards I will remain online all day and will ping you
whenever
I get struck.
Regards Ankit

On Tuesday, 25 June 2013 14:43:22 UTC+5:30, Robert Cimrman wrote:
On 06/25/2013 10:36 AM, Ankit Mahato wrote:
Hi R,
I read the implementation of terms and ran the example.
http://docs.sfepy.org/doc-devel/examples/navier_stokes/navier_stokes.html
Then I looked deeper into: terms/termsNavierStokes.py terms/extmod/termsNavierStokes.h terms/extmod/termsNavierStokes.c
And to tell you the truth, I am scared.
:) This is the oldest "legacy" code in SfePy, so yes, it's quite hairy.
oh!
I think I will need more guidance from you regarding the implementation of my project.
I was going to fix the Navier Stokes terms for 2D myself, do not worry about this.
:)
For the energy equation .. I think you are talking about { c \del^2 T } where in my case I have written as { \alpha \del^2 T}. { \alpha } is the thermal diffusivity which is a constant.
No, this is the standard Laplace term. The one that is missing is the one with the convective velocity. It is somewhat similar to dw_v_dot_grad_s but not quite. Anyway, there are much simpler terms then the Navier Stokes ones, e.g. in sfepy/terms/termsBasic.py.
okie.
So kindly guide me on how to implement the energy equation alone with a given velocity field.
Implementing a new term is difficult because
- either in Python it has to be vectorized over all elements to get a decent speed
- or one must dive into C, and the C data structures / code flow are not well documented.
I can implement the term as well, since this is probably not the thing you should waste your time with. IMHO you should focus on making cases and developing fast and robust solvers for them, if needed, right?
okie.
I will try out 2 cases :
- Flow in a tube
- Flow over a Flat plate
Sounds ok.
So prepare your cases, for the moment without the convective term. I will add the term in the meantime.
Okie
BTW. how are we going to share the code? I guess you should make a branch in sfepy and put your cases into a new subdirectory of examples/.
Okie. I will make a branch and put my cases in a new subdirectory.
r.
On Monday, 24 June 2013 22:24:46 UTC+5:30, Robert Cimrman wrote:
Hi Ankit,
On 06/21/2013 02:35 PM, Ankit Mahato wrote:
- Solve the Navier Stokes equations (in time?) -> u, p
- No, currently I was beginning with steady state to see how things
work
out.
Ok. So be prepared that the default nonlinear solver that we have might not be enough to solve the stationary Navier Stokes equations. As having a good flow solver available in sfepy would be greatly appreciated, it could be a nice side-effect of the GSoC ;)
Yes a good flow solver will be very good for sfepy as many future projects might require coupling with navier strokes equation. I will give my best to develop it. Can you provide me the initial set of tasks that needs to be done to improve it.
(Do you plan to introduce temperature dependence of viscosity later?) -> No, instead of temperature dependence of viscosity more focus will
be
to
reach enthalpy and phase change part first.
Ok.
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes
terms
support only 3D - update will be needed - make a new issue, please) and setting up some test problems. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started. -> Okie
How is it going? I think we could agree on some status report schedule, like twice(?) in a week, so that I know that you are not stuck?
You were right R. I got stuck. It would be wonderful if we have status report schedule - twice or more(the more the better! please) times in a week.
Regards, Ankit
r.
-- Hi,
it seems that the only term that is missing is the "c".
So there is just a one-way coupling, right?
- Solve the Navier Stokes equations (in time?) -> u, p
- Solve the Poisson equation with c(u) -> T
(Do you plan to introduce temperature dependence of viscosity later?)
The second part should be ok, the first one might be tricky, depending on the magnitude of viscosity. We do have the Navier-Stokes example, but it's more or less a toy example. Implementing a good flow solver (with some stabilization) might be needed. I will not be of much help in this respect...
Anyway, I recommend starting in 2D (caveat: some of the Navier-Stokes terms support only 3D - update will be needed - make a new issue, please)
and
setting up some test problems.
The first thing to do is to have all terms ready - start with the "c" term, as then the energy equation can be tried for some given velocity. Let me know if you need help with that - the "How to Implement a New Term" doc should get you started.
r.
On Friday, 21 June 2013 17:36:48 UTC+5:30, Ankit Mahato wrote:
Hi R,
I was very sick for the past few days. Just got up from bed yesterday. Earlier I went through the docs, samples, guide as you had
instructed.
Also I got the weak form of the equations. Kindly look at the attached PDF and suggest me the path I should take. From today onwards I will remain online all day and will ping you whenever I get struck.
Regards Ankit

On 06/25/2013 11:27 AM, Ankit Mahato wrote:
On Tuesday, 25 June 2013 14:43:22 UTC+5:30, Robert Cimrman wrote:
On 06/25/2013 10:36 AM, Ankit Mahato wrote:
Hi R,
I read the implementation of terms and ran the example.
http://docs.sfepy.org/doc-devel/examples/navier_stokes/navier_stokes.html
Then I looked deeper into: terms/termsNavierStokes.py terms/extmod/termsNavierStokes.h terms/extmod/termsNavierStokes.c
And to tell you the truth, I am scared.
:) This is the oldest "legacy" code in SfePy, so yes, it's quite hairy.
oh!
I think I will need more guidance from you regarding the implementation of my project.
I was going to fix the Navier Stokes terms for 2D myself, do not worry about this.
:)
For the energy equation .. I think you are talking about { c \del^2 T } where in my case I have written as { \alpha \del^2 T}. { \alpha } is the thermal diffusivity which is a constant.
No, this is the standard Laplace term. The one that is missing is the one with the convective velocity. It is somewhat similar to dw_v_dot_grad_s but not quite. Anyway, there are much simpler terms then the Navier Stokes ones, e.g. in sfepy/terms/termsBasic.py.
okie.
So kindly guide me on how to implement the energy equation alone with a given velocity field.
Implementing a new term is difficult because
- either in Python it has to be vectorized over all elements to get a decent speed
- or one must dive into C, and the C data structures / code flow are not well documented.
I can implement the term as well, since this is probably not the thing you should waste your time with. IMHO you should focus on making cases and developing fast and robust solvers for them, if needed, right?
okie.
BTW. how would you call this term?
I will try out 2 cases :
- Flow in a tube
- Flow over a Flat plate
Sounds ok.
So prepare your cases, for the moment without the convective term. I will add the term in the meantime.
Okie
BTW. how are we going to share the code? I guess you should make a branch in sfepy and put your cases into a new subdirectory of examples/.
Okie. I will make a branch and put my cases in a new subdirectory.

Ankit,
the new term is there (dw_convect_v_grad_s), and its use is demonstrated in examples/diffusion/poisson_functions.py - it contains pretty much the same equations you need for the energy equation...
Let me know if it works for you.
r.
On 06/26/2013 11:46 AM, Robert Cimrman wrote:
On 06/25/2013 11:27 AM, Ankit Mahato wrote:
On Tuesday, 25 June 2013 14:43:22 UTC+5:30, Robert Cimrman wrote:
On 06/25/2013 10:36 AM, Ankit Mahato wrote:
Hi R,
I read the implementation of terms and ran the example.
http://docs.sfepy.org/doc-devel/examples/navier_stokes/navier_stokes.html
Then I looked deeper into: terms/termsNavierStokes.py terms/extmod/termsNavierStokes.h terms/extmod/termsNavierStokes.c
And to tell you the truth, I am scared.
:) This is the oldest "legacy" code in SfePy, so yes, it's quite hairy.
oh!
I think I will need more guidance from you regarding the implementation of my project.
I was going to fix the Navier Stokes terms for 2D myself, do not worry about this.
:)
For the energy equation .. I think you are talking about { c \del^2 T } where in my case I have written as { \alpha \del^2 T}. { \alpha } is the thermal diffusivity which is a constant.
No, this is the standard Laplace term. The one that is missing is the one with the convective velocity. It is somewhat similar to dw_v_dot_grad_s but not quite. Anyway, there are much simpler terms then the Navier Stokes ones, e.g. in sfepy/terms/termsBasic.py.
okie.
So kindly guide me on how to implement the energy equation alone with a given velocity field.
Implementing a new term is difficult because
- either in Python it has to be vectorized over all elements to get a decent speed
- or one must dive into C, and the C data structures / code flow are not well documented.
I can implement the term as well, since this is probably not the thing you should waste your time with. IMHO you should focus on making cases and developing fast and robust solvers for them, if needed, right?
okie.
BTW. how would you call this term?
I will try out 2 cases :
- Flow in a tube
- Flow over a Flat plate
Sounds ok.
So prepare your cases, for the moment without the convective term. I will add the term in the meantime.
Okie
BTW. how are we going to share the code? I guess you should make a branch in sfepy and put your cases into a new subdirectory of examples/.
Okie. I will make a branch and put my cases in a new subdirectory.

R,
here you will find the codes i update: https://github.com/animator/sfepy/tree/master/examples/ankit
On Wednesday, 26 June 2013 19:18:53 UTC+5:30, Robert Cimrman wrote:
Ankit,
the new term is there (dw_convect_v_grad_s), and its use is demonstrated in examples/diffusion/poisson_functions.py - it contains pretty much the same equations you need for the energy equation...
Working on it.
Let me know if it works for you.
r.
On 06/25/2013 11:27 AM, Ankit Mahato wrote:
On Tuesday, 25 June 2013 14:43:22 UTC+5:30, Robert Cimrman wrote:
On 06/25/2013 10:36 AM, Ankit Mahato wrote:
Hi R,
I read the implementation of terms and ran the example.
http://docs.sfepy.org/doc-devel/examples/navier_stokes/navier_stokes.html
Then I looked deeper into: terms/termsNavierStokes.py terms/extmod/termsNavierStokes.h terms/extmod/termsNavierStokes.c
And to tell you the truth, I am scared.
:) This is the oldest "legacy" code in SfePy, so yes, it's quite hairy.
oh!
I think I will need more guidance from you regarding the
implementation
of
my project.
I was going to fix the Navier Stokes terms for 2D myself, do not worry about this.
:)
For the energy equation .. I think you are talking about { c \del^2
T }
where in my case I have written as { \alpha \del^2 T}. { \alpha } is
On 06/26/2013 11:46 AM, Robert Cimrman wrote: the
thermal diffusivity which is a constant.
No, this is the standard Laplace term. The one that is missing is the one with the convective velocity. It is somewhat similar to dw_v_dot_grad_s but not quite. Anyway, there are much simpler terms then the Navier Stokes ones, e.g. in sfepy/terms/termsBasic.py.
okie.
So kindly guide me on how to implement the energy equation alone with
a
given velocity field.
Implementing a new term is difficult because
- either in Python it has to be vectorized over all elements to get a decent speed
- or one must dive into C, and the C data structures / code flow are not well documented.
I can implement the term as well, since this is probably not the thing you should waste your time with. IMHO you should focus on making cases and developing fast and robust solvers for them, if needed, right?
okie.
BTW. how would you call this term?
I will try out 2 cases :
- Flow in a tube
- Flow over a Flat plate
Sounds ok.
So prepare your cases, for the moment without the convective term. I will add the term in the meantime.
Okie
BTW. how are we going to share the code? I guess you should make a
branch
in sfepy and put your cases into a new subdirectory of examples/.
Okie. I will make a branch and put my cases in a new subdirectory.

Hi R,
I tried out the Steady Axial convection and diffusion in slug flow with
velocity :math:U _0
in an insulated pipe. Entry and Exit temperatures are
given.
\\ :math:T _0 for x \leqslant 0
\\ :math:T _1 for x \geqslant L
https://github.com/animator/sfepy/blob/master/examples/ankit/slug_flow.py
I had the query on how to set the lateral surface of the cylinder to
satisfy the condition \alpha \frac {\partial T}{\partial n} = 0.
Can you please tell what get_pars and get_load_variable is doing.
Regards, Ankit
On Thursday, 27 June 2013 02:58:49 UTC+5:30, Ankit Mahato wrote:
R,
here you will find the codes i update: https://github.com/animator/sfepy/tree/master/examples/ankit
On Wednesday, 26 June 2013 19:18:53 UTC+5:30, Robert Cimrman wrote:
Ankit,
the new term is there (dw_convect_v_grad_s), and its use is demonstrated in examples/diffusion/poisson_functions.py - it contains pretty much the same equations you need for the energy equation...
Working on it.
Let me know if it works for you.
r.
On 06/25/2013 11:27 AM, Ankit Mahato wrote:
On Tuesday, 25 June 2013 14:43:22 UTC+5:30, Robert Cimrman wrote:
On 06/25/2013 10:36 AM, Ankit Mahato wrote:
Hi R,
I read the implementation of terms and ran the example.
http://docs.sfepy.org/doc-devel/examples/navier_stokes/navier_stokes.html
Then I looked deeper into: terms/termsNavierStokes.py terms/extmod/termsNavierStokes.h terms/extmod/termsNavierStokes.c
And to tell you the truth, I am scared.
:) This is the oldest "legacy" code in SfePy, so yes, it's quite hairy.
oh!
I think I will need more guidance from you regarding the
implementation
of
my project.
I was going to fix the Navier Stokes terms for 2D myself, do not worry about this.
:)
For the energy equation .. I think you are talking about { c \del^2
T }
where in my case I have written as { \alpha \del^2 T}. { \alpha } is
thermal diffusivity which is a constant.
No, this is the standard Laplace term. The one that is missing is the one with the convective velocity. It is somewhat similar to dw_v_dot_grad_s but not quite. Anyway, there are much simpler terms then the Navier Stokes ones, e.g. in sfepy/terms/termsBasic.py.
okie.
So kindly guide me on how to implement the energy equation alone
with a
given velocity field.
Implementing a new term is difficult because
- either in Python it has to be vectorized over all elements to get a decent speed
- or one must dive into C, and the C data structures / code flow are not well documented.
I can implement the term as well, since this is probably not the
On 06/26/2013 11:46 AM, Robert Cimrman wrote: the thing you
should waste your time with. IMHO you should focus on making cases and developing fast and robust solvers for them, if needed, right?
okie.
BTW. how would you call this term?
I will try out 2 cases :
- Flow in a tube
- Flow over a Flat plate
Sounds ok.
So prepare your cases, for the moment without the convective term. I will add the term in the meantime.
Okie
BTW. how are we going to share the code? I guess you should make a
branch
in sfepy and put your cases into a new subdirectory of examples/.
Okie. I will make a branch and put my cases in a new subdirectory.

On 06/27/2013 08:17 PM, Ankit Mahato wrote:
Hi R,
I tried out the Steady Axial convection and diffusion in slug flow with velocity :math:
U _0
in an insulated pipe. Entry and Exit temperatures are given. \\ :math:T _0 for x \leqslant 0
\\ :math:T _1 for x \geqslant L
https://github.com/animator/sfepy/blob/master/examples/ankit/slug_flow.py I had the query on how to set the lateral surface of the cylinder to satisfy the condition \alpha \frac {\partial T}{\partial n} = 0.
Short answer: do nothing. Longer answer: [1]
Can you please tell what get_pars and get_load_variable is doing.
You probably want to use a different right-hand side term (dw_volume_lvf for volume force, the surface force term is missing, but could be easily added, if needed). Otherwise get_pars() computes the position-dependent material parameter (load.f), and get_load_variable() just demonstrates, how to use parameter variables and how to set their values by a function - you do not need that either.
BTW. look at the patch that adds the dw_convect_v_grad_s term - it captures everything that usually needs to be done to add a term...
Cheers, r.
Regards, Ankit
[1] http://sfepy.org/doc-devel/tutorial.html#notes-on-solving-pdes-by-the-finite...

On Friday, 28 June 2013 01:17:19 UTC+5:30, Robert Cimrman wrote:
On 06/27/2013 08:17 PM, Ankit Mahato wrote:
Hi R,
I tried out the Steady Axial convection and diffusion in slug flow with velocity :math:
U _0
in an insulated pipe. Entry and Exit temperatures are given. \\ :math:T _0 for x \leqslant 0
\\ :math:T _1 for x \geqslant L
https://github.com/animator/sfepy/blob/master/examples/ankit/slug_flow.py
I had the query on how to set the lateral surface of the cylinder to satisfy the condition \alpha \frac {\partial T}{\partial n} = 0.
Short answer: do nothing. Longer answer: [1]
Oops. I confused \tau D. That was so stupid of me.
Can you please tell what get_pars and get_load_variable is doing.
You probably want to use a different right-hand side term (dw_volume_lvf for volume force, the surface force term is missing, but could be easily added, if needed). Otherwise get_pars() computes the position-dependent material parameter (load.f), and get_load_variable() just demonstrates, how to use parameter variables and how to set their values by a function - you do not need that either.
got it!
BTW. look at the patch that adds the dw_convect_v_grad_s term - it captures everything that usually needs to be done to add a term...
Looking at it R.
So energy eq is working. Should I try and develop few more examples or get into the navier strokes part.
Cheers, r.
Regards, Ankit
[1]
http://sfepy.org/doc-devel/tutorial.html#notes-on-solving-pdes-by-the-finite...

On 06/27/2013 10:27 PM, Ankit Mahato wrote:
On Friday, 28 June 2013 01:17:19 UTC+5:30, Robert Cimrman wrote:
On 06/27/2013 08:17 PM, Ankit Mahato wrote:
Hi R,
I tried out the Steady Axial convection and diffusion in slug flow with velocity :math:
U _0
in an insulated pipe. Entry and Exit temperatures are given. \\ :math:T _0 for x \leqslant 0
\\ :math:T _1 for x \geqslant L
https://github.com/animator/sfepy/blob/master/examples/ankit/slug_flow.py
I had the query on how to set the lateral surface of the cylinder to satisfy the condition \alpha \frac {\partial T}{\partial n} = 0.
Short answer: do nothing. Longer answer: [1]
Oops. I confused \tau D. That was so stupid of me.
I do not understand :)
Can you please tell what get_pars and get_load_variable is doing.
You probably want to use a different right-hand side term (dw_volume_lvf for volume force, the surface force term is missing, but could be easily added, if needed). Otherwise get_pars() computes the position-dependent material parameter (load.f), and get_load_variable() just demonstrates, how to use parameter variables and how to set their values by a function - you do not need that either.
got it!
BTW. look at the patch that adds the dw_convect_v_grad_s term - it captures everything that usually needs to be done to add a term...
Looking at it R.
So energy eq is working. Should I try and develop few more examples or get into the navier strokes part.
IMHO solving the Navier-Stokes will be the "hard" part of the problem, as a new solver will probably be needed. So the sooner you start with that, the better. The only problem for now is, that the NS terms work in 3D only...
Other thing: I fetched your code and the history is rather wild (use gitk --all to see it) - I suggest you to checkout the current origin master branch, make your branch (phase_change?) on top of it, and then cherry-pick the commits adding the example files (maybe rename the directory to examples/phase_change). There should be no merges... Is it clear? :)
r.
Cheers, r.
Regards, Ankit
[1]
http://sfepy.org/doc-devel/tutorial.html#notes-on-solving-pdes-by-the-finite...

On Friday, 28 June 2013 03:10:54 UTC+5:30, Robert Cimrman wrote:
On 06/27/2013 10:27 PM, Ankit Mahato wrote:
On Friday, 28 June 2013 01:17:19 UTC+5:30, Robert Cimrman wrote:
On 06/27/2013 08:17 PM, Ankit Mahato wrote:
Hi R,
I tried out the Steady Axial convection and diffusion in slug flow
with
velocity :math:
U _0
in an insulated pipe. Entry and Exit temperatures are given. \\ :math:T _0 for x \leqslant 0
\\ :math:T _1 for x \geqslant L
https://github.com/animator/sfepy/blob/master/examples/ankit/slug_flow.py
I had the query on how to set the lateral surface of the cylinder to satisfy the condition \alpha \frac {\partial T}{\partial n} = 0.
Short answer: do nothing. Longer answer: [1]
Oops. I confused \tau D. That was so stupid of me.
I do not understand :)
Sorry Typo I meant \Gamma _D .
Can you please tell what get_pars and get_load_variable is doing.
You probably want to use a different right-hand side term (dw_volume_lvf for volume force, the surface force term is missing, but could be easily added, if needed). Otherwise get_pars() computes the position-dependent material parameter (load.f), and get_load_variable() just demonstrates, how to use parameter variables and how to set their values by a function - you do not need that either.
got it!
BTW. look at the patch that adds the dw_convect_v_grad_s term - it captures everything that usually needs to be done to add a term...
Looking at it R.
So energy eq is working. Should I try and develop few more examples or get into the navier strokes part.
IMHO solving the Navier-Stokes will be the "hard" part of the problem, as a new solver will probably be needed. So the sooner you start with that, the better. The only problem for now is, that the NS terms work in 3D only...
Yes. Kindly give me a head start to begin it.
Other thing: I fetched your code and the history is rather wild (use gitk --all to see it) - I suggest you to checkout the current origin master branch, make your branch (phase_change?) on top of it, and then cherry-pick the commits adding the example files (maybe rename the directory to examples/phase_change). There should be no merges... Is it clear? :)
Yes. it is wild as I was trying to fetch the latest code from main sfepy repo and merge it. then things got a bit messy. I will make a new branch for phase_change.
r.
Cheers, r.
Regards, Ankit
[1]
http://sfepy.org/doc-devel/tutorial.html#notes-on-solving-pdes-by-the-finite...

R,
Attached is the Temperature distribution along the length with Peclet number graph which you wanted to have a look at. I used ParaView to generate it. It is validated by the Fig 6.2 of Computer Simulation of Flow and Heat Transfer, P S Ghoshdastidar, Tata McGraw-Hill.
On Friday, 28 June 2013 03:40:50 UTC+5:30, Ankit Mahato wrote:
On Friday, 28 June 2013 03:10:54 UTC+5:30, Robert Cimrman wrote:
On 06/27/2013 10:27 PM, Ankit Mahato wrote:
On Friday, 28 June 2013 01:17:19 UTC+5:30, Robert Cimrman wrote:
On 06/27/2013 08:17 PM, Ankit Mahato wrote:
Hi R,
I tried out the Steady Axial convection and diffusion in slug flow
with
velocity :math:
U _0
in an insulated pipe. Entry and Exit temperatures are given. \\ :math:T _0 for x \leqslant 0
\\ :math:T _1 for x \geqslant L
https://github.com/animator/sfepy/blob/master/examples/ankit/slug_flow.py
I had the query on how to set the lateral surface of the cylinder to satisfy the condition \alpha \frac {\partial T}{\partial n} = 0.
Short answer: do nothing. Longer answer: [1]
Oops. I confused \tau D. That was so stupid of me.
I do not understand :)
Sorry Typo I meant \Gamma _D .
Can you please tell what get_pars and get_load_variable is doing.
You probably want to use a different right-hand side term (dw_volume_lvf for volume force, the surface force term is missing, but could be easily added, if needed). Otherwise get_pars() computes the position-dependent material parameter (load.f), and get_load_variable() just demonstrates, how to use parameter variables and how to set their values by a function - you do not need that either.
got it!
BTW. look at the patch that adds the dw_convect_v_grad_s term - it captures everything that usually needs to be done to add a term...
Looking at it R.
So energy eq is working. Should I try and develop few more examples or get into the navier strokes part.
IMHO solving the Navier-Stokes will be the "hard" part of the problem, as a new solver will probably be needed. So the sooner you start with that, the better. The only problem for now is, that the NS terms work in 3D only...
Yes. Kindly give me a head start to begin it.
Other thing: I fetched your code and the history is rather wild (use gitk --all to see it) - I suggest you to checkout the current origin master branch, make your branch (phase_change?) on top of it, and then cherry-pick the commits adding the example files (maybe rename the directory to examples/phase_change). There should be no merges... Is it clear? :)
Yes. it is wild as I was trying to fetch the latest code from main sfepy repo and merge it. then things got a bit messy. I will make a new branch for phase_change.
r.
Cheers, r.
Regards, Ankit
[1]
http://sfepy.org/doc-devel/tutorial.html#notes-on-solving-pdes-by-the-finite...

On 07/03/2013 01:51 AM, Ankit Mahato wrote:
R,
Attached is the Temperature distribution along the length with Peclet number graph which you wanted to have a look at. I used ParaView to generate it. It is validated by the Fig 6.2 of Computer Simulation of Flow and Heat Transfer, P S Ghoshdastidar, Tata McGraw-Hill.
Good! Btw. are there some analytical relations that can be verified, for example on some special simple geometries/boundary conditions? It would be interesting to see the comparison of analytical/numerical curves in a single figure (I have no access to the book).
Similar figures could be also done in sfepy directly, check [1] - it is mostly useful when one tweaks and runs a simulation repeatedly, as the setup needs some effort...
r.

On Wednesday, 3 July 2013 13:14:37 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:51 AM, Ankit Mahato wrote:
R,
Attached is the Temperature distribution along the length with Peclet number graph which you wanted to have a look at. I used ParaView to generate it. It is validated by the Fig 6.2 of Computer Simulation of Flow and Heat Transfer, P S Ghoshdastidar, Tata McGraw-Hill.
Good! Btw. are there some analytical relations that can be verified, for example on some special simple geometries/boundary conditions? It would be interesting to see the comparison of analytical/numerical curves in a single figure (I have no access to the book).
Yes this one can be verified with the analytical solution. I was about to ask you that the analytical vs simulation curve should be plotted for how many test cases?
Similar figures could be also done in sfepy directly, check [1] - it is mostly useful when one tweaks and runs a simulation repeatedly, as the setup needs some effort...
Okie :)
r.

On 07/03/2013 01:38 PM, Ankit Mahato wrote:
On Wednesday, 3 July 2013 13:14:37 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:51 AM, Ankit Mahato wrote:
R,
Attached is the Temperature distribution along the length with Peclet number graph which you wanted to have a look at. I used ParaView to generate it. It is validated by the Fig 6.2 of Computer Simulation of Flow and Heat Transfer, P S Ghoshdastidar, Tata McGraw-Hill.
Good! Btw. are there some analytical relations that can be verified, for example on some special simple geometries/boundary conditions? It would be interesting to see the comparison of analytical/numerical curves in a single figure (I have no access to the book).
Yes this one can be verified with the analytical solution. I was about to ask you that the analytical vs simulation curve should be plotted for how many test cases?
As you wish (if it is ok :)) BTW. http://terri.toybox.ca/python-soc/ still does not show your blog posts - is the subscription correct?
r.
Similar figures could be also done in sfepy directly, check [1] - it is mostly useful when one tweaks and runs a simulation repeatedly, as the setup needs some effort...
Okie :)
r.

On Wednesday, 3 July 2013 17:19:57 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:38 PM, Ankit Mahato wrote:
On Wednesday, 3 July 2013 13:14:37 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:51 AM, Ankit Mahato wrote:
R,
Attached is the Temperature distribution along the length with Peclet number graph which you wanted to have a look at. I used ParaView to generate it. It is validated by the Fig 6.2 of Computer Simulation of Flow and Heat Transfer, P S Ghoshdastidar, Tata McGraw-Hill.
Good! Btw. are there some analytical relations that can be verified,
for
example on some special simple geometries/boundary conditions? It would be interesting to see the comparison of analytical/numerical curves in a single figure (I have no access to the book).
Yes this one can be verified with the analytical solution. I was about to ask you that the analytical vs simulation curve should be plotted for how many test cases?
As you wish (if it is ok :)) BTW. http://terri.toybox.ca/python-soc/still does not show your blog posts - is the subscription correct?
Yes R I saw it yesterday and I thought maybe it is not updated. The subscription link points to http://ankitmahato.blogspot.in/search/label/Python which is correct. I think I should write to Terri
r.
Similar figures could be also done in sfepy directly, check [1] - it is mostly useful when one tweaks and runs a simulation repeatedly, as the setup needs some effort...
Okie :)
r.

Hi R,
I tried out modifying the thermo electric example, but I was getting
convdiff: left over: ['verbose', '__builtins__', 'n_step', '__file__', '__doc__', '__name__', 't1', 'sys', 'data_dir', 't0', '__package__', '_filename', 'main', 'os', 'cwd'] convdiff: reading mesh (/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)... convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.15 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 139, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 125, in main state_el = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1474, in evaluate vals.append(self.sign * val) RuntimeError: ccore error (see above)
Then I modified it to solve without any timestep and still it is throwing errors:
convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh (/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)... convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 126, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 112, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 929, in solve state0.apply_ebc(force_values=force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/state.py", line 107, in apply_ebc self.variables.apply_ebc(self.vec, force_values=force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py", line 308, in apply_ebc var.apply_ebc(vec, self.di.indx[var.name].start, force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py", line 1780, in apply_ebc eq_map = self.eq_map AttributeError: 'FieldVariable' object has no attribute 'eq_map'
I am attaching the code. I have spent lot of hours trying to find my error, but to no avail. Kindly help.
Regards.
On Wednesday, 3 July 2013 17:25:42 UTC+5:30, Ankit Mahato wrote:
On Wednesday, 3 July 2013 17:19:57 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:38 PM, Ankit Mahato wrote:
On Wednesday, 3 July 2013 13:14:37 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:51 AM, Ankit Mahato wrote:
R,
Attached is the Temperature distribution along the length with Peclet number graph which you wanted to have a look at. I used ParaView to generate it. It is validated by the Fig 6.2 of Computer Simulation of Flow and
Heat
Transfer, P S Ghoshdastidar, Tata McGraw-Hill.
Good! Btw. are there some analytical relations that can be verified, for example on some special simple geometries/boundary conditions? It would be interesting to see the comparison of analytical/numerical curves in a single figure (I have no access to the book).
Yes this one can be verified with the analytical solution. I was about to ask you that the analytical vs simulation curve should be plotted for how many test cases?
As you wish (if it is ok :)) BTW. http://terri.toybox.ca/python-soc/still does not show your blog posts - is the subscription correct?
Yes R I saw it yesterday and I thought maybe it is not updated. The subscription link points to http://ankitmahato.blogspot.in/search/label/Python which is correct. I think I should write to Terri
r.
Similar figures could be also done in sfepy directly, check [1] - it
is
mostly useful when one tweaks and runs a simulation repeatedly, as the setup needs some effort...
Okie :)
r.

Hi Ankit,
you have to call problem.time_update() (= apply EBCs, update/compute material parameters) always after setting equations/before calling problem.solve().
The attached version works, make a diff to see what other (minor) changes needed to be done. Notably, results of both sub-problems are saved into a single file.
Cheers, r.
On 07/25/2013 11:21 PM, Ankit Mahato wrote:
Hi R,
I tried out modifying the thermo electric example, but I was getting
convdiff: left over: ['verbose', '__builtins__', 'n_step', '__file__', '__doc__', '__name__', 't1', 'sys', 'data_dir', 't0', '__package__', '_filename', 'main', 'os', 'cwd'] convdiff: reading mesh (/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)... convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.15 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 139, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 125, in main state_el = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1474, in evaluate vals.append(self.sign * val) RuntimeError: ccore error (see above)
Then I modified it to solve without any timestep and still it is throwing errors:
convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh (/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)... convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 126, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 112, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 929, in solve state0.apply_ebc(force_values=force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/state.py", line 107, in apply_ebc self.variables.apply_ebc(self.vec, force_values=force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py", line 308, in apply_ebc var.apply_ebc(vec, self.di.indx[var.name].start, force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py", line 1780, in apply_ebc eq_map = self.eq_map AttributeError: 'FieldVariable' object has no attribute 'eq_map'
I am attaching the code. I have spent lot of hours trying to find my error, but to no avail. Kindly help.
Regards.
On Wednesday, 3 July 2013 17:25:42 UTC+5:30, Ankit Mahato wrote:
On Wednesday, 3 July 2013 17:19:57 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:38 PM, Ankit Mahato wrote:
On Wednesday, 3 July 2013 13:14:37 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:51 AM, Ankit Mahato wrote:
R,
Attached is the Temperature distribution along the length with Peclet number graph which you wanted to have a look at. I used ParaView to generate it. It is validated by the Fig 6.2 of Computer Simulation of Flow and
Heat
Transfer, P S Ghoshdastidar, Tata McGraw-Hill.
Good! Btw. are there some analytical relations that can be verified, for example on some special simple geometries/boundary conditions? It would be interesting to see the comparison of analytical/numerical curves in a single figure (I have no access to the book).
Yes this one can be verified with the analytical solution. I was about to ask you that the analytical vs simulation curve should be plotted for how many test cases?
As you wish (if it is ok :)) BTW. http://terri.toybox.ca/python-soc/still does not show your blog posts - is the subscription correct?
Yes R I saw it yesterday and I thought maybe it is not updated. The subscription link points to http://ankitmahato.blogspot.in/search/label/Python which is correct. I think I should write to Terri
r.
Similar figures could be also done in sfepy directly, check [1] - it
is
mostly useful when one tweaks and runs a simulation repeatedly, as the setup needs some effort...
Okie :)
r.

Hi R,
I looked the changes you made. But, the modified code you sent is still not working and throwing errors: convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh (/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)... convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.01 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.14 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.00 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive_R.py", line 131, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive_R.py", line 113, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1474, in evaluate vals.append(self.sign * val) RuntimeError: ccore error (see above)
On Friday, 26 July 2013 14:17:51 UTC+5:30, Robert Cimrman wrote:
Hi Ankit,
you have to call problem.time_update() (= apply EBCs, update/compute material parameters) always after setting equations/before calling problem.solve().
The attached version works, make a diff to see what other (minor) changes needed to be done. Notably, results of both sub-problems are saved into a single file.
Cheers, r.
On 07/25/2013 11:21 PM, Ankit Mahato wrote:
Hi R,
I tried out modifying the thermo electric example, but I was getting
convdiff: left over: ['verbose', '__builtins__', 'n_step', '__file__', '__doc__', '__name__', 't1', 'sys', 'data_dir', 't0', '__package__', '_filename', 'main', 'os', 'cwd'] convdiff: reading mesh
(/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)...
convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.15 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 139, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 125, in main state_el = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1474, in evaluate vals.append(self.sign * val) RuntimeError: ccore error (see above)
Then I modified it to solve without any timestep and still it is throwing errors:
convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh
(/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)...
convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 126, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 112, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 929, in solve state0.apply_ebc(force_values=force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/state.py", line 107, in apply_ebc self.variables.apply_ebc(self.vec, force_values=force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py", line 308, in apply_ebc var.apply_ebc(vec, self.di.indx[var.name].start, force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py", line 1780, in apply_ebc eq_map = self.eq_map AttributeError: 'FieldVariable' object has no attribute 'eq_map'
I am attaching the code. I have spent lot of hours trying to find my error, but to no avail. Kindly help.
Regards.
On Wednesday, 3 July 2013 17:25:42 UTC+5:30, Ankit Mahato wrote:
On Wednesday, 3 July 2013 17:19:57 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:38 PM, Ankit Mahato wrote:
On Wednesday, 3 July 2013 13:14:37 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:51 AM, Ankit Mahato wrote: > R, > > Attached is the Temperature distribution along the length with
Peclet
> number graph which you wanted to have a look at. > I used ParaView to generate it. > It is validated by the Fig 6.2 of Computer Simulation of Flow and Heat > Transfer, P S Ghoshdastidar, Tata McGraw-Hill.
Good! Btw. are there some analytical relations that can be verified, for example on some special simple geometries/boundary conditions? It would be interesting to see the comparison of analytical/numerical curves in a single figure (I have no access to the book).
Yes this one can be verified with the analytical solution. I was about to ask you that the analytical vs simulation curve should be plotted for how many test cases?
As you wish (if it is ok :)) BTW. http://terri.toybox.ca/python-soc/still does not show your blog posts - is the subscription correct?
Yes R I saw it yesterday and I thought maybe it is not updated. The subscription link points to http://ankitmahato.blogspot.in/search/label/Python which is correct. I think I should write to Terri
r.
Similar figures could be also done in sfepy directly, check [1] - it
is
mostly useful when one tweaks and runs a simulation repeatedly, as the
setup
needs some effort...
Okie :)
r.

Do you have the latest code with Navier-Stokes terms updated for 2D?
r.
On 07/26/2013 01:23 PM, Ankit Mahato wrote:
Hi R,
I looked the changes you made. But, the modified code you sent is still not working and throwing errors: convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh (/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)... convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.01 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.14 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.00 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive_R.py", line 131, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive_R.py", line 113, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1474, in evaluate vals.append(self.sign * val) RuntimeError: ccore error (see above)
On Friday, 26 July 2013 14:17:51 UTC+5:30, Robert Cimrman wrote:
Hi Ankit,
you have to call problem.time_update() (= apply EBCs, update/compute material parameters) always after setting equations/before calling problem.solve().
The attached version works, make a diff to see what other (minor) changes needed to be done. Notably, results of both sub-problems are saved into a single file.
Cheers, r.
On 07/25/2013 11:21 PM, Ankit Mahato wrote:
Hi R,
I tried out modifying the thermo electric example, but I was getting
convdiff: left over: ['verbose', '__builtins__', 'n_step', '__file__', '__doc__', '__name__', 't1', 'sys', 'data_dir', 't0', '__package__', '_filename', 'main', 'os', 'cwd'] convdiff: reading mesh
(/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)...
convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.15 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 139, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 125, in main state_el = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1474, in evaluate vals.append(self.sign * val) RuntimeError: ccore error (see above)
Then I modified it to solve without any timestep and still it is throwing errors:
convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh
(/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)...
convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 126, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 112, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 929, in solve state0.apply_ebc(force_values=force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/state.py", line 107, in apply_ebc self.variables.apply_ebc(self.vec, force_values=force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py", line 308, in apply_ebc var.apply_ebc(vec, self.di.indx[var.name].start, force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py", line 1780, in apply_ebc eq_map = self.eq_map AttributeError: 'FieldVariable' object has no attribute 'eq_map'
I am attaching the code. I have spent lot of hours trying to find my error, but to no avail. Kindly help.
Regards.
On Wednesday, 3 July 2013 17:25:42 UTC+5:30, Ankit Mahato wrote:
On Wednesday, 3 July 2013 17:19:57 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:38 PM, Ankit Mahato wrote:
On Wednesday, 3 July 2013 13:14:37 UTC+5:30, Robert Cimrman wrote: > > On 07/03/2013 01:51 AM, Ankit Mahato wrote: >> R, >> >> Attached is the Temperature distribution along the length with
Peclet
>> number graph which you wanted to have a look at. >> I used ParaView to generate it. >> It is validated by the Fig 6.2 of Computer Simulation of Flow and Heat >> Transfer, P S Ghoshdastidar, Tata McGraw-Hill. > > Good! Btw. are there some analytical relations that can be verified, for > example on some special simple geometries/boundary conditions? It would be > interesting to see the comparison of analytical/numerical curves in a > single > figure (I have no access to the book). >
Yes this one can be verified with the analytical solution. I was about to ask you that the analytical vs simulation curve should be plotted for how many test cases?
As you wish (if it is ok :)) BTW. http://terri.toybox.ca/python-soc/still does not show your blog posts - is the subscription correct?
Yes R I saw it yesterday and I thought maybe it is not updated. The subscription link points to http://ankitmahato.blogspot.in/search/label/Python which is correct. I think I should write to Terri
r.
> > Similar figures could be also done in sfepy directly, check [1] - it is > mostly > useful when one tweaks and runs a simulation repeatedly, as the
setup
> needs > some effort... >
Okie :)
> > r. > > [1] http://sfepy.org/doc-devel/primer.html#probing >

On Friday, 26 July 2013 16:54:45 UTC+5:30, Robert Cimrman wrote:
Do you have the latest code with Navier-Stokes terms updated for 2D?
Yes. Also the navier_stokes2D.py is working perfectly fine.
r.
On 07/26/2013 01:23 PM, Ankit Mahato wrote:
Hi R,
I looked the changes you made. But, the modified code you sent is still not working and throwing errors: convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh
(/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)...
convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.01 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.14 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.00 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive_R.py", line 131, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive_R.py", line 113, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1474, in evaluate vals.append(self.sign * val) RuntimeError: ccore error (see above)
On Friday, 26 July 2013 14:17:51 UTC+5:30, Robert Cimrman wrote:
Hi Ankit,
you have to call problem.time_update() (= apply EBCs, update/compute material parameters) always after setting equations/before calling
problem.solve().
The attached version works, make a diff to see what other (minor)
changes
needed to be done. Notably, results of both sub-problems are saved into a single file.
Cheers, r.
On 07/25/2013 11:21 PM, Ankit Mahato wrote:
Hi R,
I tried out modifying the thermo electric example, but I was getting
convdiff: left over: ['verbose', '__builtins__', 'n_step', '__file__', '__doc__', '__name__', 't1', 'sys', 'data_dir', 't0', '__package__', '_filename', 'main', 'os', 'cwd'] convdiff: reading mesh
(/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)...
convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.15 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 139, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 125, in main state_el = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File
"/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py",
345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py",
66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py",
1474, in evaluate vals.append(self.sign * val) RuntimeError: ccore error (see above)
Then I modified it to solve without any timestep and still it is
line line line throwing
errors:
convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh
(/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)...
convdiff: ...done in 0.02 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.03 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating materials... convdiff: m convdiff: ...done in 0.01 s Traceback (most recent call last): File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 126, in <module> main() File "examples/phase_change/convective_diffusive/convective_diffusive.py", line 112, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 929, in solve state0.apply_ebc(force_values=force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/state.py", line 107, in apply_ebc self.variables.apply_ebc(self.vec, force_values=force_values) File
"/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py",
line 308, in apply_ebc var.apply_ebc(vec, self.di.indx[var.name].start, force_values) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/variables.py", line 1780, in apply_ebc eq_map = self.eq_map AttributeError: 'FieldVariable' object has no attribute 'eq_map'
I am attaching the code. I have spent lot of hours trying to find my error, but to no avail. Kindly help.
Regards.
On Wednesday, 3 July 2013 17:25:42 UTC+5:30, Ankit Mahato wrote:
On Wednesday, 3 July 2013 17:19:57 UTC+5:30, Robert Cimrman wrote:
On 07/03/2013 01:38 PM, Ankit Mahato wrote: > > > On Wednesday, 3 July 2013 13:14:37 UTC+5:30, Robert Cimrman wrote: >> >> On 07/03/2013 01:51 AM, Ankit Mahato wrote: >>> R, >>> >>> Attached is the Temperature distribution along the length with
Peclet
>>> number graph which you wanted to have a look at. >>> I used ParaView to generate it. >>> It is validated by the Fig 6.2 of Computer Simulation of Flow and Heat >>> Transfer, P S Ghoshdastidar, Tata McGraw-Hill. >> >> Good! Btw. are there some analytical relations that can be verified, for >> example on some special simple geometries/boundary conditions? It would be >> interesting to see the comparison of analytical/numerical curves in a >> single >> figure (I have no access to the book). >> > > Yes this one can be verified with the analytical solution. > I was about to ask you that the analytical vs simulation curve should be > plotted for how many test cases?
As you wish (if it is ok :)) BTW. http://terri.toybox.ca/python-soc/still does not show your blog posts - is the subscription correct?
Yes R I saw it yesterday and I thought maybe it is not updated. The subscription link points to http://ankitmahato.blogspot.in/search/label/Python which is correct. I think I should write to Terri
r.
>> >> Similar figures could be also done in sfepy directly, check [1] -
it
is >> mostly >> useful when one tweaks and runs a simulation repeatedly, as the setup >> needs >> some effort... >> > > Okie :) > > >> >> r. >> >> [1] http://sfepy.org/doc-devel/primer.html#probing >> >

On 07/26/2013 01:40 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 16:54:45 UTC+5:30, Robert Cimrman wrote:
Do you have the latest code with Navier-Stokes terms updated for 2D?
Yes. Also the navier_stokes2D.py is working perfectly fine.
Strange. It works for me. Try "make clean; make"...
r.

On Friday, 26 July 2013 17:17:09 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:40 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 16:54:45 UTC+5:30, Robert Cimrman wrote:
Do you have the latest code with Navier-Stokes terms updated for 2D?
Yes. Also the navier_stokes2D.py is working perfectly fine.
Strange. It works for me. Try "make clean; make"...
yes R. Did it. still throwing the same Runtime error. Other standalone codes are working fine. Is it working on your 32-bit box.
r.

On 07/26/2013 01:55 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 17:17:09 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:40 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 16:54:45 UTC+5:30, Robert Cimrman wrote:
Do you have the latest code with Navier-Stokes terms updated for 2D?
Yes. Also the navier_stokes2D.py is working perfectly fine.
Strange. It works for me. Try "make clean; make"...
yes R. Did it. still throwing the same Runtime error. Other standalone codes are working fine. Is it working on your 32-bit box.
Yes, it works also on the 32 bit box.
r.

On Friday, 26 July 2013 17:39:52 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:55 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 17:17:09 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:40 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 16:54:45 UTC+5:30, Robert Cimrman wrote:
Do you have the latest code with Navier-Stokes terms updated for 2D?
Yes. Also the navier_stokes2D.py is working perfectly fine.
Strange. It works for me. Try "make clean; make"...
yes R. Did it. still throwing the same Runtime error. Other standalone codes are working fine. Is it working on your 32-bit box.
Yes, it works also on the 32 bit box.
I will try it on another system and check it.
r.

On my other system convect_build_vtg() is again causing the error. But this time the Traceback is a bit different with mem_free_mem(): error exit!
convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh (/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)... convdiff: ...done in 0.03 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.05 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.24 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.02 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! Traceback (most recent call last): File "examples/standalone/convdiff/convective_diffusive.py", line 131, in <module> main() File "examples/standalone/convdiff/convective_diffusive.py", line 113, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1473, in evaluate diff_var, **kwargs) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1311, in eval_real status = self.call_function(out, fargs) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1296, in call_function raise ValueError('term evaluation failed! (%s)' % self.name) ValueError: term evaluation failed! (dw_convect)
On Friday, 26 July 2013 17:42:57 UTC+5:30, Ankit Mahato wrote:
On Friday, 26 July 2013 17:39:52 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:55 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 17:17:09 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:40 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 16:54:45 UTC+5:30, Robert Cimrman wrote:
Do you have the latest code with Navier-Stokes terms updated for 2D?
Yes. Also the navier_stokes2D.py is working perfectly fine.
Strange. It works for me. Try "make clean; make"...
yes R. Did it. still throwing the same Runtime error. Other standalone codes are working fine. Is it working on your 32-bit box.
Yes, it works also on the 32 bit box.
I will try it on another system and check it.
r.

Hi Ankit,
the failing function is in sfepy/terms/extmods/termsNavierStokes.c - try debugging it (printf...). I cannot reproduce it, sorry :]
r.
On 07/26/2013 03:13 PM, Ankit Mahato wrote:
On my other system convect_build_vtg() is again causing the error. But this time the Traceback is a bit different with mem_free_mem(): error exit!
convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh (/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)... convdiff: ...done in 0.03 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.05 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.24 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.02 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! Traceback (most recent call last): File "examples/standalone/convdiff/convective_diffusive.py", line 131, in <module> main() File "examples/standalone/convdiff/convective_diffusive.py", line 113, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1473, in evaluate diff_var, **kwargs) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1311, in eval_real status = self.call_function(out, fargs) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1296, in call_function raise ValueError('term evaluation failed! (%s)' % self.name) ValueError: term evaluation failed! (dw_convect)
On Friday, 26 July 2013 17:42:57 UTC+5:30, Ankit Mahato wrote:
On Friday, 26 July 2013 17:39:52 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:55 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 17:17:09 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:40 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 16:54:45 UTC+5:30, Robert Cimrman wrote: > > Do you have the latest code with Navier-Stokes terms updated for 2D? > > Yes. Also the navier_stokes2D.py is working perfectly fine.
Strange. It works for me. Try "make clean; make"...
yes R. Did it. still throwing the same Runtime error. Other standalone codes are working fine. Is it working on your 32-bit box.
Yes, it works also on the 32 bit box.
I will try it on another system and check it.
r.

Hi R,
I tried debugging sfepy/terms/extmods/termsNavierStokes.c but could not locate the error. Can you tell me when does sfepy raises a ccore error (I saw it in some .pyx and .c files)
Can you kindly send me the .vtk file generated by the script so that meanwhile I can run an analysis and add it to my mid term report.
Regards, Ankit
On Friday, 26 July 2013 20:29:27 UTC+5:30, Robert Cimrman wrote:
Hi Ankit,
the failing function is in sfepy/terms/extmods/termsNavierStokes.c - try debugging it (printf...). I cannot reproduce it, sorry :]
r.
On 07/26/2013 03:13 PM, Ankit Mahato wrote:
On my other system convect_build_vtg() is again causing the error. But this time the Traceback is a bit different with mem_free_mem(): error exit!
convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh
(/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)...
convdiff: ...done in 0.03 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.05 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.24 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.02 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! Traceback (most recent call last): File "examples/standalone/convdiff/convective_diffusive.py", line 131, in <module> main() File "examples/standalone/convdiff/convective_diffusive.py", line 113, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1473, in evaluate diff_var, **kwargs) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1311, in eval_real status = self.call_function(out, fargs) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1296, in call_function raise ValueError('term evaluation failed! (%s)' % self.name) ValueError: term evaluation failed! (dw_convect)
On Friday, 26 July 2013 17:42:57 UTC+5:30, Ankit Mahato wrote:
On Friday, 26 July 2013 17:39:52 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:55 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 17:17:09 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:40 PM, Ankit Mahato wrote: > > > On Friday, 26 July 2013 16:54:45 UTC+5:30, Robert Cimrman wrote: >> >> Do you have the latest code with Navier-Stokes terms updated for
2D?
>> >> > Yes. > Also the navier_stokes2D.py is working perfectly fine. > >
Strange. It works for me. Try "make clean; make"...
yes R. Did it. still throwing the same Runtime error. Other standalone codes are working fine. Is it working on your 32-bit box.
Yes, it works also on the 32 bit box.
I will try it on another system and check it.
r.

On 07/30/2013 02:46 AM, Ankit Mahato wrote:
Hi R,
I tried debugging sfepy/terms/extmods/termsNavierStokes.c but could not locate the error. Can you tell me when does sfepy raises a ccore error (I saw it in some .pyx and .c files)
git grep convect_build_vtg
-> the error occurs in sfepy/terms/extmods/termsNavierStokes.c
Try adding mem_checkIntegrity(); macro to the convect_build_vtg() function, or into the term_ns_asm_convect() function that computes the convective term.
Can you kindly send me the .vtk file generated by the script so that meanwhile I can run an analysis and add it to my mid term report.
Yes, I will send it off-list.
r.
Regards, Ankit
On Friday, 26 July 2013 20:29:27 UTC+5:30, Robert Cimrman wrote:
Hi Ankit,
the failing function is in sfepy/terms/extmods/termsNavierStokes.c - try debugging it (printf...). I cannot reproduce it, sorry :]
r.
On 07/26/2013 03:13 PM, Ankit Mahato wrote:
On my other system convect_build_vtg() is again causing the error. But this time the Traceback is a bit different with mem_free_mem(): error exit!
convdiff: left over: ['os', '__builtins__', '__doc__', '__name__', '__package__', 'verbose', 'sys', 'data_dir', 'cwd', '_filename', 'main', '__file__'] convdiff: reading mesh
(/usr/local/lib/python2.7/dist-packages/sfepy/meshes/2d/rectangle_fine_quad.mesh)...
convdiff: ...done in 0.03 s convdiff: creating regions... convdiff: Wall convdiff: Top convdiff: Surface convdiff: Driven convdiff: Entry convdiff: Omega convdiff: ...done in 0.05 s convdiff: using solvers: ts: no ts nls: newton ls: ls convdiff: equation "balance": convdiff: + dw_div_grad.5.Omega(m.viscosity, v, u) + dw_convect.5.Omega(v, u) - dw_stokes.5.Omega(v, p) = 0 convdiff: equation "incompressibility": convdiff: dw_stokes.5.Omega(u, q) = 0 convdiff: setting up dof connectivities... convdiff: ...done in 0.00 s convdiff: updating variables... convdiff: ...done convdiff: matrix shape: (44949, 44949) convdiff: assembling matrix graph... convdiff: ...done in 0.24 s convdiff: matrix structural nonzeros: 1747752 (8.65e-04% fill) convdiff: updating materials... convdiff: m convdiff: ...done in 0.02 s convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00) convect_build_vtg(): ERR_Switch mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! mem_free_mem(): error exit! Traceback (most recent call last): File "examples/standalone/convdiff/convective_diffusive.py", line 131, in <module> main() File "examples/standalone/convdiff/convective_diffusive.py", line 113, in main flow = problem.solve() File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/problemDef.py", line 933, in solve vec = solvers.nls(vec0) File "/usr/local/lib/python2.7/dist-packages/sfepy/solvers/nls.py", line 345, in __call__ mtx_a = fun_grad(vec_x) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/evaluate.py", line 66, in eval_tangent_matrix mtx = pb.equations.eval_tangent_matrices(vec, mtx) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 640, in eval_tangent_matrices self.evaluate(mode='weak', dw_mode='matrix', asm_obj=tangent_matrix) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 526, in evaluate asm_obj=asm_obj) File "/usr/local/lib/python2.7/dist-packages/sfepy/fem/equations.py", line 766, in evaluate ret_status=True) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1473, in evaluate diff_var, **kwargs) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1311, in eval_real status = self.call_function(out, fargs) File "/usr/local/lib/python2.7/dist-packages/sfepy/terms/terms.py", line 1296, in call_function raise ValueError('term evaluation failed! (%s)' % self.name) ValueError: term evaluation failed! (dw_convect)
On Friday, 26 July 2013 17:42:57 UTC+5:30, Ankit Mahato wrote:
On Friday, 26 July 2013 17:39:52 UTC+5:30, Robert Cimrman wrote:
On 07/26/2013 01:55 PM, Ankit Mahato wrote:
On Friday, 26 July 2013 17:17:09 UTC+5:30, Robert Cimrman wrote: > > On 07/26/2013 01:40 PM, Ankit Mahato wrote: >> >> >> On Friday, 26 July 2013 16:54:45 UTC+5:30, Robert Cimrman wrote: >>> >>> Do you have the latest code with Navier-Stokes terms updated for
2D?
>>> >>> >> Yes. >> Also the navier_stokes2D.py is working perfectly fine. >> >> > > Strange. It works for me. Try "make clean; make"... > > yes R. Did it. still throwing the same Runtime error. Other standalone codes are working fine. Is it working on your 32-bit box.
Yes, it works also on the 32 bit box.
I will try it on another system and check it.
r.
participants (2)
-
Ankit Mahato
-
Robert Cimrman