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

codedFixedValue boundary condition and macro expansion

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2023, 17:19
Default codedFixedValue boundary condition and macro expansion
  #1
New Member
 
kodmasin's Avatar
 
Boris Tomić
Join Date: May 2014
Posts: 1
Rep Power: 0
kodmasin is on a distinguished road
Hi

Example:


./0/include/initialConditions file:
Code:
...
wa           38;//wind angle
flowVelocity    (1 0 0);

 ...
./0/U.orig file:

Code:
...

#include "include/initialConditions"
...
internalField   uniform $flowVelocity;



boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"
    ...
    inlet
    {
        type            codedFixedValue;
        value           $internalField;
        name           wWind;

        code
        #{
                const fvPatch& boundaryPatch = this->patch();
                const vectorField& Cf = boundaryPatch.Cf();
                vectorField result(Cf.size(), Zero);

                scalar trueangle = $wa;
        ...
        #};
    }
}
In above example $wa macro expansion is not working.


Is there some other way how to fetch $wa value in code section of codedFixedValue boundary condition?

Last edited by kodmasin; January 9, 2023 at 15:21.
kodmasin is offline   Reply With Quote

Reply

Tags
boundary, codedfixedvalue, macro expansion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Convection and heat flux boundary condition ymd FLUENT 17 August 21, 2023 04:18
auto set variety initial condition by using java macro MikeWang STAR-CCM+ 1 April 9, 2019 03:41
Boundary condition temperature interpolation along a curve Rodolf_G Fluent UDF and Scheme Programming 7 June 18, 2018 18:08
Constant contact angle boundary condition sdeb31 FLUENT 0 January 12, 2018 12:13
macro to get Boundary condition Seb FLUENT 1 November 7, 2003 12:26


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