# \[GiDlist\] How can I create a boundary condition with varying

**URL:** <https://forum.gidsimulation.com/t/gidlist-how-can-i-create-a-boundary-condition-with-varying/80>\
**Category:** 2013 - 2005\
**Created:** [September 26, 2012, 4:05am UTC](https://forum.gidsimulation.com/t/gidlist-how-can-i-create-a-boundary-condition-with-varying/80 "2012-09-26T04:05:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![geraldos](https://forum.gidsimulation.com/letter_avatar_proxy/v4/letter/g/a87d85/32.png) [@geraldos](https://forum.gidsimulation.com/u/geraldos)\
**Post date:** [September 26, 2012, 4:05am UTC](https://forum.gidsimulation.com/t/gidlist-how-can-i-create-a-boundary-condition-with-varying/80/1 "2012-09-26T04:05:16Z")

</div>

Hi,

I create a problem type with the files \*.cnd, \*.bas, \*.mat and \*.prb.

I d’like to know how can I create a boundary condition varying with a  
determined function?

An example is, given a two-dimensional thermal problem, how to apply a  
prescribed Dirichlet  
condition (temperature) linearly varying along an edge of boundary.

My thanks,  
  
  
Geraldo Belmonte

---

<div class="post-metadata">

**Author:** ![escolano](https://forum.gidsimulation.com/user_avatar/forum.gidsimulation.com/escolano/32/6_2.png) [@escolano](https://forum.gidsimulation.com/u/escolano)\
**Post date:** [September 26, 2012, 8:58am UTC](https://forum.gidsimulation.com/t/gidlist-how-can-i-create-a-boundary-condition-with-varying/80/2 "2012-09-26T08:58:39Z")

</div>

A posibility is use a ‘Self Calculated #FUNC# field’ (see help on Gid  
Customization-Configuration files-Conditions file )  
In this kind of special #FUNC# fields you can use a formulae to calculate  
the value based on the variables x, y,z of the node or element center where  
the condition is applied when meshing, and other field values of the same  
condition

Other possibility is to implement the GiD-tcl event  
proc AfterMeshGeneration { fail } {  
}

that is called just after the mesh generation, and with GiD Tcl commands  
(like GiD\_Info conditions, GiD\_AssignData condition, etc) you can ask for  
the conditions applied and assign other conditions (can assign a condition  
to identify the entities and other required data and replace them  
automatically with other conditions calculated as you want)

Enirque  
----- Original Message -----  
From: “geraldos” [geraldos at lncc.br](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
To: [gidlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)  
Sent: Wednesday, September 26, 2012 6:05 AM  
Subject: [GiDlist] How can I create a boundary condition with varying with a  
determined function?  
  
  
_Hi,_  
_I create a problem type with the files \*.cnd, \*.bas, \*.mat and \*.prb._  
_I d’like to know how can I create a boundary condition varying with a_  
_determined function?_  
_An example is, given a two-dimensional thermal problem, how to apply a_  
_prescribed Dirichlet_  
_condition (temperature) linearly varying along an edge of boundary._  
_My thanks,_

_Geraldo Belmonte_

* * *

_GiDlist mailing list_  
_[GiDlist at listas.cimne.upc.edu](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist)_  
\_[http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist\_](http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist_)
