Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:conditions:cond_init

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:user:conditions:cond_init [2015/01/08 16:23] bomandoc: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 ''InitialConditionSet'' object, with a similar syntax to [[doc:user:conditions:displacements]]:
  
-The syntax is similar to a traditional [[doc:user:conditions:displacements]]: +=== Old Metafor Version < 3545 ===
    icset = metafor.getInitialConditionSet()    icset = metafor.getInitialConditionSet()
    icset.define(target, field, ampl)    icset.define(target, field, ampl)
    icset.define(target, field, ampl, fctMultiChamps , fieldList)    icset.define(target, field, ampl, fctMultiChamps , fieldList)
  
-|''target'' | ''GObject'' |  meshed geometric entity where the displacement is imposed | +=== New Metafor Version >= 3545 === 
-|''field''   | variable to be initially fixed. \\ Either a db field [[doc:user:general:locks|]]  : displacement, speed, temperature, ... \\ or an internal value  [[doc:user:general:ifields|]] : EplSigXX, P...| +   icset = domain.getInitialConditionSet() 
-| ''ampl''   | initial value | +   icset.define(targetfield, ampl) 
-|''fctMultiChamps ''    | [[doc:user:general:fonctions]] (spatial dependency of initial conditions| +   icset.define(targetfieldampl, fctMultiChamps , fieldList) 
-|''fieldList''    | list of dependency fields (TXTYTZ|+ 
 +where
  
 |< 100% 8em - - >| |< 100% 8em - - >|
Line 20: Line 21:
 |''fctMulti'' {{:doc:user:ico-advanced.png?18|Advanced}}   | ''[[doc:user:general:fonctions|Function]]'' | spatial dependence | |''fctMulti'' {{:doc:user:ico-advanced.png?18|Advanced}}   | ''[[doc:user:general:fonctions|Function]]'' | spatial dependence |
 |''fieldList'' {{:doc:user:ico-advanced.png?18|Advanced}}  |              | list of dependency fields   | |''fieldList'' {{:doc:user:ico-advanced.png?18|Advanced}}  |              | list of dependency fields   |
 +
 +\\
 +__Examples:__ \\
 +Initial temperature of 20°C for a volume:
 +   icset = metafor.getInitialConditionSet()
 +   icset.define(volumeset(1), Field1D(TO,AB), 20.0)
 +
 +A space-dependent initial pressure at Gauss points:
 +   def pyFct(x, y):
 +      p = (2x+y)*1e4
 +      return p
 +   fctP = PythonMultiParameterFunction(pyFct, 2)
 +   
 +   icset = metafor.getInitialConditionSet()
 +   icset.define(sideset(1), IF_P, 1.0, fctP, FieldList(Field1D(TX,AB), Field1D(TY,AB)))
 +
  
doc/user/conditions/cond_init.1420730588.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki