|
[Sponsors] |
assigning a value to the specific zone in OpenFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 11, 2013, 11:51 |
assigning a value to the specific zone in OpenFOAM
|
#1 |
Senior Member
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21 |
Hello foamers
I am trying to add a source term to the UEqn in icoFoam. Now I will describe my question in details: 1- I have a fluent mesh (.msh) which consist of two different zones. 2- I know how to add my source to the UEqn which is a function of beta. 3- beta has a value of zero in the first zone. 4- beta has a value of non-zero in the second zone. 5- Doing so, the solver will add the source term to the second zone, while beta = 0 ensures that the source term remains zero in the first zone. beta will remain constant in the whole simulation, I have defined it as follow: volScalarField beta ( IOobject ( "beta", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); is there any way (like setField) to initiate beta before running the simulation according to the zones which are defined in the mesh? thanks in advance regards |
|
December 12, 2013, 08:02 |
|
#2 |
Senior Member
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21 |
well, I have found a way by searching in OpenFOAM sources (src and utilities).
I have generated the cell ID numbers belong to that specific zone from cellSet utility. Then I have added a bit of code to icoFoam, so it can read that list and assign values acooriding to that ID list. regards |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 05:21 |
[Commercial meshers] Mesh conversion problem (fluent3DMeshToFoam) | Aadhavan | OpenFOAM Meshing & Mesh Conversion | 2 | March 8, 2018 01:47 |
modify specific heat ratio in OpenFOAM | Gitesh P | OpenFOAM Running, Solving & CFD | 0 | June 25, 2012 05:52 |
Problem in running ICEM grid in Openfoam | Tarak | OpenFOAM | 6 | September 9, 2011 17:51 |
How to show the properties in the specific zone ID using UDF (Define_adjust) | sagga18 | Fluent UDF and Scheme Programming | 2 | December 12, 2009 16:01 |