|
From: Moore, S. <st...@sa...> - 2022-09-29 20:41:22
|
In that case you may also consider using SPARTA as a library to couple with your code, https://sparta.github.io/doc/Section_start.html#start_4 or even using the python interface https://sparta.github.io/doc/Section_python.html Stan ________________________________ From: Steve Plimpton <sj...@gm...> Sent: Thursday, September 29, 2022 2:38 PM To: Benzi John - STFC UKRI <ben...@st...> Cc: Moore, Stan <st...@sa...>; Gallis, Michail A <ma...@sa...>; spa...@li... <spa...@li...> Subject: Re: [sparta-users] [EXTERNAL] create_particles at every time step Hi - if I understand you want to define a region of grid cells where all the particles in those grid cells are destroyed and then re-created every timestep? All they do is advect for 1 step and then perform collisions. But the outcome of the collisions will be meaningless b/c the altered particles will be deleted at the beginning of the next step? I think that would be possible to implement, but I'm not seeing how it is a useful model. Perhaps you need to explain the big picture in more detail. And Michael can comment on what you are trying to do. Steve On Thu, Sep 29, 2022 at 2:25 PM Benzi John - STFC UKRI <ben...@st...<mailto:ben...@st...>> wrote: Hi Steve, For the volumetric region, particles will need to be deleted and refreshed every time for this to work. Fix emit is fine for standalone simulations and also in certain other instances, but not the most accurate or general enough for hybrid. Thanks. From: Steve Plimpton <sj...@gm...<mailto:sj...@gm...>> Sent: 29 September 2022 21:00 To: Moore, Stan <st...@sa...<mailto:st...@sa...>>; Gallis, Michail A <ma...@sa...<mailto:ma...@sa...>> Cc: John, Benzi (STFC,DL,SC) <ben...@st...<mailto:ben...@st...>>; spa...@li...<mailto:spa...@li...> Subject: Re: [sparta-users] [EXTERNAL] create_particles at every time step The nice thing about the fix emit commands (from box boundary or from surface elements) is that they emit particles every step as if it were a continuous flow of particles coming into the simulation domain. At the desired density, flow speed, thermal temperature, etc. If you were trying to do the same thing into a volumetric region, I don't see how you avoid putting new particles on top of old particles or would be able to control the flow characteristics the same way ? Steve On Thu, Sep 29, 2022 at 1:19 PM Moore, Stan via sparta-users <spa...@li...<mailto:spa...@li...>> wrote: Here is an example that runs 5 timesteps. You can streamline the run using "pre no post no", see https://sparta.github.io/doc/run.html<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsparta.github.io%2Fdoc%2Frun.html&data=05%7C01%7Cstamoor%40sandia.gov%7C837704cec065427b4a0e08daa25a9e22%7C7ccb5a20a303498cb0c129007381b574%7C1%7C0%7C638000807336043628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=37QYygAP1AoHv8Z7k8ljvzud20kMRafqO%2Bbn%2BhjSKh0%3D&reserved=0> label loop variable a loop 5 create_particles air n $n run 1 pre no post no next a jump in.collide loop Step CPU Np Natt Ncoll c_temp 0 0 10000 0 0 275.427 1 0.00072360039 10000 263 218 275.427 Loop time of 0.000743389 on 1 procs for 1 steps with 10000 particles Creating particles ... Created 10000 particles CPU time = 0.00480032 secs Step CPU Np Natt Ncoll c_temp 1 0 20000 263 218 272.63624 2 0.0022749901 20000 3038 2420 272.63624 Loop time of 0.00229502 on 1 procs for 1 steps with 20000 particles Creating particles ... Created 10000 particles CPU time = 0.00384784 secs Step CPU Np Natt Ncoll c_temp 2 0 30000 3038 2420 272.66875 3 0.0047490597 30000 7924 6203 272.66875 Loop time of 0.00477123 on 1 procs for 1 steps with 30000 particles Creating particles ... Created 10000 particles CPU time = 0.00485206 secs Step CPU Np Natt Ncoll c_temp 3 0 40000 7924 6203 272.24842 4 0.007953167 40000 14463 11103 272.24842 Loop time of 0.0079751 on 1 procs for 1 steps with 40000 particles Creating particles ... Created 10000 particles CPU time = 0.00480986 secs Step CPU Np Natt Ncoll c_temp 4 0 50000 14463 11103 272.2638 5 0.011792183 50000 23172 17321 272.2638 Loop time of 0.0118175 on 1 procs for 1 steps with 50000 particles ________________________________ From: Benzi John - STFC UKRI <ben...@st...<mailto:ben...@st...>> Sent: Thursday, September 29, 2022 12:38 PM To: Moore, Stan <st...@sa...<mailto:st...@sa...>>; spa...@li...<mailto:spa...@li...> <spa...@li...<mailto:spa...@li...>> Subject: RE: [EXTERNAL] [sparta-users] create_particles at every time step Thanks Stan. Yes, it would be good to have this as a fix command. For the variable loop option, will it be possible to show a simple example of the order of the commands for create_particles? Thanks. From: Moore, Stan <st...@sa...<mailto:st...@sa...>> Sent: 29 September 2022 18:57 To: spa...@li...<mailto:spa...@li...>; John, Benzi (STFC,DL,SC) <ben...@st...<mailto:ben...@st...>> Subject: Re: [EXTERNAL] [sparta-users] create_particles at every time step Benzi, It is currently not possible to use create_particles during a run command. You could put "create_particles" and "run 1" in a loop in the input file though (see https://sparta.github.io/doc/variable.html<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsparta.github.io%2Fdoc%2Fvariable.html&data=05%7C01%7Cstamoor%40sandia.gov%7C837704cec065427b4a0e08daa25a9e22%7C7ccb5a20a303498cb0c129007381b574%7C1%7C0%7C638000807336043628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ZJw78VHu8%2BCa%2FQE6tY0MK0QsViBzQRTQp8gecTM9js8%3D&reserved=0>), but that would probably be a little inefficient. This could be added as an extension to the code, something like "fix add/particle". Stan ________________________________ From: Benzi John - STFC UKRI via sparta-users <spa...@li...<mailto:spa...@li...>> Sent: Wednesday, September 28, 2022 9:30 AM To: spa...@li...<mailto:spa...@li...> <spa...@li...<mailto:spa...@li...>> Subject: [EXTERNAL] [sparta-users] create_particles at every time step Hi Michael, Steve, Just a quick question on the create_particles command in SPARTA. Is there a way currently to use this command to create particles in a region at every time step? I know this can be used for creating particles in a certain region by using the ‘region’ key word, but not sure if this can be also used at every time step. The reason is I am exploring the feasibility of coupling SPARTA to CFD and so was initially checking SPARTA’s current capabilities for creating particles near the boundary at every time step. Thanks, Benzi This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. _______________________________________________ sparta-users mailing list spa...@li...<mailto:spa...@li...> https://lists.sourceforge.net/lists/listinfo/sparta-users<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fsparta-users&data=05%7C01%7Cstamoor%40sandia.gov%7C837704cec065427b4a0e08daa25a9e22%7C7ccb5a20a303498cb0c129007381b574%7C1%7C0%7C638000807336043628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PLxFiIsMQXnXjdobXRQTcVOz20BppTSBQbxkfDbcxyY%3D&reserved=0> |