ferram4 / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
239 stars 131 forks source link

"FAR Error: Aerodynamic force = NaN" with latest dev build from June 21st #206

Closed Gordon-Dry closed 7 years ago

Gordon-Dry commented 7 years ago

The output_log.txt is spammed with variants of clampinedInc: 45.9202723468989 incDegrees: 45.92 lat: 45.9202725451127 inc: 45.9202723468989 (values differ) when Trajectories is also installed. The KSP.log says:

[LOG 01:40:32.360] Trajectories: Initializing cache
[WRN 01:40:32.361] FAR Error: Aerodynamic force = NaN AC Loc = 41.0465927534953 AoA = 0

MAC = 0.448 B_2 = 1.26 sweepAngle = 0

MidChordSweep = 37 MidChordSweepSideways = 0.0374830915160689

 at TrunkFin

etc.

The two parts involved got MM patches for FAR.

1st part is: GameData\KWRocketry\Parts\Aero\KWFin\KWFin.cfg

PART
{

// --- general parameters ---
    name = KWFin
    module = Part
    author = KW Rocketry

// --- asset parameters ---
    MODEL
    {
        model = KWRocketry/Parts/Fuel/KW_Universal_Tanks/KWfin
        scale = 1,1,1
    }
    scale = 1.0

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z
    node_attach = -0.055, 0.0, 0.0, -1.0, 0.0, 0.0

// --- editor parameters ---
    TechRequired = advFlightControl
    entryCost = 5400
    cost = 700
    category = Aero
    subcategory = 0
    title = Large Fin
    manufacturer = KW Rocketry
    description = A large aerodynamic fin with a control surface for atmospheric control authority on large rockets.
    attachRules = 0,1,0,0,1

// --- standard part parameters ---
    mass = 0.155
    dragModelType = override
    maximum_drag = 0.02
    minimum_drag = 0.02
    angularDrag = 5
    crashTolerance = 12
    maxTemp = 3400
    explosionPotential = 0.1

    tags = [kwrock aero (air canard control (elev fligh (fore lift plane )rudder stab swept

    MODULE
    {
        name = ModuleControlSurface
        dragCoeff = 0.8
        deflectionLiftCoeff = 1.5
        ctrlSurfaceRange = 15
        ctrlSurfaceArea = 1.0
    }

}

patched with: GameData\KWRocketry\KWCommunityFixes\PatchesForMods\KW_FAR.cfg

@PART[KWFin]:NEEDS[FerramAerospaceResearch]:FOR[KWRocketry]
{
    @module = Part
    @maximum_drag = 0
    @minimum_drag = 0
    @angularDrag = 0
    @dragCoeff = 0
    @deflectionLiftCoeff = 0
    @ctrlSurfaceRange = 0
    @ctrlSurfaceArea = 0
    !MODULE[ModuleControlSurface] {}
    MODULE
    {
        name = FARControllableSurface
        nonSideAttach = 0           
        MAC = 1.311
        MidChordSweep = 29.375
        maxdeflect = 15
        b_2 = 1.2
        TaperRatio = 0.5
        ctrlSurfFrac = 0.3
    }
}

The 2nd part is: GameData\KerbalReusabilityExpansion\Trunk\TrunkFin.cfg

PART
{
    name = TrunkFin
    module = Part
    author = EmbersArc

    MODEL
    {
        model = KerbalReusabilityExpansion/Trunk/TrunkFin
    }
    rescaleFactor = 1
    node_attach = 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1
    CoLOffset = -0.22, -0.08, 0
    CoPOffset = -0.22, -0.08, 0
    TechRequired = start
    entryCost = 0
    cost = 120
    category = Aero
    subcategory = 0
    title = Trunk Fin
    manufacturer = 7D Exploration Technologies Inc.
    description = A small wing designed to make spacecraft look cool. It was later discovered to also help with aerodynamic stability in case of an in-flight abort.
    attachRules = 0,1,0,1,1
    mass = 0.01
    //thermalMassModifier = 1
    //heatConductivity = 0.12
    emissiveConstant = 0.95
    dragModelType = none
    maximum_drag = 0.02
    minimum_drag = 0.02
    angularDrag = 2
    crashTolerance = 4
    maxTemp = 1500
    explosionPotential = 0.1
    fuelCrossFeed = True
    bulkheadProfiles = srf
    tags = aero (air lift rocket stab swept dragon trunk white spacex
    MODULE
    {
        name = ModuleLiftingSurface
        useInternalDragModel = True
        deflectionLiftCoeff = 0.12
    }
}

patched with: GameData\KerbalReusabilityExpansion\Trunk\TrunkFin_FAR.cfg

@PART[TrunkFin]:NEEDS[FerramAerospaceResearch]:FOR[KerbalReusabilityExpansion] 
{
    @module = Part
    @maximum_drag = 0
    @minimum_drag = 0
    @angularDrag = 0
    @dragCoeff = 0
    @deflectionLiftCoeff = 0
    !MODULE[ModuleLiftingSurface] {}
    MODULE
    {
        name = FARWingAerodynamicModel
        MAC = 1.26
        MidChordSweep = 37
        b_2 = 0.448
        TaperRatio = 0.4375
    }

}

The full log: https://www.dropbox.com/s/93dtjcky4elgv8t/2017-06-28-1%20KSP.log.zip?dl=1

ferram4 commented 7 years ago

I need full reproduction steps, not just a log.

Gordon-Dry commented 7 years ago

Launching a vessel using these two mentioned parts into gravity turn with MechJeb, on RSS.

ferram4 commented 7 years ago

I cannot reproduce any issue, and looking at the configs indicates no issues. I suspect any issues are not on FAR's end.