CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Set fields for an internal patch (surface) (http://www.cfd-online.com/Forums/openfoam-pre-processing/91073-set-fields-internal-patch-surface.html)

Hisham July 29, 2011 09:53

Set fields for an internal patch (surface)
 
Hi Foamers

I need to define a parameter (e.g.some traction or temperature in a thermal-stress analysis) for a surface inside the geometry (not at boundary).

My idea is that I can use setFields for the internal surface. One of the valid topoSetSource types that suggests such possibility is patchToFace. So is it possible to define an internal patch and refer to it in setFieldsDict? Else, how can I solve my problem?

Thanks a lot.
Best regards,
Hisham

Hisham July 30, 2011 07:02

I have tried to modify the plateHole example of the solidDisplacementFoam solver. I have introduced internal patches via new (6) vertices, modified patches and edges, added (4) boundaries and a merge of two:

Quote:

vertices
(
(0.5 0 0)//0
(1 0 0)
(2 0 0)
(2 0.707107 0)//3
(0.707107 0.707107 0)//4
(0.353553 0.353553 0)//5
(2 2 0)
(0.707107 2 0)
(0 2 0)
(0 1 0)
(0 0.5 0)//10
(0.5 0 0.5)//+11
(1 0 0.5)
(2 0 0.5)
(2 0.707107 0.5)//14
(0.707107 0.707107 0.5)//15
(0.353553 0.353553 0.5)
(2 2 0.5)
(0.707107 2 0.5)
(0 2 0.5)
(0 1 0.5)//20
(0 0.5 0.5)
(2 0.707107 0)//22 -- 3
(0.707107 0.707107 0)//23 -- 4
(2 0.707107 0.5)//24 -- 14
(0.707107 0.707107 0.5)//25 -- 15
(0.353553 0.353553 0)//26 -- 5
(0.353553 0.353553 0.5) //27 -- 16

);

blocks
(
hex (5 4 9 10 16 15 20 21) (10 10 1) simpleGrading (1 1 1)//0
hex (0 1 23 26 11 12 25 27) (10 10 1) simpleGrading (1 1 1)//1
hex (1 2 22 23 12 13 24 25) (20 10 1) simpleGrading (1 1 1)//2
hex (4 3 6 7 15 14 17 18) (20 20 1) simpleGrading (1 1 1)//3
hex (9 4 7 8 20 15 18 19) (10 20 1) simpleGrading (1 1 1)//4
);

edges
(
arc 0 26 (0.469846 0.17101 0)
arc 5 10 (0.17101 0.469846 0)
arc 1 23 (0.939693 0.34202 0)
arc 4 9 (0.34202 0.939693 0)
arc 11 27 (0.469846 0.17101 0.5)
arc 16 21 (0.17101 0.469846 0.5)
arc 12 25 (0.939693 0.34202 0.5)
arc 15 20 (0.34202 0.939693 0.5)
);

boundary
(
left
{
type symmetryPlane;
faces
(
(8 9 20 19)
(9 10 21 20)
);
}
right
{
type patch;
faces
(
(2 22 24 13)
(3 6 17 14)
);
}
down
{
type symmetryPlane;
faces
(
(0 1 12 11)
(1 2 13 12)
);
}
up
{
type patch;
faces
(
(7 8 19 18)
(6 7 18 17)
);
}
hole
{
type patch;
faces
(
(5 10 21 16)
(0 26 27 11)
);
}
frontAndBack
{
type empty;
faces
(
(10 9 4 5)
(26 23 1 0)
(1 23 22 2)
(4 7 6 3)
(4 9 8 7)
(21 16 15 20)
(27 11 12 25)
(12 13 24 25)
(15 14 17 18)
(15 18 19 20)
);
}
myInternal1
{
type patch;
faces
(
(3 4 15 14)
);
}
myInternal2
{
type patch;
faces
(
(23 22 24 25)
);
}
myInternal3
{
type patch;
faces
(
(4 5 16 15)
);
}
myInternal4
{
type patch;
faces
(
(26 23 25 27)
);
}
);

mergePatchPairs
(
(myInternal3 myInternal4)
);

// *********************************
Doing so I was able to introduce temperature (T) to internal patches (boundaries) myInternal1 & 2 as:

Quote:

myInternal1
{
//type zeroGradient;
type fixedValue;
value uniform 1000;
}
myInternal2
{
//type zeroGradient;
type fixedValue;
value uniform 1000;
}
and displacement D as:

Quote:

myInternal1
{
type tractionDisplacement;
traction uniform ( 0 0 0 );
pressure uniform 0;
value uniform (0 0 0);
}
myInternal2
{
type tractionDisplacement;
traction uniform ( 0 0 0 );
pressure uniform 0;
value uniform (0 0 0);
}
Nevertheless, the results indicate discontinuity in displacements at the nonmerged patches. How can I overcome this and still be able to introduce (T), (D) or traction at the same line?
https://picasaweb.google.com/1169016...96155045483218
https://picasaweb.google.com/1169016...96095904159202
https://picasaweb.google.com/1169016...96152225853202

Links to images:
https://picasaweb.google.com/1169016...96155045483218
https://picasaweb.google.com/1169016...96095904159202
https://picasaweb.google.com/1169016...96152225853202


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