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

Problem in use of C_VOF in DEFINE_PROPERTY

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 11, 2022, 04:21
Default Problem in use of C_VOF in DEFINE_PROPERTY
  #1
New Member
 
Join Date: Mar 2022
Posts: 4
Rep Power: 4
Severin FENG is on a distinguished road
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;
}
However, when I initialize, fluent crashes!!!! And it seems that it's the lines real vof_liq = C_VOF(cell,liq);
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!
Severin FENG is offline   Reply With Quote

Old   March 11, 2022, 04:24
Default
  #2
New Member
 
Join Date: Mar 2022
Posts: 4
Rep Power: 4
Severin FENG is on a distinguished road
the 0.001056 is the viscosity for liquid phase while 5000 is for solid
Severin FENG is offline   Reply With Quote

Old   August 1, 2022, 14:05
Default
  #3
Sto
New Member
 
Join Date: Jul 2022
Posts: 2
Rep Power: 0
Sto is on a distinguished road
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?
Sto is offline   Reply With Quote

Reply


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
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


All times are GMT -4. The time now is 18:19.