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

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2016, 10: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: 11
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, 15:26
Default
  #2
New Member
 
Gabriele
Join Date: Jan 2016
Location: Milan
Posts: 6
Rep Power: 10
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, 24 views)
leske is offline   Reply With Quote

Reply


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
Divergence in AMG solver! marina FLUENT 20 August 1, 2020 11:30
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 12: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 23:33.