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

How Does 'kinematicLookupTableInjection' Locate 'parcelInjectionProperties'

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2020, 14:54
Default How Does 'kinematicLookupTableInjection' Locate 'parcelInjectionProperties'
  #1
Member
 
Conor Crickmore
Join Date: Jan 2020
Location: Leicestershire, United Kingdom
Posts: 36
Rep Power: 6
cjc96 is on a distinguished road
Good evening everyone,
Apologies for what is probably a pretty simple question, but I'm just not seeing the solution. I have a feeling it is a result of staring at the same few sources files constantly for the past few days.

I'm working on a custom Lagrangian framework where I extract particles from a user-derived plane in simulation A and inject them from a related plane in simulation B. I'm accomplishing this by making some relatively significant modifications to 'kinematicLookupTableInjection' such that it injects specific particles from specific injectors at specific times (equivalent to the extracted data). While this isn't entirely relevant, it does provide some context at least.

The solver works perfectly in serial, but fails when run in parallel. The problem I am having is that the solver looks for 'parcelInjectionProperties' in the constant directory of each processor, as opposed to the 'global' constant directory where 'kinematicCloudProperties'. While it is possible to manually copy the file into all desired directories and successfully run the solver, my application will utilise significant parallelisation (once the European HPC clusters are back up and running). To that end, I'd rather modify the solver to read the file from the global constant directory, or at the very least automate the copying process.

If someone could identify how 'kinematicLookupTableInjection' locates 'parcelInjectionProperties' so I can modify it accordingly, I'd be immensely grateful!

Thanks for your help, and let me know if you need any additional info!

**EDIT**
As is the way of the world, I was just being incredibly blind and I think I have found the relevant section near enough immediately after making the thread...

Code:
    injectors_
    (
        IOobject
        (
            inputFileName_,
            owner.db().time().constant(),
            owner.db(),
            IOobject::MUST_READ,
            IOobject::NO_WRITE
        )
    ),
However, I'm still getting used to OpenFOAMs file structure, and I'm not sure how to redirect said IOobject to the global constant directory.

As I said previously, the solver is currently looking in 'case/processor*/constant' but this IOobject is seemingly referencing time, which doesn't make sense to me.

Again, I appreciate any input!
__________________
Conor Crickmore
PhD Researcher in Automotive Aerodynamics
Aeronautical and Automotive Engineering
Loughborough University
LE11 3TU

Last edited by cjc96; June 9, 2020 at 06:18. Reason: Additional Info
cjc96 is offline   Reply With Quote

Old   June 10, 2020, 08:18
Default
  #2
Member
 
Conor Crickmore
Join Date: Jan 2020
Location: Leicestershire, United Kingdom
Posts: 36
Rep Power: 6
cjc96 is on a distinguished road
Just thought I'd post an update in case anyone else has a similar issue in the future.

A colleague pointed me towards 'caseConstant()' (as opposed to the standard 'constant()' which provided the functionality I required, the solver now locates 'parcelInjectionProperties' in the case constant folder.

The modified code (in src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C) is as follows:

Code:
    injectors_
    (
        IOobject
        (
            inputFileName_,
            owner.db().time().caseConstant(),
            owner.db(),
            IOobject::MUST_READ,
            IOobject::NO_WRITE
        )
    ),
'inputFileName' is defined in 'kinematicCloudProperties' and as always, it's recommended you make these changes to a user-based src directory as opposed to the main OpenFOAM source.

Hopefully this helps someone!
__________________
Conor Crickmore
PhD Researcher in Automotive Aerodynamics
Aeronautical and Automotive Engineering
Loughborough University
LE11 3TU
cjc96 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
Locate Region in fluent alvi_unowho FLUENT 3 January 22, 2016 03:49
a cone injection,please help me!! satum FLUENT 0 July 2, 2008 02:38
How to locate the place of injector ? haixiao Siemens 2 April 6, 2006 20:55
locate separation point Srikanth FLUENT 0 March 22, 2006 03:07
Unable to Locate Injection Dan Dressler FLUENT 0 April 3, 2005 23:51


All times are GMT -4. The time now is 20:31.