Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products

Writing Injection files for DPM

    • Salix Bair
      Subscriber
    • Rob
      Ansys Employee

      Is covered in the Fluent User's Guide. You may want to be a little more specific. 

    • Salix Bair
      Subscriber

      I am trying to create an injection file to be read into fluent, what is the format that is required? I haven't been able to find any resources in the Fluent Guide on how to create an injection file not using Fluent.

    • Rob
      Ansys Employee

      You didn't see this https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v231/en/flu_ug/flu_ug_sec_discrete_initial.html%23flu_ug_sec_discrete_file_props  ? 

    • Salix Bair
      Subscriber

      I saw that, but am not sure what the file extension is. I tried using ".inj" with the following formatting, and Fluent was unable to read the file and produced the following error: 

      Error: ASSQ: invalid argument [2]: improper list

      Error Object: 3.53558e-05

      ((.02    3.53558E-05    0    2    0    0    2.00E-09    296.15    0))
      ((.02    6.12395E-05    0    2    0    0    2.00E-09    296.15    0))
      ((.02    7.90619E-05    0    2    0    0    2.00E-09    296.15    0))
      ((.02    9.35496E-05    0    2    0    0    2.00E-09    296.15    0))
      ((.02    0.000106078    0    2    0    0    2.00E-09    296.15    0))
      ((.02    0.000117277    0    2    0    0    2.00E-09    296.15    0))
      ((.02    0.000127496    0    2    0    0    2.00E-09    296.15    0))
      ((.02    0.000136956    0    2    0    0    2.00E-09    296.15    0))

    • Rob
      Ansys Employee

      The wild card doesn't matter, Fluent will just read what's in the file. Try adding the header, and review the brackets. An easier approach is to write a DPM out file from a case and compare the formats. 

    • Salix Bair
      Subscriber

      When I write an injection file from a case to compare the format, it doesn't match what is listed in the manual, this is what it looks like...

      ((particle_10nm_50000 ((type . inert) (injection-type . group) (cone-type . solid-cone) (numpts . 5000) (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.) (material . water-liquid) (scale-by-area . #f) (use-face-normal . #f) (random-surface? . #f) (devolatilizing-species . #f) (evaporating-species . #f) (oxidizing-species . #f) (product-species . #f) (rr-distrib . #f) (rr-uniform-ln-d . #f) (evaporating-liquid-on . #f) (evaporating-material . #f) (liquid-fraction . -1.) (dpm-domain . none) (collision-partner . *dem-unknown*) (multiple-surface) (parcel-number . 500) (parcel-mass . 1e-09) (parcel-diameter . 1e-05) (parcel-model . 0) (drag-law . "udf LiuDrag::libudf") (shape-factor . 1.) (cunningham-correction . 1.) (drag-fcn . "LiuDrag::libudf") (brownian-motion . #f) (seco-breakup-on? . #t) (seco-breakup-tab? . #t) (seco-breakup-wave? . #f) (seco-breakup-khrt? . #f) (seco-breakup-ssd? . #f) (seco-breakup-madabhushi? . #f) (seco-breakup-schmehl? . #f) (seco-breakup-tab-y0 . 0.) (number-tab-diameters . 2) (seco-breakup-wave-b1 . 1.73) (seco-breakup-wave-b0 . 0.61) (seco-breakup-khrt-cl . 5.7) (seco-breakup-khrt-ctau . 0.5) (seco-breakup-khrt-crt . 1.) (seco-breakup-ssd-we-cr . 6.) (seco-breakup-ssd-core-bu . 1.73) (seco-breakup-ssd-np-target . 1000.) (seco-breakup-ssd-x-si . -0.1) (seco-breakup-madabhushi-c0 . 3.44) (seco-breakup-madabhushi-column-drag-cd . 1.48) (seco-breakup-madabhushi-ligament-factor . 0.4) (seco-breakup-madabhushi-jet-diameter . 0.001) (seco-breakup-schmehl-np . 1) (laws (law-1 . "Inert Heating") (law-2 . "Inactive") (law-3 . "Inactive") (law-4 . "Inactive") (law-5 . "Inactive") (law-6 . "Inactive") (law-7 . "Inactive") (law-8 . "Inactive") (law-9 . "Inactive") (law-10 . "Inactive") (switch . "Default")) (udf-inject-init . "none") (udf-heat-mass . none) (components) (volume-specification . zone) (volume-zones) (volume-bounding-shape circle 0 0 0 0 . 0) (volume-streams-spec . total-parcel-count) (volume-streams-total . 100) (volume-streams-per-cell . 2) (mass-input-on . #f) (rotation-on? . #f) (rot-drag-law . "none") (rot-lift-law . "none") (cone-type . "solid-cone") (uniform-mass-dist-on? . #f) (spatial-staggering/std-inj/on? . #f) (spatial-staggering/atomizer/on? . #t) (stagger-radius . 0.) (rough-wall-on? . #f) (cphase-domain . none) (x-pos . 0.002) (x-pos2 . 0.002) (y-pos . 1e-08) (y-pos2 . 0.004) (z-pos . 0) (z-pos2 . 0.) (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 . 2) (x-vel2 . 2.) (y-vel . 0) (y-vel2 . 0.) (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-08) (diameter2 . 1e-08) (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))))

    • Rob
      Ansys Employee

      Which isn't what 21.3.13. Point Properties for File Injections  covers. 

    • Salix Bair
      Subscriber

      No, it doesn't cover the format written by Fluent. I have matched my format to that of the manual, Fluent won't read that format in. So on your suggestion, I wrote an injection file with the properties I want from Fluent, to see the format, which seems incredibly hard to replicate and there is no documentation on that format. I am just trying to write a file for a group of 500 particles, with a uniform diameter distribution, from the information listed in the manual this shouldn't be that difficult. I have READ the manual, I am looking for additional support to troubleshoot this which you don't seem to be able to provide. 

    • Rob
      Ansys Employee

      Erm, the format you showed earlier is not the format in the manual, which is why I suggested adding the header. If you've since revised the file you might want to share it? 

    • Salix Bair
      Subscriber

      I just copied and pasted the injection format from  21.3.13.1. Steady File Format of the manual to create a .inj file to be read into my case file. When I try to read the file in I get the following error: 

      Error: CAR: invalid argument [1]: wrong type [not a pair]

      Error Object: z=4

    • Rob
      Ansys Employee

      It worked OK here. Are you on Win10 or Linux? 

      • Salix Bair
        Subscriber

        I am running Windows 10 

    • Rob
      Ansys Employee

      Please post the top 5-6 lines of your injection file. I copied the header from the offline documentation and then added a couple of lines to create an injection without issue. 

    • Salix Bair
      Subscriber

      Here is my injection file: 

       

      (injection 12)
      (          x           y            z            u            v            w     diameter            t    mass-flow         mass    frequency         time         name)
      (( 1.0000e-02   6.0000e-04   0.0000e+00   2.0000e+00   0.0000e+00   0.0000e+00   1.0000e-08   3.0000e+02   1.0000e-20   5.2266e-22   1.9133e+01    0.0000e+00) r=1mm:0)
      (( 1.0000e-02   6.0000e-04   0.0000e+00   2.0000e+00   0.0000e+00   0.0000e+00   4.5426e-08   3.0000e+02   1.0000e-20   4.8991e-20   2.0412e-01    0.0000e+00) r=1mm:1)
      (( 1.0000e-02   6.0000e-04   0.0000e+00   2.0000e+00   0.0000e+00   0.0000e+00   1.1628e-07   3.0000e+02   1.0000e-20   8.2166e-19   1.2170e-02    0.0000e+00) r=1mm:2)
      (( 1.0000e-02   6.0000e-04   0.0000e+00   2.0000e+00   0.0000e+00   0.0000e+00   1.0019e-06   3.0000e+02   1.0000e-20   5.2566e-16   1.9024e-05    0.0000e+00) r=1mm:3)
      (( 1.0000e-02   6.0000e-04   0.0000e+00   2.0000e+00   0.0000e+00   0.0000e+00   4.2611e-06   3.0000e+02   1.0000e-20   4.0436e-14   2.4730e-07    0.0000e+00) r=1mm:4)

      Getting this error: 

      Error: CAR: invalid argument [1]: wrong type [not a pair]

      Error Object: injection

    • Rob
      Ansys Employee

      Look very carefully at the second sample format in 21.3.13.1 and count your brackets. 

       

      (z=4 12)

      (x y ....................... name )

       

       

    • Salix Bair
      Subscriber

      So I realize that I was mixing my injection formats, I'm pretty sure I have the spacing and formatting correct now: 

      (z=4 12)
      (x y z u v w diameter t mass-flow mass frequency time name)
      (1.0000e-02 6.0000e-04 0.0000e+00 2.0000e+00 0.0000e+00 0.0000e+00 1.0000e-08 3.0000e+02 1.0000e-20 5.2266e-22 1.9133e+01 0.0000e+00 r=1mm:0)
      (1.0000e-02 6.0000e-04 0.0000e+00 2.0000e+00 0.0000e+00 0.0000e+00 1.0000e-08 3.0000e+02 1.0000e-20 5.2266e-22 1.9133e+01 0.0000e+00 r=1mm:1)
      (1.0000e-02 6.0000e-04 0.0000e+00 2.0000e+00 0.0000e+00 0.0000e+00 1.0000e-08 3.0000e+02 1.0000e-20 5.2266e-22 1.9133e+01 0.0000e+00 r=1mm:2)
      (1.0000e-02 6.0000e-04 0.0000e+00 2.0000e+00 0.0000e+00 0.0000e+00 1.0000e-08 3.0000e+02 1.0000e-20 5.2266e-22 1.9133e+01 0.0000e+00 r=1mm:3)

      I'm still getting an error when I try to read it in. 

      I also tried: 

      (z=4 12)
      ( x  y  z  u  v  w  diameter  t  mass-flow  mass  frequency  time  name)
      ( 1.0000e-02  6.0000e-04  0.0000e+00  2.0000e+00  0.0000e+00  0.0000e+00  1.0000e-08  3.0000e+02  1.0000e-20  5.2266e-22  1.9133e+01  0.0000e+00  r=1mm:0)
      ( 1.0000e-02  6.0000e-04  0.0000e+00  2.0000e+00  0.0000e+00  0.0000e+00  1.0000e-08  3.0000e+02  1.0000e-20  5.2266e-22  1.9133e+01  0.0000e+00  r=1mm:1)
      ( 1.0000e-02  6.0000e-04  0.0000e+00  2.0000e+00  0.0000e+00  0.0000e+00  1.0000e-08  3.0000e+02  1.0000e-20  5.2266e-22  1.9133e+01  0.0000e+00  r=1mm:2)
      ( 1.0000e-02  6.0000e-04  0.0000e+00  2.0000e+00  0.0000e+00  0.0000e+00  1.0000e-08  3.0000e+02  1.0000e-20  5.2266e-22  1.9133e+01  0.0000e+00  r=1mm:3)

    • Rob
      Ansys Employee

      That looks fine, I assume it's all one line in the text editor? I wonder if frequency should be 1? We don't use files all that often (VOF to DPM is the exception) and I can't remember what it's exact purpose is. 

      (z=4 12)
      ( x  y  z  u  v  w  diameter  t  mass-flow  mass  frequency  time  name)
      (1 2 3 1 2 3 1e-5 300 0.001 0.1 1 0.001 injection:99)

    • Salix Bair
      Subscriber

      I just tried with the frequency equal to one and as all one line, I thought each particle had to be a separate line, but still no luck. I think it might be time to try to pivot to a different solution for what I am trying to do... I am trying to create an even distribution of 500 particles over a large range of particle diameters to be injected from a single point. The linear diameter distribution option creates a distribution of particle diameters that is skewed to larger sizes. Is there a way in the set injection properties box to define an even distribution? 

    • Rob
      Ansys Employee

      I don't think so, and you're also looking at parcels rather than particles on the injection so it's a little messy. 

      Try without the = in the parcel name. 

    • Salix Bair
      Subscriber

      Hi Rob, 

      I tried it with the = in the parcel name, and that didn't seem to change anything. I think in an earlier post you had maybe said it was the text editor I was using, I'm using windows notepad...

    • Rob
      Ansys Employee

      Try Notepad++  or something where you can show white space characters. It's the |P like symbol (View>Show Symbol in the newer version of ++). If you copied the header from the manual you're almost certainly going to have picked up a symbol or few. 

      We tend to use ++ because it also shows up all the useful { } pairs and colours by command syntax once you save in a certain format, ie .c   

    • Salix Bair
      Subscriber

      I just switched to Notepad++ and I've gotten the closest to getting Fluent to read in the injection...I'm still getting an error, but fluent is now reading in the first argument: 

      Importing the following injections:

      0.01

      Error: ASSQ: inInvalidrgument [2]: improper list

      Error Object: 0.0005999999999999999

      I switched over to this format as well: (( x y z u v w diameter temperature mass-flow) name ) 

    • Rob
      Ansys Employee

      Do you need a parcel name? I've always used the other format. Also check the injection point is some distance into the domain, that should give a different warning but worth eliminating a potential issue when testing. 

    • Salix Bair
      Subscriber

      From the user guide: All the parentheses are required, but the name is optional. 

      The injection is well into the domain. I'm injecting at x=10mm, and y = .6mm in a 60mmx2mm rectangle.

    • Rob
      Ansys Employee

      2d? What happens if you remove the z coordinate & velocity header and values? 

    • Rob
      Ansys Employee

      OK, don't. A colleague just tried it and 2d does still add a z & w component. 

      On re-reading the error it looks like Fluent is reading injection 0.01 and then failing. 

Viewing 25 reply threads
  • You must be logged in to reply to this topic.