CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] groovyBC and access to fields of other Regions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2017, 09:41
Default groovyBC and access to fields of other Regions
  #1
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
I am using groovyBC to access to the another region.
If i use as a variable "T{solid_to_fluid/solid}=fim;"; it is working but i am getting an average of fim instead of a local value

Code:
 From function ExpressionResult::getUniformInternal(const label size,bool noWarn)
    in file ExpressionResult/ExpressionResultI.H at line 353
    The minimum value 1.859132 and the maximum 5.000479 differ. I will use the average 2.921159;
I tried with mapped variables by reading Examples/test (the cases with "mapped" in the name) as suggested by Bernhard Gschaider

Code:
            "fluid_to_.*"
            {
        	type            groovyBC;
		
		gradientExpression "0";
		fractionExpression "1";
		valueExpression	"T";
		variables "T=mapped(fim);";//"T{solid_to_fluid/solid}=fim;";
		value           $internalField;                

            }
;
But I am getting the following error:

Code:
  
--> FOAM FATAL ERROR: 
 Parser Error for driver PatchValueExpressionDriver at "1.8-10" :"field fim not existing or of wrong type"
"mapped(fim)"
;
It seems that is not recognizing the solid region.

The incomplete swak4foam reference: if the current patch is a mappedpatch and the external expression is evaluated on the “partner patch”. In this case the non-uniform result will be mapped to thelocal patch.

Do u have some hints or tutorial that i can read to solve that problem?

Last edited by ancolli; July 29, 2017 at 18:04.
ancolli is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] groovyBC and funkySetFields married and got a kid named swak4Foam gschaider OpenFOAM Community Contributions 169 August 10, 2023 10:01
[swak4Foam] access field variables in groovyBC mehtab OpenFOAM Community Contributions 11 February 4, 2019 13:08
[swak4Foam] groovyBC and access to alpha field of other patch Tobi OpenFOAM Community Contributions 4 September 2, 2014 05:04
[swak4Foam] whats the trick to access to second layer of patch neighbors in groovyBC? immortality OpenFOAM Community Contributions 6 July 9, 2013 13:01
[swak4Foam] Can groovyBC access dimensionedScalar? argonaut OpenFOAM Community Contributions 1 May 24, 2012 10:04


All times are GMT -4. The time now is 18:14.