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

2D looping over cells or faces

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2012, 16:28
Question 2D looping over cells or faces
  #1
Member
 
vlg
Join Date: Jul 2011
Location: My home :)
Posts: 81
Rep Power: 18
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


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 05:13
polyDualMesh results in non-planar faces and non-convex cells tomislav_maric OpenFOAM Running, Solving & CFD 4 September 13, 2012 11:32
[Commercial meshers] Converting a mesh with splitted cells using fluentMeshToFoam jlpelerin OpenFOAM Meshing & Mesh Conversion 4 April 25, 2011 17:56
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11
Mesh to points cells faces and boundaries files billy OpenFOAM Pre-Processing 19 April 18, 2006 16:38


All times are GMT -4. The time now is 16:30.