|
[Sponsors] |
UDF to return assigned gauge pressure to a BC + mass flow rate |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 25, 2017, 19:27 |
UDF to return assigned gauge pressure to a BC + mass flow rate
|
#1 |
Member
Tarantino
Join Date: Feb 2013
Posts: 46
Rep Power: 13 |
Hello!
I want to return an assigned pressure to a pressure outlet BC and do some math based on in a UDF. I want also to return mass flow rate. Here is a part of udf that need to do so: Code:
#include"udf.h" real flow_tot, p; DEFINE_ON_DEMAND(Pressure_flow) { Domain *d; real flow; cell_t c; Thread *t; face_t f; d = Get_Domain(1); t= Lookup_Thread(d, 29); begin_f_loop(f,t) { flow+=F_FLUX(f,t); } end_f_loop(f,t) p = C_P(c,t); printf("gauge pressure = %g\n", p); printf("Mass Flow Rate: %g\n",flow); flow_tot =flow; flow=0.; } However, when I compile and Execute-on-demand, then I got the following error: Code:
============================================================================== Node 0: Process 13808: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 1: Process 17288: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 3: Process 17844: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 999999: Process 16332: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 5: Process 12176: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 6: Process 17444: Received signal SIGSEGV. ============================================================================== MPI Application rank 0 exited before MPI_Finalize() with status 2 The fl process could not be started. Anyone know the problem? Thanks. |
|
September 28, 2017, 20:06 |
eq?; use monitor
|
#2 |
Senior Member
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 416
Rep Power: 15 |
What pressure boundary condition do you want to set, if you write it in English and maths formulas?
For the mass flow rate you can add a monitor point, you do not have to add it to the UDF |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Exit Corrected Mass Flow Rate Mesh Sensitivity Study | s__s__s | CFX | 4 | July 20, 2016 12:46 |
UDF to access interior surface to calculate mass flow rate | shahjehan | Fluent UDF and Scheme Programming | 0 | August 11, 2015 15:44 |
DPM total mass flow rate | yow | FLUENT | 0 | July 17, 2015 13:01 |
Periodic channel flow with time dependent mass flow rate | QBeast | FLUENT | 3 | May 10, 2013 14:14 |
Discrete Phase & Mass Flow Rate | MagnusZeus | FLUENT | 0 | December 2, 2011 18:57 |