|
[Sponsors] |
June 26, 2015, 06:06 |
a calculation at the boundary "condition to access points at boundaryfield"
|
#1 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
hello foamers
I want a variable to have a value of 0 everywhere except at one of the boundaries. where it will have a value that depends on other fields like u,T,p which are readily calculated. I need it at runtime because the second step is to use it in a source term. i started by constructing it in createFields.H but now i need an expression to calculate it i dont have enough experience with openfoam object oriented conditioning and i dont know what kind of condition to impose. any idea how the expression should look? something like in the boundary correction ? thanks for any suggestion Last edited by kebsiali; June 26, 2015 at 07:40. |
|
June 26, 2015, 07:39 |
|
#2 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
I think such an expression looks like:
forAll(U.boundaryField(), ???) { volScalarField& aaa = U.boundaryField(); aaa = fvc::div(U); } Im not sure, just trying random stuff but i get the following message: invalid initialization of reference of type ‘Foam::volScalarField& {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&}’ from expression of type ‘Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField’ volScalarField& aaa = U.boundaryField(); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 07:38 |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 05:57 |
Implementation of boundary conditions for FVM | Tom | Main CFD Forum | 7 | August 26, 2014 05:58 |
Match Control and Symmetry Boundary Condtions in a quasi 2D calculation | peterputer | ANSYS Meshing & Geometry | 0 | May 15, 2012 08:53 |
Boundary conditions? | Tom | Main CFD Forum | 0 | November 5, 2002 01:54 |