How to figure out of MCNP code writing?

In summary: Ax+By+Cz+D=0) and defining it in MCNP code. He mentions that he knows the plate can be defined as 15 p 3 2 0 6 in MCNP, but he doesn't understand how that corresponds to the general plane equation. He also asks if the numbers in the MCNP code (15, 10, 0, 5, 8.66, 0, 10, 0, 1) represent the surface number and how to obtain the values for A, B, C, and D. In summary, Dan is seeking clarification on
  • #1
ms.shafeie
17
0
I have a question about diffrence between ways of defining a certain plate like (3^1/2)x+y+17.3=0 to MCNP code .for example I know we can define it to MCNP with 15 p 3 2 0 6 but I couldn't understand this method 15 10 0 5 8.66 0 10 0 1
 
Engineering news on Phys.org
  • #2
Do you use general plane with equation Ax+By+Cz+D=0, how can obtain A=3, B=2, C=0, D=6 ? What 15 mean, perhaps surface number?
 
  • #3
Stephan_doc said:
Do you use general plane with equation Ax+By+Cz+D=0, how can obtain A=3, B=2, C=0, D=6 ? What 15 mean, perhaps surface number?

it's just an imaginary surface .for example a part of a cube or everything like this.and 15 is number of surface. is the way of obtaining A, B, C, D important.?
 
  • #4
ms.shafeie said:
I have a question about diffrence between ways of defining a certain plate like (3^1/2)x+y+17.3=0 to MCNP code .for example I know we can define it to MCNP with 15 p 3 2 0 6 but I couldn't understand this method 15 10 0 5 8.66 0 10 0 1

It's a little hard without the context.

The first one

15 p 3 2 0 6

looks like a plane surface, called surface 15, and defined by Ax + By + Cz – D = 0. So this is A=3, B=2, C=0, and D=6. That is, this corresponds to

3A + 2Y - 6 = 0

But the second one

15 10 0 5 8.66 0 10 0 1

seems to be missing something. If it's supposed to be a surface it needs a keyword to indicate the kind of surface. Is there maybe a number and the letters xyzp missing? If it was something like this

20 xyzp 15 10 0 5 8.66 0 10 0 1

that would be a plane, called surface 20, through the following three points.

(15,10,0)
(5, 8.66, 0)
(10,0,1)

Does this help?
Dan
 
  • #5


The MCNP code is a complex and powerful tool used for simulating and analyzing nuclear systems. It is primarily used by scientists and engineers in the nuclear industry and academia. In order to effectively use the MCNP code, one must have a solid understanding of nuclear physics and computational methods.

To figure out how to write MCNP code for a specific problem, it is important to first understand the structure and syntax of the code. The MCNP code uses a combination of input files, which contain the specifications of the problem, and output files, which contain the results of the simulation. The input files are written in a specific format, and the syntax must be followed precisely in order for the code to run correctly.

In terms of defining a certain plate in the MCNP code, there are a few different ways to do so. The first method you mentioned, using the notation (3^1/2)x+y+17.3=0, is known as the analytic geometry method. This method involves defining the plate using mathematical equations, as you have shown in your example.

The second method, using the notation 15 p 3 2 0 6, is known as the cell-based method. This method involves defining the plate as a geometry cell within the MCNP code. The numbers in this notation represent the type of cell (15), the material number (3), the density (2), the importance (0), and the cell number (6).

The third method, using the notation 15 10 0 5 8.66 0 10 0 1, is also a cell-based method but uses different parameters. In this notation, the first number (15) represents the type of cell, the second number (10) represents the material number, the third number (0) represents the density, the fourth number (5) represents the importance, and the remaining numbers (8.66, 0, 10, 0, 1) represent the cell geometry.

Overall, the method you choose to define a certain plate in the MCNP code will depend on the type of problem you are trying to solve and your personal preference. It is important to have a solid understanding of the different methods and their syntax in order to effectively use the MCNP code. I recommend consulting the MCNP user manual or seeking guidance from experienced users for further clarification and assistance.
 

1. How do I get started with writing code for MCNP?

To get started with writing code for MCNP, you will need to have a good understanding of the MCNP software and its capabilities. It is recommended to read through the MCNP manual and familiarize yourself with the input file structure and the various cards and parameters used in MCNP. You can also refer to online tutorials and resources to help you get started.

2. Do I need to have programming experience to write code for MCNP?

While having programming experience can be helpful, it is not a necessity for writing code for MCNP. MCNP uses a specific input file format and language, and as long as you have a good understanding of the software, you should be able to write code for it.

3. How can I test my MCNP code?

To test your MCNP code, you can use the MCNP executable file to run your input file. This will allow you to see the results of your code and make any necessary adjustments. You can also use debugging tools and techniques to identify and fix any errors in your code.

4. Are there any resources available to help me with coding for MCNP?

Yes, there are various resources available to help you with coding for MCNP. These include online tutorials, forums, and user groups where you can ask for help and advice from experienced users. You can also refer to the MCNP manual and documentation for guidance.

5. Is it difficult to write code for MCNP?

The difficulty level of writing code for MCNP depends on your level of programming experience and understanding of the software. While it may seem daunting at first, with practice and familiarization, writing code for MCNP can become easier. It is important to start with simple tasks and gradually build your skills and knowledge to write more complex code.

Similar threads

  • Nuclear Engineering
Replies
2
Views
2K
Replies
6
Views
1K
Replies
2
Views
1K
  • Nuclear Engineering
Replies
3
Views
1K
Replies
10
Views
1K
  • Nuclear Engineering
Replies
7
Views
2K
  • Nuclear Engineering
Replies
9
Views
2K
Replies
6
Views
1K
  • Nuclear Engineering
Replies
1
Views
1K
  • Nuclear Engineering
Replies
5
Views
2K
Back
Top