Finding 2D Mesh Solutions for User-Specified Needs

  • Fortran
  • Thread starter Milentije
  • Start date
  • Tags
    2d Mesh
In summary, the conversation is about creating a 2D mesh with user-specified parameters. The speaker has found some solutions online but is having trouble compiling them. They are looking for more resources on where to find information about 2D meshes and clarify that they mean a 2-dimensional grid where they can set the parameters. The code provided sets the parameters for a simple orthogonal 2D mesh. The speaker thanks the other person for their answer and admits to being deliberately vague.
  • #1
Milentije
48
0
What I need is a 2d mesh,user specified.I have find some solutions on net but still have problems compiling.Anyone knows wheret o find more?
 
Technology news on Phys.org
  • #2
What do you mean 2D mesh?
 
  • #3
I mean 2dimensions grid,where I can set the parameters.
 
  • #4
You mean 2D means 2 dimensions?? In all honesty, you're vagueness is epic.
Code:
integer :: ni,nj,i,j
real,dimension(:,:),allocatable :: x,y
real :: dx,dy,xc,yc

!--Set parameters
ni = 10  !--number of points in the x-direction
nj = 10  !--number of points in the y-direction
dx = 0.1 !--grid spacing in the x-direction
dy = 0.1 !--grid spacing in the y-direction
allocate( x(ni,nj),y(ni,nj) )

xc = 0.0
yc = 0.0
DO i=1,ni
  DO j=1,nj
    x(i,j) = xc
    y(i,j) = yc
    xc = xc + dx
  END DO
  yc = yc + dy
  xc = 0.0
END DO

deallocate(x,y)

That's my idea of a simple orthogonal 2D mesh.
 
  • Like
Likes mariem.makh
  • #5
Thanks for the answer.
Oh,yes I am deliberately vague.
 

1. What is the importance of finding 2D mesh solutions for user-specified needs?

2D mesh solutions are crucial in many scientific and engineering applications, as they allow for accurate and efficient modeling of complex systems. By specifying the needs of the user, we can tailor the mesh to accurately represent the structure and behavior of the system, leading to more accurate results and insights.

2. How do you determine the specific needs of the user for 2D mesh solutions?

The specific needs of the user can be determined through a thorough understanding of the problem at hand, as well as discussions and consultations with the user. This allows us to identify key parameters and features that need to be accurately represented in the mesh.

3. What factors are considered when finding 2D mesh solutions for user-specified needs?

There are several factors that are taken into account when finding 2D mesh solutions for user-specified needs. These include the geometry and complexity of the system, the desired level of accuracy, the type of simulation being performed, and the available computational resources.

4. What methods are used to generate 2D mesh solutions for user-specified needs?

There are various methods used to generate 2D mesh solutions, including structured and unstructured meshing techniques. These methods involve breaking down the system into smaller elements or cells, and then connecting them to form the mesh. The specific method used will depend on the needs of the user and the characteristics of the system.

5. How do you validate the accuracy of 2D mesh solutions for user-specified needs?

The accuracy of 2D mesh solutions can be validated through comparison with experimental data or analytical solutions, if available. Additionally, sensitivity analysis can be performed to assess the impact of mesh parameters on the results. The mesh can also be refined or adjusted based on the needs of the user to improve accuracy.

Similar threads

  • Programming and Computer Science
Replies
9
Views
2K
  • Programming and Computer Science
Replies
2
Views
984
  • Programming and Computer Science
Replies
6
Views
3K
  • Sci-Fi Writing and World Building
Replies
12
Views
496
  • Mechanical Engineering
Replies
13
Views
1K
Replies
5
Views
1K
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
3
Views
2K
  • Mechanical Engineering
Replies
6
Views
3K
  • Programming and Computer Science
Replies
2
Views
2K
Back
Top