CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] groovy BC (https://www.cfd-online.com/Forums/openfoam-community-contributions/125452-groovy-bc.html)

Ahmed Khattab October 25, 2013 12:31

groovy BC
 
Hi foamers,
i'm using groovy BC to express relation between pressure in two different patches. the problem is that expression takes average value of pressure in each patch and input it in my equation to output one value assigned to patch with groovy BC. while i want this equation to be applied for every cell not the patch as a whole and value for every cell to be evaluated from corresponding cells pressure in the two other patches (the three patches have same number of cells).

is it possible with groovy BC.

gschaider October 28, 2013 15:48

Quote:

Originally Posted by Ahmed Khattab (Post 459031)
Hi foamers,
i'm using groovy BC to express relation between pressure in two different patches. the problem is that expression takes average value of pressure in each patch and input it in my equation to output one value assigned to patch with groovy BC. while i want this equation to be applied for every cell not the patch as a whole and value for every cell to be evaluated from corresponding cells pressure in the two other patches (the three patches have same number of cells).

is it possible with groovy BC.

First: on a patch you have faces not cells (that may seem minor but it makes reading the questions harder because on has to guess what you mean)

Second: what is the third patch

Something like this is possible if the two patches are "mapped" patches. Have a look at the examples there are two mapping-examples in Examples/test

For non-mapped-patches this is not supported and I have explained multiple times on the forum why not

Ahmed Khattab November 5, 2013 11:09

Hi,

i tried mapFields and i got this error message

Code:

--> FOAM FATAL IO ERROR:
cannot find file

file: /home/khattab/OpenFOAM/khattab-2.1.0/run/tutorials/heatTransfer/chtMultiRegionSimpleFoam/masterCase4/processor0/system/controlDict at line 0.

    From function regIOobject::readStream()
    in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting

i don't know what i must do?

another thing. i want to take two fields only from source case (U,P) which not only fields in source case or target case.

thanks in advance

gschaider November 7, 2013 06:08

Quote:

Originally Posted by Ahmed Khattab (Post 460675)
Hi,

i tried mapFields and i got this error message

Code:

--> FOAM FATAL IO ERROR:
cannot find file

file: /home/khattab/OpenFOAM/khattab-2.1.0/run/tutorials/heatTransfer/chtMultiRegionSimpleFoam/masterCase4/processor0/system/controlDict at line 0.

    From function regIOobject::readStream()
    in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting

i don't know what i must do?

another thing. i want to take two fields only from source case (U,P) which not only fields in source case or target case.

thanks in advance

How is that related to the topic of this thread? Does it only happen if you use a groovyBC or is it a general problem with mapFields in parallel and multi-region cases (in that case I suggest you start a new thread)

Ahmed Khattab November 7, 2013 07:51

Hi,

thanks for your reply, i already started new one.
http://www.cfd-online.com/Forums/ope...i-regions.html

but this new thread is with another problem related to multiregions.
for my problem with multiprocessor i didn't find solution but i used one processor to overcome it.

thanks in advance.


All times are GMT -4. The time now is 06:51.