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

Setting ieepolhc before sizing makes each mission point the same #45

Open
sareider opened this issue May 10, 2024 · 2 comments
Open

Setting ieepolhc before sizing makes each mission point the same #45

sareider opened this issue May 10, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@sareider
Copy link

@argonaut22
@askprash

After setting ieepolhc and sizing the aircraft, each the values should change across the compressor map for each mission point, but they do not. See code example:

comp_poly_effs = [0.9, 0.95, 1]
    for comp_poly_eff in comp_poly_effs
        ac.pare[10,:,:] .= comp_poly_eff
        ac.pare[11,:,:] .= comp_poly_eff
        # Sizing aircraft and storing desired data
        size_aircraft!(ac)
        output_csv(ac, csv_dest, indices=output_indices_all, includeFlightPoints=true)
    end

Where the output of the first row of column ['ieepolhc'] is

array([0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9,
       0.9, 0.9, 0.9, 0.9])
@argonaut22 argonaut22 added the bug Something isn't working label May 10, 2024
@askprash askprash self-assigned this May 10, 2024
@askprash
Copy link
Member

Initial thought was that the par array's weren't being updated with the efficiency values but it looks like they are here:

pare[ieeplc] = eplc
pare[ieephc] = ephc
pare[ieepht] = epht
pare[ieeplt] = eplt

Need to look into the emap functions...

@askprash
Copy link
Member

askprash commented Jul 8, 2024

@sareider found the problem lines here:

# from "tfmap.inc"
# a b k mo da c d C D
Cmapf = [3.50, 0.80, 0.03, 0.95, -0.50, 3.0, 6.0, 0.0, 0.0]
Cmapl = [1.90, 1.00, 0.03, 0.95, -0.20, 3.0, 5.5, 0.0, 0.0]
Cmaph = [1.75, 2.00, 0.03, 0.95, -0.35, 3.0, 5.0, 0.0, 0.0]

The constants C, D are set to zero which makes the efficiency always equal to the max design efficiency:

#---- eff( m(mdot,Tr,pr) , p[pratio] , pi )
e1 = 1.0 - CK * (psgn * (p / m^adm - m))^c -
DK * (msgn * (m / mo - 1.0))^d

The original FORTRAN code has these values in tfmap.inc (below) from what looks to be some tests of fixed efficiency with some tables commented out.


      real Cmapf(9), Cmapl(9), Cmaph(9)
      real Tmapl(2), Tmaph(2)

c----              a     b     k     mo     da    c    d     C    D
ccc   data Cmapf / 3.50, 0.80, 0.03, 0.75, -0.50, 3.0, 6.0,  2.5, 15.0 /
ccc   data Cmapl / 2.50, 1.00, 0.03, 0.75, -0.20, 3.0, 5.5,  4.0,  6.0 /
ccc   data Cmaph / 1.75, 2.00, 0.03, 0.75, -0.35, 3.0, 5.0, 10.5,  3.0 /

c      data Cmapf / 3.50, 0.80, 0.03, 0.95, -0.50, 3.0, 6.0,  2.5, 15.0 /
c      data Cmapl / 1.90, 1.00, 0.03, 0.95, -0.20, 3.0, 5.5,  0.5,  6.0 /
c      data Cmaph / 1.75, 2.00, 0.03, 0.95, -0.35, 3.0, 5.0, 10.5,  3.0 /

      data Cmapf / 3.50, 0.80, 0.03, 0.95, -0.50, 3.0, 6.0,  0.0,  0.0 /
      data Cmapl / 1.90, 1.00, 0.03, 0.95, -0.20, 3.0, 5.5,  0.0,  0.0 /
      data Cmaph / 1.75, 2.00, 0.03, 0.95, -0.35, 3.0, 5.0,  0.0,  0.0 /

c----              Pcon   Ncon
      data Tmapl / 0.15 , 0.15 /
      data Tmaph / 0.15 , 0.15 /

The fix for this is to update the Cmap array above. But since the origin is a little unclear (and don't match exactly what's in the pdf documentation of the FORTRAN code) @sareider has kindly agreed to fix this and refit the map to the actual E3 compressor data!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants