Internal faces for monitoring
I would like to know how to monitor at an internal face (faceZone or faceSet). I want to know p, U, etc... for every point in the faceZone, as well as the mass flow through the entire face.
This is what I have tried so far, but can't seem to get things to work: 1. Import mesh (with "interior" surfaces) from Fluent using: >fluentMeshToFoam mesh.msh -writeSets -writeZones 2. I see the name (interior_001) in faceZones of the faceZone that I want to monitor 3. Now, I have tried using the "surfaces" functionObject which works for slice planes or patches, but is it possible to use this to output a faceZone or faceSet? 4. I also tried even using the libfieldFunctionObjects.so but this seems to only work on a faceZone that is a patch and not an internal one. 5. Also, I have used libsimplefunctionobjects to work very well for mass flow at patches (i.e. pressure_inlet) but I don't know if this works for internal faceZones too. http://openfoamwiki.net/index.php/Co...unctionObjects I am sorry if this has been posted before, I searched through the Forum but keep hitting dead-ends. Thanks, Jason |
(Assuming OpenFOAM-1.6.x) insert this into your controlDict and update according to your case:
Code:
functions OpenFOAM-1.6.x/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.H: - if the field is a volField the faceZone can only consist of boundary faces. You could write something yourself like: Code:
surfaceScalarField test = fvc::interpolate(field); |
josp,
Thanks for your response. I think this sum(phi) is close to what I am looking for, but not quite right. I am wondering though if this is "mass flow" or "mass flow rate"? I am looking for "mass flow rate". I tried the sum(phi) at an inlet patch, and it is giving me results that are not the same as "mass flow rate" from Fluent or from the libsimpleFunctionObjects mass-flux calculations (both of which match up reasonably well to each other): Thanks again for your help, Jason |
sum(phi) is the mass flow rate trough the patch. However, in incompressible solvers, phi has the dimension m^3/s and not kg/s. You will have to multiply this value with rho to have the same results as Fluent.
|
surfaceScalarField
Hello everybody,
I am new to openfoam but have a similar question. I am wondering what I will get as an output if i have the following case. surfaceScalarField abc Info<<"Whats this"<<abc[100]; will it give me output of abc at the face number 100? If I have faceSets, and get the facenumbers out of these facesets, could i get the value of abc at the putting the face number inside the brackets as following Info<<"value at the required facenumber"<<abs[facenumber]; Thanks in advance. |
Quote:
|
Hi guys,
could you provide me some more information if you had/have succesfully implemented monitoring pressure on faceZones. I used OpenFOAM v6 and I am able to online monitoring phi as flux on the internal faces - faceZones, but if I want to monitoring pressure it doesn't work. Any help would be appreciated. Thanks. |
Quick answer: You will have to create a baffle from that faceZone and apply cyclic boundary conditions to it. Search for "createBafflesDict" in the "tutorials" folder... I don't remember which tutorial has it...
|
Hi wyldckat,
you have a briliant idea. It works. My createBaffleDict looks: Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*---------------------------------------------------------------------------*\ Thanks. ---- Hi wyldckat, thank you for your briliant idea, it works. In my log file, during create baffles I received that warning: Code:
--> FOAM Warning : |
Quick answer: There is a quick way you can automatically apply boundary conditions to types of boundaries... This line:
Code:
#includeEtc "caseDicts/setConstraintTypes" The tutorial case "heatTransfer/buoyantSimpleFoam/circuitBoardCooling" is also a good example on how to both use this and define the new boundary conditions via "system/createBafflesDict". |
I had the same problem. Now I solved it with help from Ione and wyldckat so I'm sharing my code if it helps anyone.
I wanted to output average pressure on internal face "CKOUT" which was defined as faceZone. First I tried with function type surfaceFieldValue but I got error "Unable to process internal faces for volume field p" Then I made file createBafflesDict similar to Iose's and ran command createBaffles Two new patches were created, CKOUT_master and CKOUT_slave. Files U, p, k etc. in 0/ folder needs to have these two patches included this way: Code:
CKOUT_master Code:
functions Alternative option, if you don't have swak4foam, is that you put this to controlDict: Code:
functions |
faceZoneAverage OpenFOAM V8 and V9
Since OF V8 it should be possible to have the field values processed for a given faceZone.
If I add a function file in system in this way e.g. : Code:
/*--------------------------------*- C++ -*----------------------------------*\ Quote:
Regards Daniel |
Since type is surfaceFieldValue, so you only can read the face values like phi, but you can't read a volume field like U.
|
All times are GMT -4. The time now is 14:45. |