|
[Sponsors] |
How to access C_VOF_G (volume fraction gradient) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 3, 2014, 15:41 |
How to access C_VOF_G (volume fraction gradient)
|
#1 |
New Member
Join Date: Nov 2014
Posts: 7
Rep Power: 12 |
Hi,
I'm trying to get the following UDF to work: Code:
DEFINE_SOURCE(z_cap_force, cell, thread, dS, eqn) { real source=0.0; //skip source on first iteration (no gradient available) if (NULL != THREAD_STORAGE(thread,SV_VOF_G)){ source = 150*C_VOF_G(cell, thread)[2]; printf("Fk: %f\n", Fk); printf("C_VOF_G[0]: %f\n", C_VOF_G(cell, thread)[0]); printf("C_VOF_G[1]: %f\n", C_VOF_G(cell, thread)[1]); printf("C_VOF_G[2]: %f\n", C_VOF_G(cell, thread)[2]); } dS[eqn] = 0.0; return source; } Nevertheless "(NULL != THREAD_STORAGE(thread,SV_VOF_G))" is never true. Anyone got an idea what went wrong? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
[blockMesh] Errors during blockMesh meshing | Madeleine P. Vincent | OpenFOAM Meshing & Mesh Conversion | 51 | May 30, 2016 11:51 |
volume fraction = nan | Virtual-iCFD | OpenFOAM Running, Solving & CFD | 8 | June 12, 2015 19:15 |
InterFoam channel Flow runnig very slowly | Wokl | OpenFOAM Running, Solving & CFD | 4 | January 9, 2014 03:52 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 06:42 |