CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

a calculation at the boundary

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2015, 06:06
Default 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
kebsiali is on a distinguished road
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.
kebsiali is offline   Reply With Quote

Old   June 26, 2015, 07:39
Default
  #2
Member
 
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14
kebsiali is on a distinguished road
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();
kebsiali is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 01:04.