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/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 :
>>>> 1) Flow in a tube
>>>> 2) 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.
>>
>