# setfields utility for liquid jet

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

 March 7, 2013, 10:50 setfields utility for liquid jet #1 Member   sandy Join Date: Mar 2013 Location: Cardiff, UK Posts: 74 Rep Power: 6 Dear foamers, Pleaes can any body direct me. I am trying to solve a jet flow problem by using interFoam solver. I have a cuboid and I suppose to implement a jet from above moving dowen along the z-direction. x=0.001,y=0.001,z=0.12...jet diameter=0.0004. I have all the boundaries are walls just the above and lower sides are atmosphere. Can I use setfields utility to implement the liquid phase inside my region and what kind of word code for the shape? is it plaintocell or circuletocell like boxtocell as an example, because I have to start from above in a circle cross section shape with a specific velocity. please any thoughts or advice would help so much.

 March 8, 2013, 12:06 #2 Member   Davide D. Join Date: Oct 2012 Location: Birmingham (UK) Posts: 44 Rep Power: 7 A possible idea: 1) Divide the top boundary into two patches, i.e. one free and one for the jet (above circle). 2) Set Ugas fixedvalue uniform (0 0 0) and Uliquid fixedvalue uniform for the jet patch. 3) alpha = for the whole domain. No setfields needed.

March 11, 2013, 12:10
#3
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 6
Quote:
 Originally Posted by dav.dap83 A possible idea: 1) Divide the top boundary into two patches, i.e. one free and one for the jet (above circle). 2) Set Ugas fixedvalue uniform (0 0 0) and Uliquid fixedvalue uniform for the jet patch. 3) alpha = for the whole domain. No setfields needed.
Dear dav.dap83,
Thank you for your help, I did as you recommended but I faced this error:
FOAM FATAL IO ERROR:
keyword inlet is undefined in dictionary "/home/atheel/interFoamvalidation/laminar/liquidjetinjector/0/p_rgh::boundaryField"

I already defined inlet but I do not what is the problem.. you can take a look below at my p_rgh; , U , alpha1 , alpha. and I wish if you can help me...

.................................................. .................................................. ..............
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
leftWall
{
type buoyantPressure;
value uniform 0;
}

rightWall
{
type buoyantPressure;
value uniform 0;
}
upperWall
{
type buoyantPressure;
value uniform 0;

atmosphere
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}

// atmosphere
// {
// type totalPressure;
// p0 uniform 0;
// U U;
// phi phi;
// rho rho;
// psi none;
// gamma 1;
// value uniform 0;
// }

inlet
{
// type buoyantPressure;
// value uniform 0;
}

frontWall
{
type buoyantPressure;
value uniform 0;
}

backWall
{
type buoyantPressure;
value uniform 0;
}

}
.................................................. .................................................. ..............

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
leftWall
{
type fixedValue;
value uniform (0 0 0);
}
rightWall
{
type fixedValue;
value uniform (0 0 0);
}
frontWall
{
type fixedValue;
value uniform (0 0 0);
}
backWall
{
type fixedValue;
value uniform (0 0 0);
upperWall
{
type fixedValue;
value uniform (0 0 0);
}
inlet
{
type fixedValue;
value uniform (0 0 -3);
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
}

// ************************************************** *********************** //

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
leftWall
{
}

rightWall
{
}

inlet
{
type fixedValue;
value uniform 1
}

atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
/ }

// atmosphere
// {
// }

frontWall
{
}

backWall
{
}
upperWall
{
}

}

// ************************************************** *********************** //

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
leftWall
{
}

rightWall
{
}
upperWall
{
}

inlet
{
}

atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}

// atmosphere
// {
// }

frontWall
{
}

backWall
{
}

}

// ************************************************** *********************** /

Sandy,

 March 11, 2013, 12:14 #4 Member   Davide D. Join Date: Oct 2012 Location: Birmingham (UK) Posts: 44 Rep Power: 7 you forgot to close the parenthesis } in p_rgh after upperWall

March 11, 2013, 13:02
#5
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 6
Quote:
 Originally Posted by dav.dap83 you forgot to close the parenthesis } in p_rgh after upperWall
Dear dav.dap83,
Thank you so much, I am so embarrassed, any how I fixed this error but still get another error and I do not why? the error is:

--> FOAM FATAL IO ERROR:

keyword atmosphere is undefined in dictionary "/home/atheel/interFoamvalidation/laminar/liquidjetinjector/0/alpha1::boundaryField"

file: /home/atheel/interFoamvalidation/laminar/liquidjetinjector/0/alpha1::boundaryField from line 25 to line 64.

If you take a look at my dictionary, I defined atmosphere...
Sandy,

