Fluids

Fluids

Fluent unsteady DPM injection file formatting

    • jack_townsend
      Subscriber
      Hello!nI am trying to get an unsteady DPM simulation running using a .inj file and am running into errors regarding the injection file formatting. In the documentation (2020-R2) the following is said of unsteady .inj formats:nnThe unsteady file must have a two-line header of the following format:n(z=4 13)n ( x y z u v w diameter t parcel-mass mass n-in-parcel time flow-time name)nIn the first line, you can replace z=4 with an arbitrary label that must not contain any white-space characters. You must not change the rest of the header, but you can add any number of white space characters between its elements. The header is automatically written by ANSYS Fluent into every sampling file for unsteady particle tracking.nThe unsteady file for a file injection has the following form:nCode:n(( x y z u v w diameter temperature parcel-mass mass n-in-parcel time flow-time) name)n nSo I have tried to replicate this with the following (showing only two injections, for the sake of example):n(z=4 13)n( x y z u v w diameter t parcel-mass mass n-in-parcel time flow-time name)n((2.958076e+00 -8.214376e-01 8.320422e-01 -6.094111e-02 7.928544e-02 0.000000e+00 1.000000e-02 2.930000e+02 1.000000e-01 1.000000e-01 1.000000e+00 0.000000e+00 0.000000e+00) injection0:0 )n((2.816757e+00 -1.182306e+00 1.249779e+00 -4.697874e-02 8.827796e-02 0.000000e+00 1.000000e-02 2.930000e+02 1.000000e-01 1.000000e-01 1.000000e+00 0.000000e+00 0.000000e+00) injection0:1 )nThis is giving me the following error:nError: CAR: invalid argument [1]: wrong type [not a pair]nError Object: z=4nSo it seems to be falling down immediately on the header formatting with a type error, which I am surprised by as I think the header is just a copy/paste job in all cases?nTo try and see where I was going wrong I manually created some dummy injection points and wrote the resulting .inj file out, getting this (some bits omitted):nCode:n((injection-1 ((type . inert) (injection-type . group) (cone-type . solid-cone) (numpts . 5) (dpm-fname . ) (surfaces . #f) (boundary -1) (stochastic-on . #f) (random-eddy-on . #f) (ntries . 1) (time-scale-constant . 0.15) (cloud-on . #f) (cloud-min-dia . 0.) (cloud-max-dia . 100000.) n...n(x-pos2 . 3.2) (y-pos . -1.75) (y-pos2 . -1.75) (z-pos . 0.5) (z-pos2 . 0.5) (ff-center-x . 0) (ff-center-y . 0) (ff-center-z . 0) (ff-virtual-origin-x . 0) (ff-virtual-origin-y . 0) (ff-virtual-origin-z . 1) (ff-normal-x . 1) (ff-normal-y . 0) (ff-normal-z . 0) (x-vel . 0) (x-vel2 . 0.) (y-vel . 0.5) (y-vel2 . 0.5) (z-vel . 0) (z-vel2 . 0.) (x-ang-vel . 0) (x-ang-vel2 . 0.) (y-ang-vel . 0) (y-ang-vel2 . 0.) (z-ang-vel . 0) (z-ang-vel2 . 0.) (atomizer-x-axis . 0) (atomizer-y-axis . 0) (atomizer-z-axis . 1) (diameter . 1e-06) (diameter2 . 1e-06) (temperature . 300) (temperature2 . 300.) (flow-rate . 9.999999999999999e-21) (flow-rate2 . 9.999999999999999e-21) (unsteady-start . 0) (unsteady-stop . 0) (start-at-flow-time-in-unsteady-inj-file . 0) (interval-to-repeat-in-unsteady-inj-file . 0) (unsteady-ca-start . 0) (unsteady-ca-stop . 0) (vapor-pressure . 10000) (inner-diameter . 0.001) (outer-diameter . 0.005) (half-angle . 0.34906585) (plain-length . 0.001) (plain-corner-size . 1e-05) (plain-const-a . 4.9) (pswirl-inj-press . 1000000) (airbl-rel-vel . 100) (effer-quality . 0.08500000000000001) (effer-t-sat . 373) (ff-orifice-width . 0.001) (phi-start . 0) (phi-stop . 6.283185310001) (sheet-const . 12) (lig-const . 0.5) (effer-const . 0.3300000000000001) (effer-half-angle-max . 0.261799388) (ff-sheet-const . 3) (atomizer-disp-angle . 6) (x-axis . 0) (y-axis . 0) (z-axis . 1) (vel-mag . 0) (ang-vel-mag . 0) (cone-angle . 0) (inner-radius . 0) (radius . 0) (swirl-frac . 0) (total-flow-rate . 9.999999999999999e-21) (total-mass . 9.999999999999999e-21) (rr-min . 1e-06) (rr-max . 0.0001) (rr-mean . 1e-05) (rr-spread . 3.5) (rr-numdia . 10) (x-posr . 0) (y-posr . 0) (z-posr . 0) (x-posu . 0) (y-posu . 0) (z-posu . 0))))nAm I just misunderstanding the formatting as described in the documentation? Should there be periods between entries to adhere to being of pair type?nAny insight appreciated!n
    • Surya Deb
      Ansys Employee
      Hello, nI tested with the file injection format and it is working fine. Just to confirm, you have turned on Unsteady Particle Tracking, right?nRegards,nSDn
    • jack_townsend
      Subscriber
      Hi SD,nThanks for the reply,nYes, I have the Discrete Phase (On) and Unsteady Particle Tracking is ticked in the Discrete Phase options.nI've been trying possible variations of the formatting including changes to whitespace, but cannot get anything to work. The consistent problem is the first non-number is flagged with the pair type error, for example when I remove the header lines the first injection name causes an error:nError: CAR: invalid argument [1]: wrong type [not a pair]nError Object: injection0:0nYou managed to get the above two-injection example I pasted working? That makes me think I have something wrong with my general setup, but the error code does seem to be specific to the formatting of the injection file? nRegards,nJackn
    • Rob
      Ansys Employee
      Did you copy the header from the manual or type it in? If the former, delete the line and type in from scratch. n
    • gwqsz
      Subscriber

      Did you copy the header from the manual or type it in? If the former, delete the line and type in from scratch.https://forum.ansys.com/discussion/comment/110902#Comment_110902

      I also used inj files that other users had successfully used, and this problem also occurred.I'm using Fluent (2020-R2) and I think this might be a bug with this version.n
    • Rob
      Ansys Employee
      Please can you post an image of the injection panel? n
    • jack_townsend
      Subscriber
      Hi Rob,nI've written a Matlab script which is writing to a file (as ideally I will be generating many points beyond reasonable manual input), I've experimented a bit with whitespace and linebreaks but not had any luck. I've also pasted the text as I wrote in the initial post back into a blank text doc to mimic what I imagine you did.nAre you also testing on 2020-R2? If gwqsz is running into the same issues could this be a problem specific to the version?nBelow is an image of my Discrete Phase panel and injections panel (of course, the injections panel is empty as the error is in reading the file, so no injections are created):nThanks!n
    • gwqsz
      Subscriber
      UDF seems to do the same thing, but I'm not familiar with it.n
    • gwqsz
      Subscriber
      Dear jack_townsend,nI have found the reason for this mistake. Have you solved this problem? If you are still troubled by this problem, I think I can help you.nn
    • taosif_alam
      Subscriber
      Dear ,nHave you found the solution of the problem?? I am facing a similar type of problem while doing file injection. Can you please share the way you have solved the problem?n
    • jack_townsend
      Subscriber
      nI've not managed to find a solution myself, what was the solution for you ?n
Viewing 10 reply threads
  • You must be logged in to reply to this topic.