-
Notifications
You must be signed in to change notification settings - Fork 72
Add new stretching transformation to mesh tools #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 24 commits
d41d463
58fdb32
1d3aa30
73a15d5
0765224
0f37fbe
a32d1ba
77bd280
41d57eb
62467ad
ba667ca
e6b680e
c0d74c2
5e08d60
ce41044
12eeb80
32cb52d
2cf1072
c2549a2
75400a4
e53cb21
97d21eb
38e2537
dfa0f47
7a7feee
0cb4c83
c14506e
71def5a
4554b47
169d7bb
f87be93
182add9
26984d4
2e2203b
fabca88
e6f0d6f
4ab8041
f6ef315
1afd119
50eb1b3
01d176c
fb27efb
b3b7565
85c4d65
4b035cf
ec2841a
0a620c4
87da607
4f68a1d
cef9077
7556bf7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
mo-rickywong marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -319,16 +319,6 @@ ns=namelist/mesh/planar | |||||||||||||||||||||||||||||||||||||||||
| sort-key=Section-A03 | ||||||||||||||||||||||||||||||||||||||||||
| title=Planar | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [namelist:planar_mesh=apply_stretch_transform] | ||||||||||||||||||||||||||||||||||||||||||
| compulsory=true | ||||||||||||||||||||||||||||||||||||||||||
| description=Apply stretched grid transformation. | ||||||||||||||||||||||||||||||||||||||||||
| help=Enables using a larger cell spacing in the outer region of the domain, | ||||||||||||||||||||||||||||||||||||||||||
| =compared to the inner region. | ||||||||||||||||||||||||||||||||||||||||||
| !kind=default | ||||||||||||||||||||||||||||||||||||||||||
| sort-key=Panel-D01 | ||||||||||||||||||||||||||||||||||||||||||
| trigger=namelist:stretch_transform: .true.; | ||||||||||||||||||||||||||||||||||||||||||
| type=logical | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [namelist:planar_mesh=create_lbc_mesh] | ||||||||||||||||||||||||||||||||||||||||||
| compulsory=true | ||||||||||||||||||||||||||||||||||||||||||
| description=Create LBC mesh | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -470,6 +460,27 @@ help=Specifies whether the topology of the mesh should be periodic in the y dire | |||||||||||||||||||||||||||||||||||||||||
| sort-key=Panel-A10 | ||||||||||||||||||||||||||||||||||||||||||
| type=logical | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [namelist:planar_mesh=stretch_function] | ||||||||||||||||||||||||||||||||||||||||||
|
mo-rickywong marked this conversation as resolved.
|
||||||||||||||||||||||||||||||||||||||||||
| compulsory=true | ||||||||||||||||||||||||||||||||||||||||||
| description=Type of stretch transformation applied to the unit mesh | ||||||||||||||||||||||||||||||||||||||||||
| !enumeration=true | ||||||||||||||||||||||||||||||||||||||||||
| help=The function applied is: | ||||||||||||||||||||||||||||||||||||||||||
| = Uniform: y = ax (uniform resolution) | ||||||||||||||||||||||||||||||||||||||||||
| = The following have a low resolution outer and a high resolution | ||||||||||||||||||||||||||||||||||||||||||
| = interior, with a stretch region in between. | ||||||||||||||||||||||||||||||||||||||||||
| = Inflation: y_n = y_n-1 + dy * inflation ** stretch | ||||||||||||||||||||||||||||||||||||||||||
| = Polynomial: y = bx + ax^n where n is the power | ||||||||||||||||||||||||||||||||||||||||||
| !kind=default | ||||||||||||||||||||||||||||||||||||||||||
|
mo-rickywong marked this conversation as resolved.
|
||||||||||||||||||||||||||||||||||||||||||
| trigger=namelist:stretch_transform: this != "'uniform'"; | ||||||||||||||||||||||||||||||||||||||||||
| =namelist:stretch_transform=stretching_on: this == "'inflation'"; | ||||||||||||||||||||||||||||||||||||||||||
| =namelist:stretch_transform=n_cells_outer: this == "'inflation'"; | ||||||||||||||||||||||||||||||||||||||||||
| =namelist:stretch_transform=n_cells_stretch: this == "'inflation'"; | ||||||||||||||||||||||||||||||||||||||||||
| =namelist:stretch_transform=poly_power: this == "'polynomial'"; | ||||||||||||||||||||||||||||||||||||||||||
| =namelist:stretch_transform=n_cells_outer_nsew: this == "'polynomial'"; | ||||||||||||||||||||||||||||||||||||||||||
| =namelist:stretch_transform=n_cells_stretch_nsew: this == "'polynomial'"; | ||||||||||||||||||||||||||||||||||||||||||
| value-titles=uniform, inflation, polynomial | ||||||||||||||||||||||||||||||||||||||||||
| values='uniform','inflation','polynomial' | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [namelist:rotation] | ||||||||||||||||||||||||||||||||||||||||||
| compulsory=true | ||||||||||||||||||||||||||||||||||||||||||
| ns=namelist/mesh/Rotation | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -589,6 +600,19 @@ range=2: | |||||||||||||||||||||||||||||||||||||||||
| sort-key=Panel-A04 | ||||||||||||||||||||||||||||||||||||||||||
| type=integer | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [namelist:stretch_transform=n_cells_outer_nsew] | ||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't follow rest of infrastructure ordering [W,S,E,N] for edges/faces, [SW,SE,NE,NW] for nodes.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As explained in another comment, I would prefer to leave as is.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now updated to WSEN |
||||||||||||||||||||||||||||||||||||||||||
| compulsory=true | ||||||||||||||||||||||||||||||||||||||||||
| description=Depth (in cells) of outer region | ||||||||||||||||||||||||||||||||||||||||||
|
mo-rickywong marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||
| help=[n_outer_n, n_outer_s, n_outer_e, n_outer_w] | ||||||||||||||||||||||||||||||||||||||||||
| =This is the number of cells in an outer region | ||||||||||||||||||||||||||||||||||||||||||
| =near to a domain edge for the North, South, | ||||||||||||||||||||||||||||||||||||||||||
| =East and West edges. | ||||||||||||||||||||||||||||||||||||||||||
|
mo-rickywong marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||
| !kind=default | ||||||||||||||||||||||||||||||||||||||||||
| length=4 | ||||||||||||||||||||||||||||||||||||||||||
| range=1: | ||||||||||||||||||||||||||||||||||||||||||
| sort-key=Panel-A04 | ||||||||||||||||||||||||||||||||||||||||||
| type=integer | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [namelist:stretch_transform=n_cells_stretch] | ||||||||||||||||||||||||||||||||||||||||||
| compulsory=true | ||||||||||||||||||||||||||||||||||||||||||
| description=Depth (in cells) of stretch region | ||||||||||||||||||||||||||||||||||||||||||
|
mo-rickywong marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -605,6 +629,34 @@ range=0: | |||||||||||||||||||||||||||||||||||||||||
| sort-key=Panel-A04 | ||||||||||||||||||||||||||||||||||||||||||
| type=integer | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [namelist:stretch_transform=n_cells_stretch_nsew] | ||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar comments as earlier with respect to the ordering encoded in the variable name
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer to keep the NSEW ordering
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now updated to WSEN |
||||||||||||||||||||||||||||||||||||||||||
| compulsory=true | ||||||||||||||||||||||||||||||||||||||||||
| description=Depth (in cells) of stretch region | ||||||||||||||||||||||||||||||||||||||||||
|
mo-rickywong marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||
| help=[n_stretch_n, n_stretch_s, n_stretch_e, n_stretch_w] | ||||||||||||||||||||||||||||||||||||||||||
|
cjohnson-pi marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||
| =A stretch region is defined to be the | ||||||||||||||||||||||||||||||||||||||||||
| =cells in between the inner region and an | ||||||||||||||||||||||||||||||||||||||||||
| =outer region, and where the cell size is in | ||||||||||||||||||||||||||||||||||||||||||
| =between the inner and outer cell sizes. | ||||||||||||||||||||||||||||||||||||||||||
| =i.e. cell_size_outer > size > cell_size_inner | ||||||||||||||||||||||||||||||||||||||||||
| =These are defined on the North, South, East | ||||||||||||||||||||||||||||||||||||||||||
| =and West edges of the domain. | ||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The existing help provides good background info, though focuses more on cell size and doesn't explicitly expand on the entry for number of cells. Also earlier comment about the ordering applies here aswell
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Text has been adjusted following your suggestions. However I would prefer to keep the NSEW ordering.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As with earlier conversation, please use WSEN to be consistent with reference element ordering
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now updated to WSEN |
||||||||||||||||||||||||||||||||||||||||||
| !kind=default | ||||||||||||||||||||||||||||||||||||||||||
| length=4 | ||||||||||||||||||||||||||||||||||||||||||
| range=0: | ||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this right? a step change is allowed? with zero cells in the stretch region.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested the code and it turns out that you do need to have at least 1 cell. So I've updated the range. |
||||||||||||||||||||||||||||||||||||||||||
| sort-key=Panel-A04 | ||||||||||||||||||||||||||||||||||||||||||
| type=integer | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [namelist:stretch_transform=poly_power] | ||||||||||||||||||||||||||||||||||||||||||
| compulsory=true | ||||||||||||||||||||||||||||||||||||||||||
| description=Polynomial Power | ||||||||||||||||||||||||||||||||||||||||||
| help=The polynomial stretch transform is | ||||||||||||||||||||||||||||||||||||||||||
| = y = bx + ax^n | ||||||||||||||||||||||||||||||||||||||||||
| = where n is the integer polynomial power. | ||||||||||||||||||||||||||||||||||||||||||
|
mo-rickywong marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||
| !kind=default | ||||||||||||||||||||||||||||||||||||||||||
| range=2: | ||||||||||||||||||||||||||||||||||||||||||
| sort-key=Panel-A04 | ||||||||||||||||||||||||||||||||||||||||||
| type=integer | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| [namelist:stretch_transform=stretching_on] | ||||||||||||||||||||||||||||||||||||||||||
| compulsory=true | ||||||||||||||||||||||||||||||||||||||||||
| description=Locations to map stretching function | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.