|
[Sponsors] |
[swak4Foam] groovyBC accessing to scalarIOList |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 25, 2016, 08:58 |
groovyBC accessing to scalarIOList
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hey all & Bernhard,
just a simple question. Is there the possibility to access scalarIOList within groovyBC? The problem on that I focus at the moment is, that I created a Gaussian-Temperature Boundary-Condition (LASER) using groovyBC and now I want to reduce the used power by a coefficient. The coefficient is calculated in my solver and needs to be available in the boundary. The only work-around that solved my problem till now is to create a new volScalarField that includes the value of the coefficient. This works but finally its not a good solution. The other way would be to calculate the coefficient within the BC but therefore I need some other fields. Any suggestion is welcomed.
__________________
Keep foaming, Tobias Holzmann |
|
April 25, 2016, 16:08 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
What is not totally clear to me: is the coefficient one scalar for the whole simulation or one scalar value per patch face? And it is calculated in the code of your solver? If it is just one value it should be possible to use the global-variables in swak4Foam (usually through the calculateGlobalVariables-function plugin). It should be even possible to inject such global variables from the solver. But the API of the GlobalVariablesRepository is not designed for this and of course it binds the code of your solver to swak4Foam
__________________
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 |
||
April 25, 2016, 17:05 |
|
#3 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Quote:
the missing information (or not clear information):
Code:
type groovy; { . . variables ( "myScalar=max(powerCoeff)"; ); }
__________________
Keep foaming, Tobias Holzmann |
||
May 2, 2016, 14:25 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Sorry. But there is currently no easy fix for your problem. One reason is that there is no general mechanism like the objectRegistry for scalar data
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 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC for oscillatory flow | liybzd | OpenFOAM Community Contributions | 5 | November 12, 2018 07:53 |
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC | zanilu70 | OpenFOAM Community Contributions | 4 | December 13, 2016 06:46 |
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam | dani2702 | OpenFOAM Community Contributions | 0 | November 17, 2016 03:30 |
[swak4Foam] groovyBC issue - k and epsilon | sagnikmazumdar | OpenFOAM Community Contributions | 24 | March 1, 2015 07:16 |
[swak4Foam] groovyBC and Eqn.setReference() | benk | OpenFOAM Community Contributions | 3 | June 2, 2011 08:49 |