CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

2D looping over cells or faces

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 17, 2012, 15:28
Question 2D looping over cells or faces
  #1
Member
 
John M.
Join Date: Jul 2011
Posts: 51
Rep Power: 5
villager is on a distinguished road
Hello!
1) I can't loop over cells or faces in 2D Fluent Case. Is it possible?

In this example, program works until line "begin_f_loop", where error happens: segmentation fault.

If it is important, I use parallel udf (lnamd64 arch).

Code:
#include "udf.h"

DEFINE_EXECUTE_AT_END (d0)
{
Domain *domain;
domain = Get_Domain(1);
Message("domain");
face_t f;
Thread * f_thread;
thread_loop_f(f_thread, domain) /*loops over all face threads in domain*/
    {
    Message("f_thread %d\n",*f_thread);

    begin_f_loop(f, f_thread)
        {
        Message("loop\n");
        }
    end_f_loop(f, f_thread)
    }

}
2) I need to change net molar reaction rates in fluid zone, DEFINE_NET_REACTION_RATE doesn't provide possibility to get net rates just to change them m-times (I need smth like that: rr[i]=rr[i]*m). Is there any way to access net rates, calculated by FLUENT and to modify them?
villager is offline   Reply With Quote

Reply

Tags
2d case, begin_f_loop, define_net_reaction_rate, parallel, udf

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI speed performance danny123 OpenFOAM 19 October 24, 2012 07:44
polyDualMesh results in non-planar faces and non-convex cells tomislav_maric OpenFOAM Running, Solving & CFD 4 September 13, 2012 10:32
Converting a mesh with splitted cells using fluentMeshToFoam jlpelerin OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 4 April 25, 2011 16:56
snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11
Mesh to points cells faces and boundaries files billy OpenFOAM Pre-Processing 19 April 18, 2006 15:38


All times are GMT -4. The time now is 22:31.