TAGGED: dpm
-
-
January 3, 2023 at 9:35 pm
Theodore St George
SubscriberHello, I've been trying to use DPM File Read with Execute Commands and having an error.
I've created a .inj file with an UDF and am able to create a file injection that is able to import the particles correctly (image below)

This shows up in the TUI after selecting List Particles in the Injections panel. However, if i try to just read in the .inj file with the Read... command I get the following:
These two values correspond to the first two x,y values shown in the prior image. For the project I'm working on, I need to create a new injection file every DPM iteration, so I'm deleting the prior injection with Execute Commands:Â
define/injections/delete-injection/injection-0
I then read in the new injection file:
file/read-injections/injection-0.inj
However, the last command creates the same result as the Read... command within the Injections panel.Â
Is there anything I'm missing here?
Â
Â
-
January 4, 2023 at 1:24 pm
Rob
Forum ModeratorWhy are you creating and reading a new file every DPM update?Â
As a guess (I've not tried this) when you delete the injection file what happens to the injection itself? It's possible the loss of the file is scrambling something in the set up: scheme can be sensitive to "odd" workflows.Â
-
January 4, 2023 at 2:52 pm
Theodore St George
SubscriberRob, I'm checking each cell for condensation conditions, then creating an injection reflecting that. I'm importing/deleting the injection every DPM iteration as it needs to iterate to reach steady state.
Turning off the injection-import command, it successfully deletes the injection file, the hangup is on the Read command. I am able to record a macro with the following sequence, which is sucessful and can achieve the same result, albeit significantly slower:
Injections -> Create
Set Injection Properties -> Injection Type -> File
File... ->(selected file)
Particle Type -> DropletÂ
OK
Like I mentioned previously, there seems to be an issue with Read... command, both in the Injections window, as well as within the Execute Command. Here are the first two lines of the injection if you would like to try yourself.
(( 1.45500e+00 3.65000e-01 0.00000e+00 7.05281e+01 2.44332e-02 0.00000e+00 7.584407125289650098826768098747e-10 3.00042e+02 3.937350888379334781415850515206e-15 ) )
(( 1.45500e+00 3.75000e-01 0.00000e+00 7.05283e+01 2.26287e-02 0.00000e+00 7.584305312919913066064120444926e-10 3.00042e+02 3.941777374810613041885301707001e-15 ) )Â
-
January 4, 2023 at 4:13 pm
Rob
Forum ModeratorAh, are you deleting the injection, or deleting the injection file? The former ought to work but will need you to create a new injection.Â
-
January 4, 2023 at 4:16 pm
Theodore St George
SubscriberI'm just deleting the injection, the injection file is overwritten with the new data each iteration from the UDF. Does the Read command not create a new injection?
-
January 4, 2023 at 4:42 pm
Rob
Forum ModeratorNo, I think you need to delete the injection and then create an injection. The TUI commands may well be safer than GUI macros too.Â
-
January 4, 2023 at 5:13 pm
Theodore St George
SubscriberRob, thanks for the help, looks likeÂ
define/injections/create injection-0 ... file ... injection-0.inj accomplishes what i'm looking for. What's the use case for the read-injections or the Read... command?
-
January 5, 2023 at 10:24 am
Rob
Forum ModeratorThat's to allow an injection setup to be written and then read into another case. So, the file also contains surface settings, material types etc. The injection-file you're using is the postion data etc of the particles. Very subtle difference! It's a function that's useful where you set up many similar models, less so for "one off" work.Â
-
- The topic ‘DPM File Read Issue’ is closed to new replies.
-
4728
-
1565
-
1386
-
1242
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.

