CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Special Topics > Mesh Generation & Pre-Processing

Define a position in terms of the domain size

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2020, 11:38
Question Define a position in terms of the domain size
  #1
New Member
 
Luis Felipe Lσpez
Join Date: Apr 2020
Posts: 7
Rep Power: 6
lf.lopez18 is on a distinguished road
Hi all!


I have a custom library where I want to define a custom position in terms of the domain lengths. For example, I want something like


customPosition = (0.1*Size_in_x, 0.5*Size_in_y, 0.0)


I tried to do something like this:


Code:
volVectorField initialFlameletPosition
(
    IOobject
    (
        "initialFlameletPosition",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::NO_WRITE
    ),
    mesh,
    dimensionedVector(dimLength, ( 0.1*max(mesh.C().component(0)) 0.5*max(mesh.C().component(1)) 0.) )
);
But the following message appears:
Code:
In file included from /opt/openfoam8/src/OpenFOAM/lnInclude/postProcess.H:105:0,
                 from spflameletFoam.C:53:
./createFields.H: In function ‘int main(int, char**)’:
./createFields.H:368:22: error: expected primary-expression before ‘(’ token
     dimensionedVector(dimLength, ( 0.1*max(mesh.C().component(0)) 0.5*max(mesh.C().component(1)) 0.) )
                      ^
./createFields.H:368:67: error: expected ‘)’ before numeric constant
     dimensionedVector(dimLength, ( 0.1*max(mesh.C().component(0)) 0.5*max(mesh.C().component(1)) 0.) )
                                                                   ^~~
./createFields.H:369:2: error: expected ‘)’ before ‘;’ token
 );
  ^
In file included from spflameletFoam.C:60:0:
createFields.H:368:22: error: expected primary-expression before ‘(’ token
     dimensionedVector(dimLength, ( 0.1*max(mesh.C().component(0)) 0.5*max(mesh.C().component(1)) 0.) )
                      ^
createFields.H:368:67: error: expected ‘)’ before numeric constant
     dimensionedVector(dimLength, ( 0.1*max(mesh.C().component(0)) 0.5*max(mesh.C().component(1)) 0.) )
                                                                   ^~~
createFields.H:369:2: error: expected ‘)’ before ‘;’ token
 );
  ^

I'm using OF8. I'd be very grateful with any help.

Greetings,

Felipe
lf.lopez18 is offline   Reply With Quote

Reply

Tags
coordinate, initial, length, openfoam, position


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
Monte Carlo Simulation: H-Energy is not convergating & high Incident Radiation volleyHC CFX 5 April 3, 2016 05:41
Pressure distribution on a wall darazsbence CFX 17 October 6, 2015 10:38
DPM cloud size and domain size dependency MateuszK555 FLUENT 0 April 19, 2015 16:50
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
Size of rotating domain Adam CFX 4 November 28, 2006 10:28


All times are GMT -4. The time now is 14:26.