|
[Sponsors] |
Segmentation fault error while calculating liquid volume |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 30, 2020, 01:37 |
Segmentation fault error while calculating liquid volume
|
#1 |
New Member
Ajinkya S
Join Date: Feb 2020
Posts: 4
Rep Power: 6 |
I want to calculate the liquid phase volume of a droplet in a 2D axisymmetric domain. I have written following UDF for it. But I get segmentation fault error after the "I am here" message at the end of a time step.
Code:
DEFINE_EXECUTE_AT_END(execute_at_end) { Domain *domain; Thread *t; Thread **pt; real volume = 0.; cell_t c; domain = Get_Domain(1); mp_thread_loop_c(t, domain, pt) Message("I am here"); if (FLUID_THREAD_P(t)) Message("Hey there!"); { begin_c_loop(c, t) { volume += 2*3.1415*C_VOLUME(c, t)*C_VOF(c, pt[1]); } end_c_loop(c, t) } Message("Volume = %f", volume); } Thanks! |
|
December 30, 2020, 07:11 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
was
Code:
Message("I am here"); if (FLUID_THREAD_P(t)) Message("Hey there!"); { Code:
{ Message("I am here"); if (FLUID_THREAD_P(t)) { Message("Hey there!");
__________________
best regards ****************************** press LIKE if this message was helpful |
|
January 1, 2021, 00:47 |
|
#3 |
New Member
Ajinkya S
Join Date: Feb 2020
Posts: 4
Rep Power: 6 |
Thanks for the help. Although, I used the volume integral option in Monitors tab. That solved the issue.
|
|
Tags |
execute at end, looping over the cells, segmentation fault: 11 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
interDyMFoam - change in volume fraction | gopala | OpenFOAM Running, Solving & CFD | 0 | April 27, 2009 11:46 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |
Calculating volume of Phase | Pavan | FLUENT | 2 | March 5, 2008 11:04 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |