Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uniformly distributed field #74

Open
icupeiro opened this issue Feb 19, 2021 · 2 comments
Open

uniformly distributed field #74

icupeiro opened this issue Feb 19, 2021 · 2 comments

Comments

@icupeiro
Copy link

icupeiro commented Feb 19, 2021

A method for a uniformly distributed field (filled circular or hexagonal, in the same way as the DST model) is missing.

A very raw implementation done by one of my students is shown in the method below

def circularField(N_b,B,H,D,r_b):

  coo = np.array([[0,0]])
  a = 6
  B2 = B
  counter = 0
  shift=0
  for i in range(N_b-1):
      i = i+1
      counter = counter + 1
      if counter > a:
          a = a+6
          B2 = B2 + B
          #shift = shift + 2*np.pi/3.
          counter = 0
      coo = np.append(coo, np.array([[B2*np.sin(2*np.pi*counter/a+shift),B2*np.cos(2*np.pi*counter/a+shift)]]),0)

  field = [gt.boreholes.Borehole(H, D, r_b, x, y) for (x, y) in coo]
    
  return field

However, such implementation seems to result in a singular system of equations.

See this interactive example design script. to reproduce the problem.

@MassimoCimmino
Copy link
Owner

MassimoCimmino commented Feb 20, 2021

Boreholes 8 and 20 are superimposed in your code. See below.

Figure_1

I added a task to #33 to check for valid borefield layouts for the calculation.

@icupeiro
Copy link
Author

icupeiro commented Feb 22, 2021

solved by changing counter = 0 to counter = 1 within the if statement. The final method would look like:

def circularField(N_b,B,H,D,r_b):

  coo = np.array([[0,0]])     # Firstt borehole placed in the center
  a = 6
  B2 = B
  counter = 0
  for i in range(N_b-1):
      i = i+1
      counter = counter + 1
      if counter > a:
          a = a+6
          B2 = B2 + B
          counter = 1
      coo = np.append(coo, np.array([[B2*np.sin(2*np.pi*counter/a),B2*np.cos(2*np.pi*counter/a)]]),0)

  field = [gt.boreholes.Borehole(H, D, r_b, x, y) for (x, y) in coo]
    
  return field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants