CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] Include list of points

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2011, 10:03
Default Include list of points
  #1
New Member
 
Join Date: Jun 2011
Posts: 3
Rep Power: 15
Hikachu is on a distinguished road
Hello,

I'm trying to mesh a volume with curved edges. I know I have to use the Spline function to do this.

My problem is that I have first to calculate the coordonates of the points of the curves, and I don't know how to do this on blockMesh.

Here is the file I use for Gambit, but I don't know how to do the same on blockMesh : how should I declare $Y for example?


Quote:
/ Journal File for GAMBIT 2.4.6, Database 2.4.4, ntx86 SP2007051421
/ Identifier "default_id4412"
/ File opened for write Tue Mar 29 16:53:30 2011.
$c = 2.68384
$R=357.741
$Q=44.0621

declare $Y [1:25]

$Y [1] = 0.772
$Y [2] = 0.932
$Y [3] = 1.169
$Y [4] = 1.574
$Y [5] = 2.177
$Y [6] = 2.647
$Y [7] = 3.040
$Y [8] = 3.666
$Y [9] = 4.143
$Y [10] = 4.503
$Y [11] = 4.760
$Y [12] = 4.924
$Y [13] = 4.996
$Y [14] = 4.963
$Y [15] = 4.812
$Y [16] = 4.530
$Y [17] = 4.146
$Y [18] = 3.682
$Y [19] = 3.156
$Y [20] = 2.584
$Y [21] = 1.987
$Y [22] = 1.385
$Y [23] = 0.810
$Y [24] = 0.306
$Y [25] = 0

declare $X [1:25]

$X [1] = 0.5
$X [2] = 0.75
$X [3] = 1.25
$X [4] = 2.5
$X [5] = 5
$X [6] = 7.5
$X [7] = 10
$X [8] = 15
$X [9] = 20
$X [10] = 25
$X [11] = 30
$X [12] = 35
$X [13] = 40
$X [14] = 45
$X [15] = 50
$X [16] = 55
$X [17] = 60
$X [18] = 65
$X [19] = 70
$X [20] = 75
$X [21] = 80
$X [22] = 85
$X [23] = 90
$X [24] = 95
$X [25] = 100

declare $YF [1:25]

$YF [1]=SQ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X[16]/50)^2)-$R*COS($Q/2)
$YF [17]=SQRT($R^2-($R*SIN($Q/2)-$R*SIN($Q/2)*$X[17]/50)^2)-$R*COS($Q/2)
$YF [18]=SQRT($R^2-($R*SIN($Q/2)-$R*SIN($Q/2)*$X[18]/50)^2)-$R*COS($Q/2)
$YF [19]=SQRT($R^2-($R*SIN($Q/2)-$R*SIN($Q/2)*$X[19]/50)^2)-$R*COS($Q/2)
$YF [20]=SQRT($R^2-($R*SIN($Q/2)-$R*SIN($Q/2)*$X[20]/50)^2)-$R*COS($Q/2)
$YF [21]=SQRT($R^2-($R*SIN($Q/2)-$R*SIN($Q/2)*$X[21]/50)^2)-$R*COS($Q/2)
$YF [22]=SQRT($R^2-($R*SIN($Q/2)-$R*SIN($Q/2)*$X[22]/50)^2)-$R*COS($Q/2)
$YF [23]=SQRT($R^2-($R*SIN($Q/2)-$R*SIN($Q/2)*$X[23]/50)^2)-$R*COS($Q/2)
$YF [24]=SQRT($R^2-($R*SIN($Q/2)-$R*SIN($Q/2)*$X[24]/50)^2)-$R*COS($Q/2)
$YF [25]=SQRT($R^2-($R*SIN($Q/2)-$R*SIN($Q/2)*$X[25]/50)^2)-$R*COS($Q/2)

vertex create "p000" coordinates (0.0) ( 0.0)

vertex create "p001" coordinates (0.5*$c) ( $YF [1]+$Y [1]*$c)
vertex create "p101" coordinates (0.5*$c) ($YF [1]-$Y [1]*$c)

vertex create "p002" coordinates (0.75*$c) ($YF [2]+$Y [2]*$c)
vertex create "p102" coordinates (0.75*$c) ($YF [2]-$Y [2]*$c)

vertex create "p003" coordinates (1.25*$c) ($YF [3]+$Y [3]*$c)
vertex create "p103" coordinates (1.25*$c) ($YF [3]-$Y [3]*$c)

vertex create "p004" coordinates (2.5*$c) ($YF [4]+$Y [4]*$c)
vertex create "p104" coordinates (2.5*$c) ($YF [4]-$Y [4]*$c)

vertex create "p005" coordinates (5*$c) ($YF [5]+$Y [5]*$c)
vertex create "p105" coordinates (5*$c) ($YF [5]-$Y [5]*$c)

