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