CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   boundaryField for derived quantities (https://www.cfd-online.com/Forums/openfoam-solving/165729-boundaryfield-derived-quantities.html)

abhiv January 24, 2016 16:39

boundaryField for derived quantities
 
Hello OFoamers, I'm relatively new to OpenFOAM community. I'm facing an issue while defining boundary condition to one of the variables in my own solver using openfoam.

In particular, I'm calculating Flux of a quantity which is function of two other independent variables. But I need to provide boundary conditions for the flux not the independent variables. Independent variables may have "calculated" BC.

Here is a part of createFields.H, showing one possible situation. "Flux" requires a boundary condition to solve the physics correctly, but the solver is not reading boundaryField while running. I think that it occurs because I'm not providing 'mesh' condition instead of equation for "Flux". The "Flux" is also being used in another PDE solution.


Code:

    volVectorField Flux
    (
        IOobject
        (
            "Flux",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
      N*U
    );

Is there a solution already exists in OpenFOAM for this problem? Please advice me if I am interpreting the openfoam guidelines incorrectly for createFields.H. How to approach if I have to come up with an utility to perform this job?

Thanks in advance,
ABHI


All times are GMT -4. The time now is 08:36.