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

[swak4Foam] groovyBC- nonuniform scalar mapping

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 3, 2017, 05:40
Default groovyBC- nonuniform scalar mapping
  #1
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 9
ashish.vinayak is on a distinguished road
Hi,

Is it possible to set groovyBC to map a non-uniform scalar list between two region of a multi-region case if both the regions have the same grid resolution?
in the fluid region
interfacePatch {
type groovyBC;
valueExpression "gass";
variables "gass{interfacePatch/solidRegion}=phiGas;";
initialValue nonuniform List<scalar> (0, 0, ....., 0);
}


in the solid region (these values are calculated by the solver during a time step)

interfacePatch {
type calculated;
value nonuniform List<scalar> (...);
}

The solver computes the solid region value first, and then uses the groovyBC to compute the interfacePatch for the fluid region. However, using the current set-up, it only stores 1 value from the solidregion-interfacePatch as a uniform scalar in the fluidregion-interfacePatch.

I hope I have made this clear enough I can explain more if needed.
ashish.vinayak is offline   Reply With Quote

Old   May 8, 2017, 09:45
Default
  #2
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 9
ashish.vinayak is on a distinguished road
I found a post by gschaider that only uniform values can be supplied. Has any development taken place on this after that ? The post is quite old !

The problem is when mapping a multi-region species transfer using groovyBC, mass conservation does not hold since influx of species assumes average patch value at the interface, instead of exact face values.
ashish.vinayak is offline   Reply With Quote

Old   July 29, 2017, 06:47
Default
  #3
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 120
Rep Power: 10
ancolli is on a distinguished road
could u solve ur problem?
ancolli is offline   Reply With Quote

Old   July 29, 2017, 17:42
Default
  #4
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 9
ashish.vinayak is on a distinguished road
Hi Alejandro,

I would suggest you try a different approach, maybe a mapped boundary condition. I created a similar one for my case since doing non-uniform lists was not possible for me. To the best of my knowledge, I do not think it can be done either.

Best Regards.

EDIT: Its exactly the problem I said, I tried setting up non-uniform but groovyBC setup up the values such that, it calculates max, min and avg. And then sets the value at each patch as the average value, if your case contains highly non-uniform points, it will most certainly result in erroneous solution.
ashish.vinayak is offline   Reply With Quote

Old   July 29, 2017, 18:10
Default
  #5
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 120
Rep Power: 10
ancolli is on a distinguished road
Quote:
Originally Posted by ashish.vinayak View Post
Hi Alejandro,

I would suggest you try a different approach, maybe a mapped boundary condition. I created a similar one for my case since doing non-uniform lists was not possible for me. To the best of my knowledge, I do not think it can be done either.

Best Regards.

EDIT: Its exactly the problem I said, I tried setting up non-uniform but groovyBC setup up the values such that, it calculates max, min and avg. And then sets the value at each patch as the average value, if your case contains highly non-uniform points, it will most certainly result in erroneous solution.
what about that:

The incomplete swak4foam reference: The only exception currently implemented is if the current patch is amappedpatch and the external expression is evaluated on the “part-ner patch”. In this case the non-uniform result will be mapped to thelocal patch

Edit: Can u share ur mapped BC? or some tutorials? Thanks in advance!!

Last edited by ancolli; July 31, 2017 at 06:32.
ancolli is offline   Reply With Quote

Reply

Tags
coupled bc, groovybc, swak4foam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
Division by zero exception - loop over scalarField Pat84 OpenFOAM Programming & Development 6 February 18, 2017 05:57
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Diverging solution in transonicMRFDyMFoam tsalter OpenFOAM Running, Solving & CFD 30 July 7, 2014 06:20
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47


All times are GMT -4. The time now is 07:22.