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 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 Code:
funkySetFields -time 0 -region heater Can you tell me how can I use this funciton in multiregion case? Thank you very much! regards! bryant_K |
Quote:
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 |
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 Code:
can not open Code:
funkySetFields -time 0 But it just changed the file in folder "0" rather "0/heater". Then I add entry in the file funkySetFieldsDict: Code:
expressions Can you tell how to add the entry and how can I get fields I want? Thank you very much! bryant_k |
Quote:
Quote:
|
Hi
Thank you for your post and your documentation. I am trying to use funkySetFields for setting heterogeneous values of fields in different cell zones. I have already created 2 separate cell zones and I use the following commands in my funkySetFieldsDict file: setDT { field DT; keepPatches true; expression "2e-09"; zone PoreWater; } setTb { field Tb; keepPatches true; expression "2"; zone PoreWater; } My problem is that funkeSetFields changes the values of DT, Tb fields in the whole domain and not just in the zone PoreWater. Please let me know what am I doing wrongly. Thank you. Saurabh |
Quote:
|
Hi
Thank you for your reply. I am using the command funkySetFields -time 0. My funkySetFields file is in system directory. I believe that I am using the command right but the value in the entire domain is changed not just in the defined cell. Thank you. Saurabh |
Quick answer: Then if you want the correct region to be affected, then you need to:
|
Hi Bruno
Thank you for your suggestion . But I am not running split mesh during preprocessing. I have regions divided (using toposet) into separate cells with names like pore water, bound water, hydrocarbon etc. I use createBaffles to divide the mesh into separate regions. I set Boundary conditions on the 2 generated boundaries. Now I want to set different (hetrogeneous) properties in these different cells. There is only one system folder :(. Please let me know if running splitmesh is necessary for me to properly define these different phases. I am not doing that for now :confused:. Thanks again for your feedback. It has been very helpful. P.S. I have attached is a simplified .msh that I use. Please unzip and open it with gmsh if you would like a better visualization of my problem. Thanks again. Saurabh |
Quick answer: Sorry, I read the other post too fast :(
You should use something like this: Code:
setTb edit: And you forgot to attach. Either way, I tested with the tutorial case "multiphase/interFoam/ras/angledDuct" ;) |
Hi Bruno
Thank you for all the help and your advice. I have used set fields for simulation of my case. Thanks again for the help. I have another question pertaining to the same problem. I am using groovyBC in my simulations. This is what my code looks like. boundaryField { PoreWall { type groovyBCDirection; value uniform (0 0 0); valueExpression "vector (0, 0, Minf)"; gradientExpression "vector(0,0,0)"; fractionExpression "symmTensor(1/(1+D/(rho2*mag(delta()))),0,0,1/(1+D/(rho2*mag(delta()))),0,1/(1+D/(rho1*mag(delta()))))"; evaluateDuringConstruction 0; variables 4 ( "D=3e-09;" "rho2=10e-06;" "rho1=10e-06;" "Minf=4.2e-07;" ) ; } } but I would like to change the values of rho2, rho1 and Minf based on the set type in the mesh. For example: if (set_of_face) == set1 Minf = 4.2; else Minf = 2.2; Is it possible to set type non uniform values in the groovyBCset. I really appreciate all the help that you have given and all the help. Saurabh |
Quote:
|
Quote:
u should probably change funkySetFieldsDict name with funkySetFieldsDict.heater after u put funkySetFieldsDict in heater folder in system folder (ADD dot heater)= .heater then run funkySetFields -time 0 -region heater |
funkySetFields
Hello Foamers
Please show me how to use funkySetFields to create an undulating initial field for alpha.water in the damBreak tutorial. I want to use undulating surface instead of the boxToCell used in the setFields of the tutorial. |
Quote:
|
Quote:
I want to set dam tilted at an angle of 50 degree |
All times are GMT -4. The time now is 16:50. |