|
[Sponsors] |
[swak4Foam] timevaryingmappedFixedValue inside groovyBC |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 7, 2016, 07:59 |
timevaryingmappedFixedValue inside groovyBC
|
#1 |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
Hi foamers,
i am trying to define a boundary condition, between my fluid and a solid, on the temperature. This BC needs a spatial dependent value of the convection coefficient h and a time-dependent value of the solid temperature. To define the spatial dependence of the h coefficient i have used the groovyBC utility and i have succeed to make my job work with a constant value of Tp. But for Tp, can i use timeVaryingMappedFixedValue, inside the groovyBC? Because i don't see another way to do the time-dependence. Thank you evrybody. Laurent |
|
October 8, 2016, 12:39 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
October 10, 2016, 07:34 |
|
#3 |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
Thank you for this answer.
Can i imagine use the timeVaryingMappedFixedValue.C in the groovyBC block ? I know that it implies to make available the various dependencies of it but the first step is : is it possible ? Maybe by an include, pointing on the timeVaryingMappedFixedValue.C, previously copied in the right directory... I feel that swak4foam is much more powerful that it seems. Thank you very much for your help, i couldn't imagine a better person to discuss about this topic. Laurent |
|
October 11, 2016, 06:34 |
|
#4 |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
To be as clear as possible, i would like to plug T values directly on points for each time, like with timeVaryingMappedFixedValue, but the process of plugging on points is a bit too complex to be written in the groovyBC block, isn't it ?
It is why i would like to use the existing C++ file to this step. |
|
October 11, 2016, 08:28 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
October 11, 2016, 10:10 |
|
#6 | |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
Quote:
My current idea is to re-use the data files used by 'timeVaryingMappedFixedValue' (with a file with temperatures for all points of a patch for each time-step, associated with another file which contains the global coordinates of these points) in a groovyBC process using timelines and lookuptables. Maybe it will need a light adaptation to make them compatible with groovyBC but curently i think i can do something good. I have succeed to use groovyBC with lookuptables this summer but i have never used the 'timelines' utility. So i will begin my work by an understanding of the way of use of it. I will warn you about my adventures. Thanks a lot. Laurent |
||
October 12, 2016, 05:48 |
|
#7 |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
Does a complete documentation of the groovyBC exist ?
|
|
October 13, 2016, 06:45 |
|
#8 |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
To achieve my objective, i have to define a value for the temperature for each time and for each point.
How can i do it ? Because the 'lookuptable' utility doesn't want file with ((x,y,z) T) for example. So can i use the numbering of the points ? Or another method that anybody knows ? Thanks. Laurent |
|
October 14, 2016, 05:33 |
|
#9 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
There is a complete documentation of the expressions (which is the most important part) in the Documentation-folder (the incomplete reference guide). All other parts (description of function objects etc) will get written when I have the time Quote:
Using point numbering is not a good idea as that would break with a change of the mesh (or even a simple renumbering. Or decomposition). You can get the face number with "id()" but I don't think this is practical
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|||
October 14, 2016, 10:26 |
|
#10 | |||
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
Ok i understand.
Quote:
Quote:
Quote:
For the moment, two questions : - Can i ask to a valueExpression to use an integer part of a variable ? (int() doesn't work) - I am trying to use pts() but i have an error (unexpected TOKEN points). What do i have to do to use it ? Because my input datas used to define the BC are defined on points... Have a good day, Laurent |
||||
October 17, 2016, 06:09 |
|
#11 |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
Concerning the integer part, the fonctionality i have to use is floor(). But it needs to include math.h.
Can i do that ? I mean inside groovyBC. |
|
October 17, 2016, 06:45 |
|
#12 |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
Concerning the integer part, the fonctionality i have to use is floor(). But it needs to include math.h.
Can i do that ? I mean inside groovyBC. |
|
October 17, 2016, 09:54 |
|
#13 |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
Concretely, i have to take into account the time but in seconds, so the integer part of the current time. How can i do that ?
Any ideas are welcome. L. |
|
October 17, 2016, 11:09 |
|
#14 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
There currently is neither ceil nor floor implemented in swak4Foam as 'I rarely see the need for it. You can work around it using the modulo-operator % (note that a%b maps to [-b/2,b/2]). Getting the interger part of time() should work with something like "time()-((time()-0.5)%1+0.5)" (but check that before really using it)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
October 17, 2016, 11:22 |
|
#15 |
Senior Member
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12 |
Thank you very much, i will take a look on it.
By my side i was thinking about a kind of tabular with (1 1) (2 2). By this way if i define the second value depending of the first by B(A), i can expect an integer as a result. But i need a constant result (and not a ramp) between two bounds and i don't really trust on the outOfBounds utility. For example when i use "outOfBounds toto;" it seems to work... L. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 05:38 |
[snappyHexMesh] SHM error: inside mesh not possible | Naresh yathuru | OpenFOAM Meshing & Mesh Conversion | 1 | January 10, 2017 23:58 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |
Modelling the Heat flow inside the curing oven | Marios Vlad | CFX | 1 | February 6, 2008 07:11 |
meshing F1 front wing | Steve | FLUENT | 0 | April 17, 2003 12:37 |