CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   how to use funkySetFields function in muliregion case (http://www.cfd-online.com/Forums/openfoam/116840-how-use-funkysetfields-function-muliregion-case.html)

bryant_k April 26, 2013 06:12

how to use funkySetFields function in muliregion case
 
Hello everyone
I want to use funkySetFields function to set the initial nonuniform field in multiregion case.The solver that I am useing is chtMultiregionFoam and the case is modified according to the tutorials name multiRegionHeater.I know how to use funkySetFields in a case which have a singal region.
With the command:
Code:

funkySetFields -time 0
I can have a initial fields I need successfully.
But in a multiregion case I can not make it work.I know that the foamToTecplot have the function for multiregion.So I try the command according to that:
Code:

funkySetFields -region heater -time 0
or
Code:

funkySetFields  -time 0 -region heater
but it is wrong.

Can you tell me how can I use this funciton in multiregion case?

Thank you very much!

regards!

bryant_K

gschaider April 26, 2013 06:28

Quote:

Originally Posted by bryant_k (Post 423286)
Hello everyone
I want to use funkySetFields function to set the initial nonuniform field in multiregion case.The solver that I am useing is chtMultiregionFoam and the case is modified according to the tutorials name multiRegionHeater.I know how to use funkySetFields in a case which have a singal region.
With the command:
Code:

funkySetFields -time 0
I can have a initial fields I need successfully.
But in a multiregion case I can not make it work.I know that the foamToTecplot have the function for multiregion.So I try the command according to that:
Code:

funkySetFields -region heater -time 0
or
Code:

funkySetFields  -time 0 -region heater
but it is wrong.

Can you tell me how can I use this funciton in multiregion case?

Thank you very much!

regards!

bryant_K

Define "wrong".

I've used it in the past with -region and it worked. But I think that was in "command line"-mode. You're using a dictionary, right? Try specifying an entry "region heater;" there. I must check the source but it is possible that in dictionary mode the -region-option is ignored

bryant_k April 27, 2013 06:41

Thank you for your reply.
I have put the file name funkySetFieldsDict into folder both "system" and "system/heater". Then I run the command
Code:

funkySetFields -region heater -time 0
it occured error:
Code:

can not open
file:../../multiRegionHeater/system/heater/funkySetFieldsDict.heater at line 0.....

But when I run the command
Code:

funkySetFields -time 0
,it can run fluently without error.
But it just changed the file in folder "0" rather "0/heater".

Then I add entry in the file funkySetFieldsDict:
Code:

expressions
(
    Q1
    {
        field Q;
        expression "...";
        condition "..."
      region heater'
      }
)

It can run without any error,but it also changed the field in folder "0" only.

Can you tell how to add the entry and how can I get fields I want?
Thank you very much!

bryant_k

gschaider April 28, 2013 17:54

Quote:

Originally Posted by bryant_k (Post 423487)
Thank you for your reply.
I have put the file name funkySetFieldsDict into folder both "system" and "system/heater". Then I run the command
Code:

funkySetFields -region heater -time 0
it occured error:
Code:

can not open
file:../../multiRegionHeater/system/heater/funkySetFieldsDict.heater at line 0.....


I checked. It works like this. Look at the error message: the location of the dictionary is in a subdirectory of system, not system itself
Quote:

Originally Posted by bryant_k (Post 423487)
But when I run the command
Code:

funkySetFields -time 0
,it can run fluently without error.
But it just changed the file in folder "0" rather "0/heater".

Then I add entry in the file funkySetFieldsDict:
Code:

expressions
(
    Q1
    {
        field Q;
        expression "...";
        condition "..."
      region heater'
      }
)

It can run without any error,but it also changed the field in folder "0" only.

Can you tell how to add the entry and how can I get fields I want?
Thank you very much!



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