CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

udf for energy source from proton beam penetration

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2014, 14:32
Default udf for energy source from proton beam penetration
  #1
Member
 
hani mortezaee
Join Date: Sep 2014
Posts: 30
Rep Power: 11
h.mortezaee is on a distinguished road
hi all
i font know how to define a udf that describe a energy deposition in gas from proton beam penetration , the formula that gives the energy deposition is dE/Dx=f(...) , i really need some help , i really appreciate it , and if its quick it will be awesome ,
im new to udf concept .
h.mortezaee is offline   Reply With Quote

Old   September 16, 2014, 02:18
Default
  #2
Sun
Senior Member
 
Sun's Avatar
 
Join Date: Nov 2010
Posts: 103
Rep Power: 15
Sun is on a distinguished road
Could you please firstly write down the entire equation for the energy deposition and describe each terms in that equation.
Second, can you provide some details on what you are simulating.
Then, i might be able to help you.
Cheers!
Sun is offline   Reply With Quote

Old   September 16, 2014, 04:54
Default
  #3
Member
 
hani mortezaee
Join Date: Sep 2014
Posts: 30
Rep Power: 11
h.mortezaee is on a distinguished road
im gonna simulate natural convection inside a cylindrical enclosure , the formula is dE/dX=4π/(m_e c^2 )∙(nz^2)/β^2 ∙(e^2/(4πε_0 ))^2∙[ln((2m_e c^2 β^2)/(I∙(1-β^2 ) ))-β^2 ]
, this is the bethe-bloch formula , energy per distance that proton go through the matter is a function of proton energy and other parameters like gas atomic number and etc , the protons deposit their energy along their path , and lose their energy and when their energy get to the certain point the energy deposition will be much larger , its just to describe the physics of the proton penetration , there is some relativity terms that are not a concern , there is codes to calculate the beam scattering and energy deposition per cell of the mesh , the codes give a database that every cell get a portion of energy , i need to make fluent read from the database and calculate the stream inside the enclosure , first i was going to develop cfd code from scratch but it seems to be a really hard work to do then i thought fluent will be easier , if further info is required i can give tell me , thank you for the reply ,
it mean so much
h.mortezaee is offline   Reply With Quote

Old   September 16, 2014, 09:37
Default
  #4
Sun
Senior Member
 
Sun's Avatar
 
Join Date: Nov 2010
Posts: 103
Rep Power: 15
Sun is on a distinguished road
Thanks for the explanation. I am not really expert on the field you are working. But, I've just had a look at this page and fairly get the hang of equations.
Correct me if I am wrong, you have a transport equation for E which has a source term on the right hand side. The E only changes by the spatial location and NOT time, right? and there is no diffusion?

I think you can define a steady state "User Defined Scalar" (or UDS) in fluent with a source term. The source term should to be coded in an UDF via DEFINE_SOURCE macro.

In the source term or the RHS of dE/dx, is there any parameters that change with the location? If not, your life would be much more easier!

Quote:
there is codes to calculate the beam scattering and energy deposition per cell of the mesh , the codes give a database that every cell get a portion of energy , i need to make fluent read from the database and calculate the stream inside the enclosure
and the last point, how do you plan to read the database of E in fluent? are you thinking about initializing your domain with the values you get from the other codes?
cheers!
Sun 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
GPU Linear Solvers for OpenFOAM gocarts OpenFOAM Announcements from Other Sources 37 August 17, 2022 14:22
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Community Contributions 27 April 16, 2014 15:14
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 10:08
UDF for energy source JoĆ£o Fernandes FLUENT 4 October 17, 2008 04:53
UDF Scalar Code: HT 1 Greg Perkins FLUENT 8 October 20, 2000 12:40


All times are GMT -4. The time now is 23:15.