March 12, 2013, 07:14
#6
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 6
Quote:
 Originally Posted by sandy13 Dear dav.dap83, Thank you so much, I am so embarrassed, any how I fixed this error but still get another error and I do not why? the error is: --> FOAM FATAL IO ERROR: keyword atmosphere is undefined in dictionary "/home/atheel/interFoamvalidation/laminar/liquidjetinjector/0/alpha1::boundaryField" file: /home/atheel/interFoamvalidation/laminar/liquidjetinjector/0/alpha1::boundaryField from line 25 to line 64. If you take a look at my dictionary, I defined atmosphere... Sandy,
Dear dav.dap83,
Sorry for being obtrusive, but I wanted to ask you, do I need to use topoSetDict like in the nozzleFlow2d tutorial?. I do not what to do, I tried to fix the last error but still get the same one:
--> FOAM FATAL IO ERROR:

keyword atmosphere is undefined in dictionary "/home/atheel/interFoamvalidation/laminar/liquidjetinjector/0/alpha1::boundaryField"
Sandy,

March 17, 2013, 10:05
#7
Member

Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 9
Quote:
 Originally Posted by sandy13 Dear dav.dap83, Thank you so much, I am so embarrassed, any how I fixed this error but still get another error and I do not why? the error is: --> FOAM FATAL IO ERROR: keyword atmosphere is undefined in dictionary "/home/atheel/interFoamvalidation/laminar/liquidjetinjector/0/alpha1::boundaryField" file: /home/atheel/interFoamvalidation/laminar/liquidjetinjector/0/alpha1::boundaryField from line 25 to line 64. If you take a look at my dictionary, I defined atmosphere... Sandy,
There is a \ before the closing } of atmosphere in the first dump of alpha you show (why do you have two in your post?!)

April 4, 2013, 08:50
no convergence for the liquid jet case
#8
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 6
Quote:
 Originally Posted by michielm There is a \ before the closing } of atmosphere in the first dump of alpha you show (why do you have two in your post?!)
Dear michielm,
I am still struggling in my case, I ran my case finally but with out any convergence, I do not know, I used delta T =0.001, Co=0.5 in my control dict., Is that too bad? Or may be because of bad boundary conditions. Would you please help me which is the best boundary condition for a liquid jet and here is my final set of my boundary conditions...
in this link, please have alook at it when ever you have time.
note: 1- I am using interFoam utility for OF 2.1.1.
2- for geometry I used blender to get STL ascii in order to use snappy for my mesh

https://www.dropbox.com/home/openfoam-shear

 April 4, 2013, 11:18 #9 Member   Michiel Join Date: Oct 2010 Location: Delft, Netherlands Posts: 97 Rep Power: 9 Hi Sandy, I cannot read the dropbox folder because you posted the wrong link (you need to click the 'share link' button of the folder and then 'get link' and copy paste that one in your post) Just a thought: your deltaT seems high but I cannot judge without details of your mesh and velocities. Co=0.5 is a bit high for interFoam, but should at least give convergent results. Did you set 'adjustTimestep' to 'yes'?! Or is your case running by your deltaT?

April 4, 2013, 11:52
#10
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 6
Quote:
 Originally Posted by michielm Hi Sandy, I cannot read the dropbox folder because you posted the wrong link (you need to click the 'share link' button of the folder and then 'get link' and copy paste that one in your post) Just a thought: your deltaT seems high but I cannot judge without details of your mesh and velocities. Co=0.5 is a bit high for interFoam, but should at least give convergent results. Did you set 'adjustTimestep' to 'yes'?! Or is your case running by your deltaT?
Dear michielm,
Thank you so much for your replay, I feel so happy when somebody shares me thoughts about OpenFoam because I feel so lonely in this field. Yes I set 'adjustTimestep' to 'yes. Sorry about this little mistake and this is the link for all of my case:
https://www.dropbox.com/sh/ilvn6y9mlkgl3gs/AWqK6vZU4h

Hopefully this time works, If it did not let me know because I am a noob in dropbox as well.
sandy,

April 9, 2013, 04:53
no convergence for the liquid jet case
#11
Member

sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 6
Quote:
 Originally Posted by sandy13 Dear michielm, Thank you so much for your replay, I feel so happy when somebody shares me thoughts about OpenFoam because I feel so lonely in this field. Yes I set 'adjustTimestep' to 'yes. Sorry about this little mistake and this is the link for all of my case: https://www.dropbox.com/sh/ilvn6y9mlkgl3gs/AWqK6vZU4h Hopefully this time works, If it did not let me know because I am a noob in dropbox as well. sandy,
Dear michielm,
I sent you may case couple days ago, please have a look at it, I have checked every thing, but still I do not get any convergence, may be you will know why. I think it is the boundary conditions but I do not which boundary?...
Sandy,

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post lakeat OpenFOAM Mesh Utilities 57 February 1, 2015 09:25 doug Main CFD Forum 10 October 16, 2013 00:47 foamer OpenFOAM Pre-Processing 5 June 3, 2013 12:24 ChrisA OpenFOAM Running, Solving & CFD 3 November 13, 2012 19:20 Amir Omoumi Main CFD Forum 10 August 30, 1999 22:11

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