CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

How To set a variable value for alpha.water on the wall with alphacontactangle

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 28, 2016, 11:02
Default How To set a variable value for alpha.water on the wall with alphacontactangle
  #1
New Member
 
Hossein Fathi
Join Date: Jan 2015
Location: The Netherlands
Posts: 3
Rep Power: 3
h_fathi is on a distinguished road
Dear Foamers

I hope I find my answer in here. I try to set an initial value of alpha.water on some parts of the wall which has a capillary angle and during the solution, this value will change related to another field (the job we do in groovyBC).

It seems we cant set a value of field alpha for the boundary condition:
type consantAlphaContactAngle;

and also we are not able to set the field value of alpha according to another field.

Please help me

Best Regards
h_fathi is offline   Reply With Quote

Old   February 1, 2016, 16:26
Default
  #2
New Member
 
Gabriele
Join Date: Jan 2016
Location: Milan
Posts: 6
Rep Power: 2
leske is on a distinguished road
Hello everyone,
I have managed to create a new patch and set the new boundary conditions that I mentioned in the post above. This is the procedure that i adopted:

1)I used a topoSetDict to create a set of face :


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//

actions
(
{
name INL_olio;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (0.422878 0 -0.0109062069) (0.5 0.0162083112 0.0109062069);
// boxToFace ((MINX MINY MINZ) (MAXX MAXY MAXZ))
}
}
);

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



2) I used a createPatchDict to create a patch with the face of the topoSet :



/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
pointSync false;

// Patches to create.
patches
(
{
// Name of new patch
name INL_OLIO;

// Dictionary to construct new patch from
patchInfo
{
type patch;
}

// How to construct: either from 'patches' or 'set'
constructFrom set;

// If constructFrom = set : name of faceSet
set INL_olio;
}
);

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

3) The new mesh is placed in the directory 0.001 ,




and then subsequently i had to bring the boundary conditions (BC) for all variables (initially in the 0 folder) in the 0.001 folder , the BC in the 0.001 folder must include the conditions on the new patch (INL_OLIO).

4) In the controlDict file i used start at = latest time( that is 0.001) instead of start at = start time =0

In this way i got this result (see attached photos), but i have a new question:




as you can see from the picture the result of the creation of the new patch isn't an accurate rectangle because the faces are part of the new patch or not if their center is internal or external to the rectangle.

Since the size of the rectangle are set by me and these affect the space occupied by the oil in the inlet face and than the result of the simulation, i want a rectangle with a specific area, but in this way i can't have an axact area.

The question is:




there is a way to create a precise rectangle (or another shape) therefore a way to cut the faces of the original mesh rather than take into account
the faces according to the criterion: the faces are part of the new patch or not if their center is internal or external to the rectangle.

thank you.
Attached Images
File Type: png INL_OLIO_meshFine.png (25.0 KB, 4 views)
leske is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divergence in AMG solver! marina FLUENT 15 August 9, 2016 20:15
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
[ICEM] Export ICEM mesh to Gambit / Fluent romekr ANSYS Meshing & Geometry 1 November 26, 2011 13:11
Installation problems indy OpenFOAM Installation 7 April 3, 2009 09:40
How to set environment variables kanishka OpenFOAM Installation 1 September 4, 2005 10:15


All times are GMT -4. The time now is 08:20.