# GfsRefineSolid

### From Gerris

(Difference between revisions)

Revision as of 23:05, 15 July 2007GeordieMcBain (Talk | contribs) (noted restriction to surface defined explicitly by GTS files) ← Previous diff |
Current revisionPopinet (Talk | contribs) (examples cross-reference) |
||

Line 1: |
Line 1: | ||

GfsRefineSolid will refine any cell intersected by an embedded solid boundary down to the specified number of levels. | GfsRefineSolid will refine any cell intersected by an embedded solid boundary down to the specified number of levels. | ||

- | |||

- | GfsRefineSolid only works with [[GfsSolid|solid]] [[GfsSurface|surfaces]] defined explicitly by GTS files, not with surfaces defined implicitly by functions. | ||

The syntax in parameter files is | The syntax in parameter files is | ||

Line 20: |
Line 18: | ||

return 8; | return 8; | ||

} | } | ||

+ | |||

+ | <examples/> |

## Current revision

GfsRefineSolid will refine any cell intersected by an embedded solid boundary down to the specified number of levels.

The syntax in parameter files is

[ GfsRefine ]

GfsRefineSolid also creates a new derived variable `SolidCurvature`

which contains the maximum of the mean surface curvature for the fragment of embedded surface contained in a cell. If the mean curvature in a cell cannot be computed — for example because several non-connected fragments of surface intersect the cell — the value of `SolidCurvature`

is set to 1/(cell size).

`SolidCurvature`

can be used to refine an embedded surface according to its mean curvature using for example

RefineSolid { if (SolidCurvature > 0.) { /* compute the level so that (radius of curvature) > 5*(cell size) */ gint l = log(SolidCurvature/0.2)/log(2.); return l < 8 ? 8 : l > 12 ? 12 : l; } else return 8; }

### Examples

RefineSolid 6

`
`

`
`

RefineSolid 8

`
`

`
`

RefineSolid 9

`
`

`
`

RefineSolid 9

`
`

`
`

RefineSolid LEVEL

`
`

`
`

RefineSolid 7

`
`

`
`

RefineSolid (LEVEL + 2)

`
`

`
`

RefineSolid 6

`
`

`
`

RefineSolid (MINLEVEL + (LEVEL - MINLEVEL)*(1. - x/50000.))

`
`

`
`

RefineSolid 7

`
`