CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

interfoam: set a velocity to 0 when alpha is low

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2018, 12:21
Default interfoam: set a velocity to 0 when alpha is low
  #1
New Member
 
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8
cuikahlil is on a distinguished road
Hi!

I want to set the velocity of a cell to 0 if the value or alpha1 (water phase) is less than a certain value (like <0.01) since I want to reduce the velocity of air

I implemented this in Ueqn right after the convective term:
Code:
forAll(U, celli)
	{
		if (alpha1[celli] < 0.01) 
		{
			U[celli] == vector(0.0,0.0,0.0);
			
		}
	}
but it doesn't re-assign the values.
Maybe I'm positioning the code wrong? or it the way it is written?
Any help would be very much appreciated. Thank you!
cuikahlil is offline   Reply With Quote

Reply

Tags
interfoam


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
particle velocity field from twoPhaseEulerFoam when particle volume fraction is low openfoammaofnepo OpenFOAM 0 June 28, 2017 19:51
interFoam, nonuniform alpha for channel flow KTG OpenFOAM Pre-Processing 0 February 23, 2017 23:41
Ansys Licence Serve on Ubuntu 16.04 LTS david.pasquale ANSYS 2 January 20, 2017 12:52
conservative form twoPhaseEulerFoam23x gives an unsatisfactory velocity result. sharonyue OpenFOAM Running, Solving & CFD 12 April 10, 2016 00:30
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 16:50.