Hi R,
In the weak form: previous file. corrected now.) The H field is (=cT).
- The navier stokes equation will now have a source term.
- The energy equation will also have a source term (slight mistake in my
i need to calculate u,p,H (=cT), gl (liquid fraction) for each element. Iterating the energy equation to obtain convergence in the nodal liquid fraction value (source term) is one the key areas where I was having crisis situation. The momentum and energy equations are coupled through both the buoyancy and the source term (Bu). The B depends on the liquid fraction which represents an extra unknown in the governing equations. Since the liquid fraction is updated such that the corection term becomes zero at the convergence of the enthalpy equation.
I tried searching the internet but could not find any FEM implementation is this field so I started developing a python solver from scratch in order to test the algorithm suggested in those papers using finite volume method, as at least I will have a solver ready to couple it with sfepy.
regards, Ankit On Friday, 6 September 2013 13:21:01 UTC+5:30, Robert Cimrman wrote:
Hi Ankit,
it looks very interesting. Do you have also a weak formulation of the complete problem? I would like to see the form
Find u, p, ... such that ... holds for all v, q...
to see if all the terms are available. Or do you have already an initial implementation? I will be offline from 7. to 11.9. but Vladimir should be able to answer your questions. I am available today.
r.
On 09/02/2013 10:53 PM, Ankit Mahato wrote:
Hi R,
Here is the final problem statement file containing all details.
regards, Ankit
On Thursday, 15 August 2013 14:32:05 UTC+5:30, Robert Cimrman wrote:
On 08/14/2013 09:08 PM, Ankit Mahato wrote:
yes R the sizes are same.
Something very strange happened, when I used ipython to run it in
debug
mode ... It completed the simulation and gave me the output.
black magic at work!
again when I ran via python command it threw the error.
How is it possible? :O
no idea... could you run it in gdb, as:
gdb --args python convective_diffusive.py then "run" at the gdb prompt.
Then try printing the sizes in C.
r.
On Wednesday, 14 August 2013 21:14:40 UTC+5:30, Robert Cimrman wrote:
Any luck?
BTW. does the code work for a 3D mesh? But firstly try the following:
The convect_build_vtg(): ERR_Switch message means that the dim
(should be space dimension) is not 2 or 3, which should not happen.
set a debugger breakpoint in ConvectTerm.get_fargs() just above the return statement. Use "from sfepy.base.base import debug; debug()" for an ipython-based pdb shell.
print shapes as follows: 124 from sfepy.base.base import debug; debug() --> 125 return grad, val_qp, vg, fmode 126
ipdb> grad.shape (5000, 9, 2, 2) ipdb> val_qp.shape (5000, 9, 2, 1) ipdb> fmode False ipdb> print vg CMapping: mode: volume, n_el 5000, n_qp 9, dim: 2, n_ep: 9 ipdb> print vg.bf vg.bf vg.bfg ipdb> print vg.bfg.shape (5000, 9, 2, 9) ipdb> c convdiff: nls: iter: 0, residual: 2.002082e-02 (rel: 1.000000e+00)
...sfepy-git/sfepy/terms/termsNavierStokes.py(125)get_fargs() 124 from sfepy.base.base import debug; debug() --> 125 return grad, val_qp, vg, fmode 126
ipdb> grad.shape (5000, 9, 2, 2) ipdb> val_qp.shape (5000, 9, 2, 1) ipdb> fmode True ipdb> print vg CMapping: mode: volume, n_el 5000, n_qp 9, dim: 2, n_ep: 9 ipdb> print vg.bfg.shape (5000, 9, 2, 9) ipdb> c convdiff: rezidual: 0.14 [s] convdiff: solve: 3.57 [s] convdiff: matrix: 0.60 [s] convdiff: linear system not solved! (err = 3.600155e-03 < 1.000000e-10)
...sfepy-git/sfepy/terms/termsNavierStokes.py(125)get_fargs() 124 from sfepy.base.base import debug; debug() --> 125 return grad, val_qp, vg, fmode 126
Are your sizes same as the above?
r.
On 08/11/2013 07:51 PM, Robert Cimrman wrote:
Hi Ankit,
On Sat, 10 Aug 2013, Ankit Mahato wrote:
> Hi R, > > I tried mem_checkIntegrity inside the functions but it is not
variable printing
> any debugging result. >
mem_checkIntegrity(421,"convect_build_vtg","termsNavierStokes.c","~/sfepy/sfepy/
> terms/extmods"); >
mem_checkIntegrity(546,"term_ns_asm_convect","termsNavierStokes.c","~/sfepy/sfep
> y/terms/extmods"); > > Am I adding it correctly?
Use the macro without arguments (see sfepy/fem/extmods/common.h for definition):
check_memory_integrity();
and do not forget to rebuild the sources.
After adding it to convect_build_vtg()
... default: errput( ErrHead "ERR_Switch\n" ); return( RET_Fail ); } check_memory_integrity(); return( RET_OK ); } ...
and typing "make", I get tons of
checking memory integrity in sfepy/terms/extmods, sfepy/terms/extmods/termsNavierStokes.c, convect_build_vtg(), 476: allocated memory: 8 records, usage: 52032, max: 52032 memory OK.
- trying with the examples/navier_stokes/navier_stokes2d.py
Also try changing the debug flags in site_cfg.py:
debug_flags = '-DDEBUG_FMF'
or even
debug_flags = '-DDEBUG_FMF -DDEBUG_MESH'
r.