vertex create "p006" coordinates (7.5*$c) ( $YF [6]+$Y [6]*$c)
vertex create "p106" coordinates (7.5*$c) ($YF [6]-$Y [6]*$c)

vertex create "p007" coordinates (10*$c) ( $YF [7]+$Y [7]*$c)
vertex create "p107" coordinates (10*$c) ($YF [7]-$Y [7]*$c)

vertex create "p008" coordinates (15*$c) ( $YF [8]+$Y [8]*$c)
vertex create "p108" coordinates (15*$c) ($YF [8]-$Y [8]*$c)

vertex create "p009" coordinates (20*$c) ( $YF [9]+$Y [9]*$c)
vertex create "p109" coordinates (20*$c) ($YF [9]-$Y [9]*$c)

vertex create "p010" coordinates (25*$c) ( $YF [10]+$Y [10]*$c)
vertex create "p110" coordinates (25*$c) ($YF [10]-$Y [10]*$c)

vertex create "p011" coordinates (30*$c) ( $YF [11]+$Y [11]*$c)
vertex create "p111" coordinates (30*$c) ($YF [11]-$Y [11]*$c)

vertex create "p012" coordinates (35*$c) ( $YF [12]+$Y [12]*$c)
vertex create "p112" coordinates (35*$c) ($YF [12]-$Y [12]*$c)

vertex create "p013" coordinates (40*$c) ( $YF [13]+$Y [13]*$c)
vertex create "p113" coordinates (40*$c) ($YF [13]-$Y [13]*$c)

vertex create "p014" coordinates (45*$c) ( $YF [14]+$Y [14]*$c)
vertex create "p114" coordinates (45*$c) ($YF [14]-$Y [14]*$c)

vertex create "p015" coordinates (50*$c) ( $YF [15]+$Y [15]*$c)
vertex create "p115" coordinates (50*$c) ($YF [15]-$Y [15]*$c)

vertex create "p016" coordinates (55*$c) ( $YF [16]+$Y [16]*$c)
vertex create "p116" coordinates (55*$c) ($YF [16]-$Y [16]*$c)

vertex create "p017" coordinates (60*$c) ( $YF [17]+$Y [17]*$c)
vertex create "p117" coordinates (60*$c) ($YF [17]-$Y [17]*$c)

vertex create "p018" coordinates (65*$c) ( $YF [18]+$Y [18]*$c)
vertex create "p118" coordinates (65*$c) ($YF [18]-$Y [18]*$c)

vertex create "p019" coordinates (70*$c) ( $YF [19]+$Y [19]*$c)
vertex create "p119" coordinates (70*$c) ($YF [19]-$Y [19]*$c)

vertex create "p020" coordinates (75*$c) ( $YF [20]+$Y [20]*$c)
vertex create "p120" coordinates (75*$c) ($YF [20]-$Y [20]*$c)

vertex create "p021" coordinates (80*$c) ( $YF [21]+$Y [21]*$c)
vertex create "p121" coordinates (80*$c) ($YF [21]-$Y [21]*$c)

vertex create "p022" coordinates (85*$c) ( $YF [22]+$Y [22]*$c)
vertex create "p122" coordinates (85*$c) ($YF [22]-$Y [22]*$c)

vertex create "p023" coordinates (90*$c) ( $YF [23]+$Y [23]*$c)
vertex create "p123" coordinates (90*$c) ($YF [23]-$Y [23]*$c)

vertex create "p024" coordinates (95*$c) ( $YF [24]+$Y [24]*$c)
vertex create "p124" coordinates (95*$c) ($YF [24]-$Y [24]*$c)

vertex create "p025" coordinates (100*$c) ( $YF [25]+$Y [25]*$c)
vertex create "p125" coordinates (100*$c) ($YF [25]-$Y [25]*$c)

edge create nurbs "p001" "p002" "p003" "p004" "p005" "p006" "p007" "p008" \
"p009" "p010" "p011" "p012" "p013" "p014" "p015" "p016" "p017" "p018" \
"p019" "p020" "p021" "p022" "p023" "p024" "p025" interpolate
edge create nurbs "p101" "p102" "p103" "p104" "p105" "p106" "p107" "p108" \
"p109" "p110" "p111" "p112" "p113" "p114" "p115" "p116" "p117" "p118" \
"p119" "p120" "p121" "p122" "p123" "p124" "p125" interpolate
edge create nurbs "p001" "p000" "p101" interpolate
face create wireframe "edge.1" "edge.2" "edge.3" real
face summarize "face.1"
I hope somebody can help me!

Thanks

Last edited by Hikachu; June 22, 2011 at 19:19.
Hikachu 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
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 04:04
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 22:53
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 16:15
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 10:04.