doc:user:conditions:cond_init
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:user:conditions:cond_init [2015/01/08 16:23] – boman | doc:user:conditions:cond_init [2024/12/09 11:11] (current) – vanhulle | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Initial conditions ====== | ====== Initial conditions ====== | ||
+ | Initial conditions can be prescribed using the '' | ||
- | The syntax is similar to a traditional [[doc: | + | === Old Metafor Version < 3545 === |
icset = metafor.getInitialConditionSet() | icset = metafor.getInitialConditionSet() | ||
| | ||
| | ||
- | |'' | + | === New Metafor Version >= 3545 === |
- | |'' | + | icset = domain.getInitialConditionSet() |
- | | '' | + | icset.define(target, field, ampl) |
- | |'' | + | icset.define(target, field, ampl, fctMultiChamps , fieldList) |
- | |'' | + | |
+ | where | ||
|< 100% 8em - - >| | |< 100% 8em - - >| | ||
Line 20: | Line 21: | ||
|'' | |'' | ||
|'' | |'' | ||
+ | |||
+ | \\ | ||
+ | __Examples: | ||
+ | Initial temperature of 20°C for a volume: | ||
+ | icset = metafor.getInitialConditionSet() | ||
+ | | ||
+ | |||
+ | A space-dependent initial pressure at Gauss points: | ||
+ | def pyFct(x, y): | ||
+ | p = (2x+y)*1e4 | ||
+ | return p | ||
+ | fctP = PythonMultiParameterFunction(pyFct, | ||
+ | |||
+ | icset = metafor.getInitialConditionSet() | ||
+ | | ||
+ | |||
doc/user/conditions/cond_init.1420730588.txt.gz · Last modified: (external edit)