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

properties change with volume fraction

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By pakk
  • 1 Post By pakk
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 10, 2017, 18:36
Lightbulb properties change with volume fraction
  #1
New Member
 
ali sarlak
Join Date: May 2015
Location: iran
Posts: 13
Rep Power: 8
a_Sarlak is on a distinguished road
hi dear friends
i work on nanofluid using mixture model of fluent.
i want to change viscosity using volume fraction so i need udf.
can any body help me, i really need it.
thanks
a_Sarlak is offline   Reply With Quote

Old   February 13, 2017, 04:30
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,873
Rep Power: 23
pakk will become famous soon enough
Look in the Fluent manual for something similar, think about what should be changed, and come here for help to change it.
a_Sarlak likes this.
pakk is online now   Reply With Quote

Old   February 13, 2017, 07:00
Default
  #3
New Member
 
ali sarlak
Join Date: May 2015
Location: iran
Posts: 13
Rep Power: 8
a_Sarlak is on a distinguished road
Quote:
Originally Posted by pakk View Post
Look in the Fluent manual for something similar, think about what should be changed, and come here for help to change it.
dear pakk thanks for your respond.
my cod is:
#include "udf.h"
DEFINE_ADJUST(viscouse_function, d)
{
real vf;
real visc;
cell_t cell;
Thread **pt;
Thread *cell_threads;
Domain *mixture_domain;
mp_thread_loop_c(cell_threads, mixture_domain, pt[1])
{
begin_c_loop(cell,pt[1])
{
vf=C_VOF(cell,pt[1]);
visc = vf; /*it just example*/
}
end_c_loop(cell,pt[1])
}
}



but it doesnt work.
i want to change viscosity with volume fraction
did i do a mistake?
thanks
a_Sarlak is offline   Reply With Quote

Old   February 13, 2017, 07:28
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,873
Rep Power: 23
pakk will become famous soon enough
Quote:
but it doesnt work.
Can you be more specific? What makes you say that it doesn't work? Does it crash? Does it give wrong results?
a_Sarlak likes this.
pakk is online now   Reply With Quote

Old   February 13, 2017, 10:44
Default
  #5
New Member
 
ali sarlak
Join Date: May 2015
Location: iran
Posts: 13
Rep Power: 8
a_Sarlak is on a distinguished road
Quote:
Originally Posted by pakk View Post
Can you be more specific? What makes you say that it doesn't work? Does it crash? Does it give wrong results?
there is no error when interpret in fluent but when i initialize it says:


Node 0: Process 11020: Received signal SIGSEGV.

================================================== ============================

================================================== ============================

Node 1: Process 10652: Received signal SIGSEGV.

================================================== ============================

================================================== ============================

Node 2: Process 9056: Received signal SIGSEGV.

================================================== ============================

================================================== ============================

Node 3: Process 4044: Received signal SIGSEGV.

================================================== ============================

================================================== ============================

Node 4: Process 10068: Received signal SIGSEGV.

================================================== ============================

================================================== ============================

Node 5: Process 5768: Received signal SIGSEGV.

================================================== ============================
a_Sarlak is offline   Reply With Quote

Old   February 13, 2017, 11:01
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,873
Rep Power: 23
pakk will become famous soon enough
If it is during initializating, then your problem could be a physics problem, not a programming problem.
You are saying in the UDF that viscosity is proportional to the volume fraction. When you initialize, the volume fraction is probably initialized at zero. So you are asking Fluent to initialize a fluid with zero viscosity (a superfluid). Fluent is not made to do that.

Try an equation that will make viscosity not equal to zero, for example:
Code:
visc = 0.000008+vf*0.000001;
a_Sarlak likes this.
pakk is online now   Reply With Quote

Old   February 13, 2017, 11:31
Default
  #7
New Member
 
ali sarlak
Join Date: May 2015
Location: iran
Posts: 13
Rep Power: 8
a_Sarlak is on a distinguished road
Quote:
Originally Posted by pakk View Post
If it is during initializating, then your problem could be a physics problem, not a programming problem.
You are saying in the UDF that viscosity is proportional to the volume fraction. When you initialize, the volume fraction is probably initialized at zero. So you are asking Fluent to initialize a fluid with zero viscosity (a superfluid). Fluent is not made to do that.

Try an equation that will make viscosity not equal to zero, for example:
Code:
visc = 0.000008+vf*0.000001;
thanks again
i just do it but the error still remain.
a_Sarlak is offline   Reply With Quote

Reply

Tags
mixture, properties, udf, volume fraction.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Setting the height of the stream in the free channel kevinmccartin CFX 10 July 9, 2015 21:36
Difference between Volume Fraction and Mass Fraction in CEL foo7 CFX 0 September 21, 2011 08:45
interDyMFoam - change in volume fraction gopala OpenFOAM Running, Solving & CFD 0 April 27, 2009 10:46
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 21:14
the Eulerian model and the lower volume fraction hx li FLUENT 2 October 27, 2005 06:17


All times are GMT -4. The time now is 14:00.