|
[Sponsors] |
March 11, 2022, 04:21 |
Problem in use of C_VOF in DEFINE_PROPERTY
|
#1 |
New Member
Join Date: Mar 2022
Posts: 4
Rep Power: 4 |
Hello, can anyone help me figure out the problem?
I am now trying to simulate a solidification/melting problem, and the model in fluent is not enough since it supposes the solid phase has a zero velocity. In my case, the solid is replaced by a high viscosity fluid but the VOF model just calculate the mixture (of the liquid and solid phases) by volume fraction average, which will "create" a viscous layer for liquid phase near the "solid" because the viscosity is linear to the volume fraction... Therefore, I want to change the volume fraction average by harmonic average, the MACRO is chosen as DEFINE_PROPERTY. However, I don't know actually how to point to each phase in this MACRO and I write this one Code:
DEFINE_PROPERTY(mix_visk,cell,thread) { real mu; Thread *liq = THREAD_SUB_THREAD(thread,0); Thread *sli = THREAD_SUB_THREAD(thread,1); real vof_liq = C_VOF(cell,liq); real vof_sli = C_VOF(cell,sli); real crox1 = vof_liq/0.001056; real crox2 = vof_sli/5000.; printf("crox1=%f crox2=%f\n",crox1,crox2); if (vof_liq || vof_sli) { mu = 1./(vof_liq/0.001056 + vof_sli/5000.); } else { mu = 0.001056; } */ mu = 0.001056; return mu; } real vof_sli = C_VOF(cell,sli); cause problem, but I am not sure. Could you please help me to find out the problem? Thanks a lot! |
|
March 11, 2022, 04:24 |
|
#2 |
New Member
Join Date: Mar 2022
Posts: 4
Rep Power: 4 |
the 0.001056 is the viscosity for liquid phase while 5000 is for solid
|
|
August 1, 2022, 14:05 |
|
#3 |
New Member
Join Date: Jul 2022
Posts: 2
Rep Power: 0 |
For a start, it seems that you have a syntax error on the 4th last line: */
Also not shure about the usage of printf within the DEFINE_PROPERTY macro. Did you try withowt it? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2-7.0.1 on ubuntu 18.04 | hyunko | SU2 Installation | 7 | March 16, 2020 05:37 |
[Other] engineFoam new mesh problem | ayhan515 | OpenFOAM Meshing & Mesh Conversion | 5 | August 10, 2015 09:45 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 06:59 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |