CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   setfields utility for liquid jet (https://www.cfd-online.com/Forums/openfoam-pre-processing/114240-setfields-utility-liquid-jet.html)

 sandy13 March 7, 2013 10:50

setfields utility for liquid jet

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.

 dav.dap83 March 8, 2013 12:06

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 <your jet velocity> for the jet patch.
3) alpha = <gas value> for the whole domain. No setfields needed.

 sandy13 March 11, 2013 12:10

Quote:
 Originally Posted by dav.dap83 (Post 412580) 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...:confused:

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

 dav.dap83 March 11, 2013 12:14

you forgot to close the parenthesis } in p_rgh after upperWall

 sandy13 March 11, 2013 13:02

Quote:
 Originally Posted by dav.dap83 (Post 413160) you forgot to close the parenthesis } in p_rgh after upperWall
Dear dav.dap83,
Thank you so much, I am so embarrassed,:o 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,

 sandy13 March 12, 2013 07:14

Quote:
 Originally Posted by sandy13 (Post 413172) Dear dav.dap83, Thank you so much, I am so embarrassed,:o 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,

 michielm March 17, 2013 10:05

Quote:
 Originally Posted by sandy13 (Post 413172) Dear dav.dap83, Thank you so much, I am so embarrassed,:o 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?!)

 sandy13 April 4, 2013 08:50

no convergence for the liquid jet case

Quote:
 Originally Posted by michielm (Post 414491) 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

 michielm April 4, 2013 11:18

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?

 sandy13 April 4, 2013 11:52

Quote:
 Originally Posted by michielm (Post 418365) 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,

 sandy13 April 9, 2013 04:53

no convergence for the liquid jet case

Quote:
 Originally Posted by sandy13 (Post 418376) 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,

 All times are GMT -4. The time now is 03:05.