Boundary definitions in *.grd files

General discussion about Elmer
Post Reply
schnumbl
Posts: 8
Joined: 17 Sep 2011, 13:56
Antispam: Yes

Boundary definitions in *.grd files

Post by schnumbl »

Hi,
I use *grd file below to create a 2D angle geometry.
This results in following numbering of the boundaries:

oooo 3 ooooooooooooooooooooooooo
o------------oooooooooooooooooooooo
o|xxxxxxx|oooooooooooooooooooooo
o|xxxxxxx| 2oooooooooooooooooooo
1|xxxxxxx|oooooooo 3 ooooooooooo
o|xxxxxxx -----------------------------oo
o|xxxxxxxxxxxxxxxxxxxxxxxxxxxx| 2
o ----------------------------------------oo
ooooooooooooooo 3 oooooooooooooo

I would like to use different boundary conditions for the
right boundaries "2". How can I use different type numbers for the upper
right boundary and the lower right boundary?

oooo 3 ooooooooooooooooooooooooo
o------------oooooooooooooooooooooo
o|xxxxxxx|oooooooooooooooooooooo
o|xxxxxxx| 2oooooooooooooooooooo
1|xxxxxxx|oooooooo 3 ooooooooooo
o|xxxxxxx -----------------------------oo
o|xxxxxxxxxxxxxxxxxxxxxxxxxxxx| 4
o ----------------------------------------oo
ooooooooooooooo 3 oooooooooooooo

Is it possible with the "Boundary Definitions" block? Or do I have
to use some kind of "divide edge" command?
(I want to have a script solution that works without the ElmerGUI).

Is it possible to define groups of boundary points and apply point boundary conditions as well?


Sunny regards,

Stefan





---------------------------------------------------
##### ElmerGrid input file for structured grid generation ######
Version = 210903
Coordinate System = Cartesian 2D
Subcell Divisions in 2D = 2 2
Subcell Sizes 1 = 1 3
Subcell Sizes 2 = 1 1

Material Structure in 2D
1 0
1 1
End

Materials Interval = 1 1

Boundary Definitions
# type out int double
1 -4 1 1
2 -2 1 1
3 0 1 1
End

Numbering = Horizontal
Element Degree = 1
Element Innernodes = False
!Triangles = True
Reference Density = 0.05
Element Ratios 1 = 1 1
Element Ratios 2 = 1 1
Element Densities 1 = 1 1
Element Densities 2 = 1 1
------------------------------------------------------------------
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Boundary definitions in *.grd files

Post by raback »

Hi

You might try the following .grd file (didn't test myself):
schnumbl wrote: ##### ElmerGrid input file for structured grid generation ######
Version = 210903
Coordinate System = Cartesian 2D
Subcell Divisions in 2D = 3 3
Subcell Sizes 1 = 1 3 0
Subcell Sizes 2 = 1 1 0

Material Structure in 2D
3 3 4
1 2 4
1 1 4
End

Materials Interval = 1 1

Boundary Definitions
# type out int double
1 2 -1 1
2 2 -4 1
3 3 1 1
4 4 1 1
5 0 1 1
End

Numbering = Horizontal
Element Degree = 1
Element Innernodes = False
!Triangles = True
Reference Density = 0.05
Element Ratios 1 = 1 1 1
Element Ratios 2 = 1 1 1
Element Densities 1 = 1 1 1
Element Densities 2 = 1 1 1
-Peter
schnumbl
Posts: 8
Joined: 17 Sep 2011, 13:56
Antispam: Yes

Re: Boundary definitions in *.grd files

Post by schnumbl »

Hi Peter,

thank you for this helpful example. I learned two things:
- I can use some surrounding dummy material with extra numbers
- The negative indice for directions can be used both, for "int" and "out"

The grd code that corresponds to the wanted numbering of my first post is below.

Sunny regards,

Stefan

Code: Select all

##### ElmerGrid input file for structured grid generation ######
Version = 210903
Coordinate System = Cartesian 2D
Subcell Divisions in 2D = 3 3
Subcell Sizes 1 = 1 3 0
Subcell Sizes 2 = 1 1 0

Material Structure in 2D
0 0 2
1 0 2
1 1 2
End

Materials Interval = 1 1

Boundary Definitions
# type out int 
1 0 -2 
2 0 -4 
3 0 1 
4 2 1 
 
End

Numbering = Horizontal
Element Degree = 1
Element Innernodes = False
!Triangles = True
Reference Density = 0.05
Element Ratios 1 = 1 1 1
Element Ratios 2 = 1 1 1
Element Densities 1 = 1 1 1
Element Densities 2 = 1 1 1
Post Reply