computational mechanics, robotics, and engineering fanatic
nabil khondaker
turning machinery into simulations..
about me
hey! i am nabil khondaker, a bangladeshi-american 16-year-old developer, mechE enthusiast, and incoming mechanical engineering student based in riverside, ca.
fresh out of high school as part of the class of 2026, i spend most of my time bridging the gap between digital software and physical systems. my work spans everything from web development and software engineering to hands-on hardware tinkering. i am especially proud of building complex systems like my finite element analysis (fea) generative cto engine and custom 2r planar robot projects, which let me combine core math and physics with real-world mechanical applications.
outside of the terminal and the workbench, my life is driven by a mix of physical outlets, continuous learning, and deep personal grounding. you'll frequently find me out riding my skateboard, sketching, playing basketball, or exploring diverse music. just as important to who i am is my dedication to reading, studying the quran, and drawing relentless discipline, purpose, and inspiration from figures like malcolm x.
whether i'm optimizing a hardware setup, engineering a structural tool, or refining a creative project, i'm always building.
welcome to my portfolio.
featured work
areas of interest
computational mechanics & simulation
i leverage python and c++ to automate complex FEA and CFD workflows, building custom scripts to validate structural integrity faster than relying on out-of-the-box software
generative design & topology optimization
fusing cad and code so the computer can try a lot of layouts and keep the ones that actually carry load with less material
robotics & kinematic modeling
working across software and hardware. building kinematic models and control loops in c++ and lua so the arm moves cleanly and responds quickly
software development for engineering
i write small tools and pipelines when the usual ones get in the way; comfortable in python, c++, and web stacks so testing and analysis don’t take forever
cyber-physical security
i have a growing interest in applying white-hat hacking methodologies to secure industrial control systems, i would ensure that smart hardware and mechanical systems remain secure against digital vulnerabilities
prototyping & hands-on engineering
i take the code and cad models, print or build them, then check whether the numbers actually match the real part
valedictorian address — alta vista innovation high school, class of 2026
scholarships
scholarship
year
notes
fobana 40th annual scholarship
2026
received in-person in september 2026 at the universal hilton hotel in los angeles, ca via a highly competitive essay competition.
lifelong learning scholarship
2026
received in-person in may 2026 at the graduation ceremony at the grove church in riverside, ca via valedictorian status.
linda simi memorial scholarship
2026
received in-person in january 2026 on campus of my highschool in riverside, ca via top class rank award.
aabea scholarship
2025
received in-person in september 2025 in silicon valley, ca from the american association of bangladeshi engineers and architects after completion of python summer course.
california fafsa scholarship
2025
received online in august 2025 issued from the government of the state of california.
calkids scholarship
2025
received online in june 2025 issued from the government of the state of california.
ap courses taken — passed with 4.0 gpa
AP physics
AP calculus
AP chemistry
AP computer science
AP applied computer science
education
riverside city college enrollment
fall 2026
studying intended major of introduction to engineering, taking various classes with the intent of transferring to a high-level 4-year university next.
alta vista innovation high school
class of 2026
valedictorian senior speaker alumni of the learn4life academic system. campus located in eastside riverside, CA, graduated with a range of AP classes taken.
chaffey college dual-enrollment
late fall 2024 - spring 2026
obtained the associates degree in engineering through a 1 ½ year dual-enrollment program at chaffey college located in rancho cucamonga while also maintaining 11th grade coursework.
academic mentorship
hey! i run a completely free solo mentorship & tutoring program for people who want to get serious about engineering.
i managed to uphold a 4.0 gpa while taking majority ap classes, including ap physics, ap calculus, ap chemistry, and ap computer science, all with a passing A+.
i truly feel as though i understand the material well enough to help others who need the help!
subjects
computational mechanics & simulation
generative design & topology optimization
robotics & kinematic modeling
software development for engineering applications
cyber-physical security
hands-on prototyping
target audience
high-school & early college students
self-learners building fundamentals
early-career engineers wanting practical depth
anyone stuck on a project or concept
example topics
stiffness matrix assembly & FEA basics
inverse kinematics for planar arms
PID tuning & control intuition
lattice boltzmann / simple CFD
topology optimization pipelines
project structure & engineering habits
sessions are flexible and focused on what you actually need — no fluff, no sales pitch, just clear technical help.
if any of this sounds useful, feel free to reach out anytime via the contact form or email to schedule a session. happy to help.
ready to start a session?
engineering workflow
this is the repeatable process i follow on almost every project — from pure simulation tools to hardware builds, these are my steps & tools of the trade.
it keeps the work grounded, forces me to question assumptions early, and makes the final result easier to explain and iterate on.
01
problem definition & scoping
i start by writing down exactly what i want the system to do and what constraints matter.
hard constraints (budget, tools i have access to, time, available materials)
assumptions i’m making so i can challenge them later
i keep this short and concrete. if i can’t explain the goal in a few sentences, the project is still too fuzzy, and i really don't have something to build on.
02
research & reference gathering
i look at existing solutions, papers, open-source code, datasheets, and prior art.
kinematics equations, material properties, control theory, or mesh methods depending on the project
note what works, what fails, and what people usually overcomplicate
collect equations, boundary conditions, and typical ranges so i’m not reinventing basic physics
i also sketch a few rough concepts on paper or in a notes app before opening any CAD or code editor.
03
conceptual design & architecture
i decide the overall approach:
pure simulation (FEA / CFD / kinematics)
hardware + software (robotics, mechatronics)
hybrid (simulate first, then build)
i break the system into modules: mechanical structure, sensors/actuators, control loop, data pipeline, visualization. early decisions here (degrees of freedom, solver type, control strategy) save a lot of pain later.
04
digital modeling (CAD + math model)
create the geometry in CAD (Fusion, Onshape, or whatever is fastest for the job)
define the mathematical model at the same time: equations of motion, stiffness matrix, fluid equations, inverse kinematics, etc.
keep units consistent from day one
export clean meshes or parameter sets that the solver can use
this stage is where i decide what will be simulated versus what will be built physically.
05
simulation & analysis
this is usually the heaviest technical part.
FEA for structural integrity, stress, deflection, topology optimization
CFD for flow, pressure, heat
multibody dynamics or custom kinematics solvers for mechanisms
control simulations (PID, state-space, etc.)
i run parametric studies, check mesh convergence, and watch for numerical issues. i always ask: does the result make physical sense? if not, i dig into boundary conditions, material models, or solver settings before trusting the numbers.
06
software development & tooling
i write the supporting code in parallel or right after the first solid simulation.
python or C++ for solvers, data processing, optimization loops
javascript / web stack when i want interactive demos or real-time visualization
custom scripts to automate meshing, batch runs, or result export
the goal is a clean, repeatable pipeline so i can change a parameter and get new results without manual work every time.
07
prototyping & fabrication when hardware is involved
once the simulation looks solid:
refine the CAD for manufacturability (tolerances, fasteners, print orientation)
3D print, laser cut, or machine the parts
assemble, wire sensors and actuators, and get the electronics talking
implement the control code on the actual hardware (often starting with a simplified version of the simulated controller)
i expect the first physical build to expose things the simulation missed (friction, backlash, sensor noise, compliance).
08
testing, validation & iteration
this is the longest loop.
compare physical measurements to simulation predictions
log data, plot errors, tune gains or redesign weak points
stress-test edge cases
document every major change and why it was made
i cycle between sim → code → hardware → measurement until the system meets the original targets or i understand exactly why it can’t.
09
refinement, documentation & packaging
clean up the code, add comments and a basic README
finalize CAD models and drawings
create clear result plots, animations, or interactive demos
write a short project summary: goal, approach, key results, limitations, next steps
if it’s going on the website, i also make sure the demo is stable and the story is easy to follow.
10
reflection & next cycle
i look back at what slowed me down, what assumptions were wrong, and what i would do differently.
then i either extend the project or start the next one with those lessons already applied.
Arduino / ESPPID loopsencodersservo / DC motorsserial logging
lab journal
working notes from experiments, failed runs, debugging sessions, and open questions.
nothing polished — just the raw record of what was tried, what broke, and what still needs answering.
experiment
climate resilience sim — package and scenario compare
finalized cli compare across baseline / heat_wave / extreme_heat on the synthetic feeder. metrics exported: min performance, recovery time, auc loss. extreme_heat produced deeper min performance and longer recovery than heat_wave on the same network seed; intervention run with upgraded transformer thermal limits cut auc loss meaningfully without eliminating the cascade tail entirely.
readme release window set to aug 18, 2025 → sep 25, 2026. models stay labeled as simplified research tooling, not certified analysis.
picked the cybersecurity research laboratory back up for a final patch week. re-ran policy unit tests, regenerated synthetic flow fixtures, and confirmed the investigator still abstains when only a single weak static hit is present. mock llm path stays deterministic so offline runs match.
release window on the readme is nov 16, 2025 → sep 22, 2026 with the intentional gap noted. no fabricated detection rates in the research readme — metrics only from executed experiment configs.
swept synthetic bearing wear from severity 0.1 → 0.9 at fixed rpm. anomaly scores rose earlier than the supervised class probability, which is what we want: detection before confident identification. severity head tracked the planted trajectory with lag under moderate noise.
when rpm was randomized per window, order-related features mattered more than raw broadband rms. left a note to keep rpm in the feature set for any cross-condition eval.
related: ai machine failure investigator
experiment
neural ik — final baseline run before packaging
ran the baseline experiment at 20k samples / 40 epochs with the medium mlp (128-128-64). analytical position error sits at machine epsilon as expected. neural mae on the held-out test set landed around 0.02–0.04 on the unit-link geometry after proper normalization; early short runs without enough epochs were closer to 1.0 and not worth reporting. latency for a 2k-batch predict was under 2 ms on cpu.
wrote out summary.json and the checkpoint. report generator still leaves the results section as a placeholder until the user actually runs the suite — deliberately. no fabricated numbers in the readme.
related: neural ik lab
debug
climate resilience sim — cascade double-count on simultaneous failures
when two transformers failed in the same timestep, load redistribution ran twice and the second pass used partially updated topology, inflating branch flows. serialized failure handling inside the step: apply all failure flags, then solve power flow once, then update thermals.
ensemble variance dropped and event logs became readable again.
cyberlab — static rule over-fired on safe subprocess wrapper
ast sink rule flagged a lab helper that called subprocess with a constant argument list and shell=false. technically a sink node, but not a taint path from request data. tightened the rule to require tainted args before elevating confidence; pure constant sinks now emit low-confidence observations instead of confirmed findings.
good reminder that static hits are evidence, not verdicts. differential diagnosis was already discarding them when nothing else supported exploitability.
related: ai cybersecurity research laboratory
debug
neural ik — error heatmap concentrated near outer workspace ring
plotted position error over the reachable annulus. the worst residuals cluster within a few percent of the outer reach circle and in a thin band near θ2 ≈ 0. matches the singularity analysis: manipulability drops and the inverse becomes sensitive. interior of the workspace is comparatively clean.
also checked the radial split (inner 70 % vs outer). outer-region mae was consistently higher. training only on joint-space samples already under-represents the boundary a bit; rejection sampling in the annulus might help later.
related: neural ik lab
experiment
climate resilience sim — intervention: efficiency vs transformer upgrade
same extreme_heat seed. case a: improved building cop (less electrical demand per unit cooling). case b: higher transformer thermal rating / slower aging. cop improvement reduced peak loading globally; transformer upgrade mainly protected the weakbank corridor and shortened recovery when cascades still started.
neither intervention zeroed auc loss. combined case was best but still showed a residual dip — honest result for a stressed synthetic feeder.
trained supervised heads on imbalance and misalignment only; held out bearing-fault windows for test. classifier tried to force one of the known classes; anomaly detector flagged the holdout as out-of-distribution more often than chance. investigation layer now prefers unknown_anomaly when anomaly score is high and class margin is flat.
this is the behavior we wanted for operational honesty — don’t invent a bearing label if the model never saw bearings.
related: ai machine failure investigator
experiment
neural ik — noise robustness sweep
added isotropic gaussian noise to test targets at σ = 0, 0.001, 0.005, 0.01, 0.02, 0.05. neural error rises smoothly; analytical stays near zero until the noisy target leaves the reachable set and the solver returns nan. at σ = 0.05 a non-trivial fraction of targets become unreachable and have to be filtered before comparison.
no clear “neural is more robust” story at these levels. the network just degrades gracefully instead of failing hard. still useful as a controlled comparison.
related: neural ik lab
broke
climate resilience sim — euler step too coarse in peak heat
with Δt = 1 h indoor temperature overshot setpoints and hvac power oscillated against the control deadband. halved the thermal step during extreme_heat experiments; electrical solve still hourly. energy totals stabilized and transformer loading traces stopped showing sawtooth artifacts from the control chatter.
lesson: coupling two timescales means the faster thermal loop needs the tighter step even if power flow is slow.
machine failure investigator — spectral leakage at low rpm
fft features for the gear-mesh band were smearing when shaft speed dropped below the window design point. effective frequency resolution was coarser than the sideband spacing we cared about. lengthened windows and switched to order tracking relative to measured rpm for those features.
before the fix, severity estimates for gear faults looked randomly bad at idle-speed scenarios even though time-domain kurtosis still moved.
related: ai machine failure investigator
question
neural ik — single branch vs multi-head for elbow-up / elbow-down
training on one canonical branch (θ2 < 0) keeps the supervised map a function, but the model has no way to express the other solution. multi-head or mixture outputs would be more honest about the multi-valued inverse. trade-off is evaluation complexity and how to score “correctness” when two answers are valid.
for this release sticking with single-branch + explicit documentation of the choice. multi-head is on the roadmap, not half-implemented.
related: neural ik lab
question
climate resilience sim — what performance signal defines “service”?
early curves used fraction of transformers in service. that ignored customers still served on overloaded paths. switched primary performance to served load fraction (demand met without violating solved branch limits). min performance numbers got less dramatic but more meaningful.
docs now state the performance definition next to every metric table so comparisons stay honest.
cyberlab — when should an attack graph edge imply exploitability?
tempting to draw “static taint → http surface → data exposure” as a hard path. that overclaims. current stance: edges mean “relationship asserted by evidence,” never “demonstrated exploit.” reports must say so in plain language.
still open whether to add a separate edge type for dynamically confirmed behaviors versus static-only hints.
related: ai cybersecurity research laboratory
broke
neural ik — training loss looked fine, fk consistency was not
joint-space mse was decreasing steadily but a subset of predictions produced large cartesian residuals after fk. root cause: angle wrapping. predicted θ1 sometimes landed ±2π away from the label; mse treated that as a huge error in joint space even when the configuration was equivalent, and the network was fighting itself.
switched evaluation to angular distance with wrap-to-π and kept the training loss in the normalized joint space used by the dataset. also added an optional fk consistency loss term for later experiments. numbers finally lined up between joint metrics and position metrics.
related: neural ik lab
experiment
climate resilience sim — transformer aging under multi-day heat
ran five-day heat_wave with arrhenius acceleration on. health index decline was negligible on baseline weather but visible on extreme_heat for the two highest-loaded transformers. stochastic failures still rare at these durations — aging is the slow fuse, overload trips are the fast one.
useful split to keep in the narrative: acute cascade risk vs cumulative life consumption.
topology optimization — volume fraction sweep on cantilever
ran a series of SIMP compliance minimizations on a 2D cantilever (80×40 mesh) with volume fractions from 0.2 to 0.55. filter radius fixed at 1.5 elements. objective improved roughly linearly until ~0.4, then diminishing returns. gray-scale intermediate densities still present at r_min = 1.5; next run will push projection β higher to force 0/1.
sensitivity field was computed with the adjoint method; each volume step took 42–48 oc iterations to reach a relative change below 1e-4. the 0.35 volume design produced the cleanest load path (two primary struts meeting at ~38° from the wall), while 0.55 started filling secondary members that contributed less than 4 % to the final stiffness gain.
related: fea generative cto engine
experiment
neural ik — analytical vs numerical vs neural on the same targets
wired the three solvers into one evaluation path. analytical is exact on reachable targets. damped least-squares converges from a zero seed on most interior points but needs a better init near singularities. neural is constant-time and independent of init; accuracy is still the open variable being measured, not assumed.
pseudoinverse without damping occasionally spiked near θ2 ≈ 0. λ ≈ 0.1 on dls kept the joint steps reasonable. transpose method needs more iterations and a smaller step size to stay stable.
compared vibration-only vs vibration+current vs full set (vibration, temperature, current, torque, rpm). temperature alone was weak for early bearing faults but helped reject false thermal alarms when vibration was clean. current helped imbalance vs electrical issues in the synthetic generator.
full set won on f1 for the labeled faults; vibration-only remained a respectable minimum viable sensor package.
related: ai machine failure investigator
broke
mesh convergence study aborted — memory spike
tried refining the 2R planar robot link meshes to ~0.4 mm element size for stress concentration checks near the shoulder joint. python process climbed past 6.2 GB and the kernel killed it. need to switch to out-of-core assembly or coarsen the far-field and only refine the fillet regions.
the global stiffness matrix for the refined shoulder alone was already ~1.8e6 dofs with a nnz of about 2.4e7 in csr. assembly in pure numpy allocated three dense temporary buffers before the sparse conversion; that was the real leak. rewriting the local-to-global scatter to write directly into a pre-allocated coo triplet cut peak rss by roughly half on a smaller test mesh.
related: 2R planar robot paddle
debug
inverse kinematics singularity near workspace boundary
the analytical 2R ik solution flips the elbow configuration when the target approaches the outer reach circle. numerical solver was oscillating between the two configurations because the jacobian determinant passed through zero. added a soft barrier on the configuration variable and a small hysteresis term; still need a proper damped least-squares fallback.
det(J) dropped below 1e-4 inside a 3 mm band of the reachable limit. the hysteresis keeps the last valid elbow choice until the target moves back more than 5 mm inside the workspace. damped least-squares with λ = 0.02 still produces a continuous joint trajectory across that band; the residual cartesian error stays under 0.4 mm in the current test set.
debug
machine failure investigator — label leakage in window export
caught a bug where severity and fault-type fields were left inside the feature parquet used for unsupervised anomaly training. isolation forest was partially learning the label channel. stripped metadata columns in the dataset builder and added a unit test that asserts label column names cannot appear in feature matrices.
after the fix, anomaly scores on healthy data tightened and the previous “too good” separation disappeared — which is the honest outcome.
related: ai machine failure investigator
experiment
neural ik — first end-to-end train on fk-generated data
dataset from joint-space sampling → fk → (x, y) labels. 5k samples, tiny mlp, 15 epochs. loss dropped but fk-consistency error on the test set was still large. confirmed the pipeline path works: generate → normalize → train → predict → fk → position error. scaling samples and width next.
normalization was essential; without it the network spent early epochs just learning the scale of the joint angles. train/val curves tracked each other after that.
related: neural ik lab
question
does the current density filter preserve volume exactly after projection?
after applying the heaviside projection the actual material volume drifts by 1–3 % relative to the prescribed fraction. literature suggests a volume-preserving projection or a simple post-correction step. not sure yet which approach will stay stable when the design domain has non-design solid regions.
the drift is largest on coarse meshes (h ≈ 1.5 r_min) and shrinks as the mesh is refined, which points to the discrete filter kernel rather than the continuous projection formula. a binary search on the projection threshold that re-enforces the volume constraint after each continuation step on β looks promising; still need to check whether that search interacts badly with the oc update rule.
experiment
machine failure investigator — simulator first healthy baseline
got the synthetic rotating machine to emit synchronized vibration, temperature, current, torque, and rpm streams under healthy conditions. checked that spectral peaks sit where shaft speed and the configured mesh frequency say they should. this becomes the reference distribution for anomaly baselines.
next step is injecting imbalance, misalignment, and bearing faults with controllable severity so supervised and unsupervised paths share the same ground truth.
related: ai machine failure investigator
debug
neural ik — analytical round-trip failed on a few random samples
fk → analytical ik → fk should close to 1e-9. a handful of samples near the inner workspace hole produced nan or flipped branch. cause was cos(θ2) clamped at ±1 combined with a branch choice that didn’t match the original θ2 sign. fixed by generating training data from joints (so branch is known) and only using analytical as the evaluation baseline, not as the label source.
also tightened the reachable check with a small tolerance so boundary points don’t get marked unreachable from floating-point noise.
related: neural ik lab
experiment
pid gains on the physical 2R arm vs simulation
transferred the simulated pid gains to the real hardware. position tracking was acceptable at low speed, but the shoulder joint overshot under a 150 g tip load. increased derivative term on joint 1 by ~30 % and added a simple coulomb friction feed-forward. still seeing a small steady-state error that looks like gravity compensation residual.
step response on joint 1 (0 → 45°) settled in 0.38 s with 9 % overshoot after the retune. the residual offset is approximately 0.7° and scales with the cosine of the shoulder angle, which matches the expected gravity torque profile. a static gravity term using the measured link masses removed most of it; the leftover is probably cable stretch and gearbox compliance.
related: 2R planar robot paddle
experiment
climate resilience sim — first coupled heat_wave run
synthetic weather anomaly → building rc thermal → hvac electrical demand → dc power flow → transformer thermal lag. end-to-end numbers looked plausible: peak demand up sharply in afternoon hours, two corridors near continuous rating. no cascade yet until failure probabilities were stressed further.
this is the skeleton the rest of the experiment suite hangs on.
cyberlab — dynamic stage hung on non-terminating lab sample
one binary fixture spun until the worker was killed externally. policy allowed the command but no wall-clock timeout was enforced on that path. added hard timeouts and a kill escalation; investigation now records a timed_out observation instead of blocking the pipeline.
report marks dynamic evidence incomplete rather than inventing a finding from a partial run.
related: ai cybersecurity research laboratory
experiment
neural ik — analytical ik and workspace checks locked in
planar 2r model: fk matches the textbook equations, both elbow branches recover, unreachable targets return nan + reachable=false. workspace annulus |L1−L2| ≤ r ≤ L1+L2 verified on a grid. this is the baseline everything else gets measured against.
started scaffolding the dataset generator and the mlp wrapper. goal is a fair comparison, not a demo that only shows neural succeeding.
scoped a research pipeline for rotating-machine faults on synthetic multi-sensor data: simulator → features → anomaly detection → supervised diagnosis → severity → evidence-backed report. explicitly not a certified industrial product.
success means controllable ground truth, reproducible ablations, and investigation output that can abstain — not a single softmax bar chart.
related: ai machine failure investigator
broke
fea playground — browser tab crashed on 12k element mesh
the pure js assembler + conjugate-gradient solver in the browser ran out of heap when the mesh exceeded roughly 12 000 linear triangles. switched the heavy path to a web-worker and streamed the stiffness matrix in blocks. still slower than the python version, but at least it no longer freezes the ui.
chrome’s v8 heap limit was the hard stop; the cg residual vector alone was fine, but the element-wise assembly loop created thousands of temporary typed arrays that never got collected fast enough. moving the entire assembly + solve into one worker and transferring the result buffer with postMessage({…}, [buffer]) kept the main thread responsive even at 18k elements.
related: fea playground 2D
question
neural ik — is a 2r planar arm enough to study the real issues?
started the neural ik lab project. 2r is simple enough that analytical ik is exact and singularities are well understood, which makes it a fair baseline. worry is that success on 2r won’t say much about higher-dof arms where the inverse is underdetermined and numerical methods dominate. treating this as a controlled first step, not the final claim.
scope for v0: one robot, analytical + numerical + neural, honest metrics, no inflated accuracy numbers.
related: neural ik lab
debug
spring-coupled disk simulation — energy drift
in the two-disk bouncing plate run the total mechanical energy was climbing ~0.4 % per 10 seconds of simulated time. traced it to the contact impulse resolution using a fixed restitution coefficient without a proper energy-consistent formulation. replaced with a velocity-level constraint that enforces the restitution map and the drift dropped below 0.05 %.
the original code applied the impulse after a position-level penetration correction, which injected a small amount of kinetic energy each impact. switching to a velocity-level non-penetration constraint with the same e = 1 map removed the artificial source. energy now oscillates within ±0.03 % over a 30 s window at dt = 1/240.
related: dynamics simulations (ds1)
debug
climate resilience sim — singular B matrix on islanded bus
after removing a tie line the remaining island had no angle reference and the dc solve failed. pinned a slack angle in each island and treated islanded load as unserved rather than crashing the step.
cascade logs now show intentional service loss instead of linear-algebra exceptions.
topology opt with manufacturing constraint — minimum member size
added a simple length-scale control via the density filter radius and a morphological closing operation. the resulting designs look more printable, but compliance increased ~8 % compared with the unconstrained run at the same volume fraction. acceptable trade-off for the current hardware constraints.
closing radius was set to 1.2× the intended minimum member width. on the cantilever benchmark the thin secondary struts disappeared and the primary members thickened by roughly one filter radius. the compliance penalty is consistent with the loss of those secondary paths; for the physical prints the thicker members are worth the stiffness cost.
hypothesis updates were mutating evidence dicts in place, so re-running diagnosis on the same investigation state drifted. froze evidence as immutable records (id, source, category, observation, location, confidence, provenance) and made hypothesis updates allocate new structures.
serialized investigation fixtures now round-trip cleanly under the mock reasoner.
related: ai cybersecurity research laboratory
question
best way to export a topology-optimized density field into a clean cad solid?
marching cubes on the 0.5 isosurface produces a noisy mesh that needs heavy remeshing. looking at openvdb level-set methods and at simply thresholding then running a constrained laplacian smooth. still open — current pipeline is functional but ugly.
the noise is worst where the density gradient is shallow (gray regions that the projection never fully eliminated). a short diffusion of the density field before the isosurface extract reduces the high-frequency roughness, but it also erodes thin members. a constrained smooth that freezes vertices already near 0 or 1 might be the better route.
experiment
cyberlab — first correlated investigation on vulnerable flask lab app
ran the full pipeline on the deliberately vulnerable flask fixture: policy allow → discovery → static taint hits on request → sink → optional dynamic observations → anomaly baseline → hypotheses. single static hit alone stayed below confirmation threshold; combined with a matching dynamic observation it crossed the configured evidence count.
this is the behavior we want: correlation, not first-alert-wins.
cmake app boots, loads yaml scenario, generates diurnal outdoor temperature with optional anomaly offset, integrates a single-zone building, and prints hvac power. no electrical network yet — just proving the environmental → thermal → demand path.
unit tests cover energy balance signs and steady-state ua behavior.
first pla print of the 2R forearm link cracked at the root fillet after ~40 cycles of a 0.8× design load. fea had predicted a safety factor of 2.1. post-mortem showed layer adhesion was the weak plane; reprinting with 100 % infill and rotated orientation fixed it, but the analytical model still needs a knockdown factor for fdm anisotropy.
the crack initiated at the layer interface roughly 0.6 mm above the fillet radius. tensile coupon tests on the same filament and print settings gave an interlayer strength of only ~18 MPa versus ~48 MPa in the filament direction. applying a 0.4 knockdown to the allowable stress brings the predicted and observed failure loads into agreement.
related: 2R planar robot paddle
debug
stiffness matrix assembly — indexing off-by-one in sparse format
the custom c++ coo → csr converter was writing the last column index one past the end on meshes whose node count was not a multiple of the block size. valgrind caught it only under a specific mesh. fixed and added a unit test that checks Σ K_ij against the dense reference for a 3-element patch.
the bug lived in the exclusive-scan that builds the row pointer array: when n % block != 0 the final partial block wrote past indptr[n]. the unit test now builds a 3-element patch, converts, and asserts that the frobenius norm of (K_sparse − K_dense) is below 1e-12. caught two similar edge cases after the first fix.
experiment
control simulation — state-space vs classical pid on the inverted triple pendulum
linearized the three-spring-coupled inverted pendulums about the upright equilibrium and compared an lqr controller against three independent pids. lqr kept the system upright from larger initial angles; the decoupled pids started fighting each other once the coupling springs became active. expected, but useful confirmation before moving to hardware.
the open-loop eigenvalues of the linearized system sit at approximately +2.1, +0.8, −1.4 (1/s). lqr with Q = diag(10,10,10,1,1,1) and R = I moved all poles into the left half-plane with a minimum real part of −1.7. the independent pids could stabilize the first mode but left a lightly damped oscillation on the relative angles between the outer pendulums.
related: dynamics simulations (ds12)
question
how much mesh distortion is acceptable before the topology result becomes unreliable?
some of the intermediate density fields produce highly skewed elements near the solid-void boundary. the compliance still converges, but the stress recovery looks suspicious. need a clearer criterion (jacobian quality? condition number of local K?) before trusting the stress plots on optimized geometries.
elements with min(jacobian) / max(jacobian) below ~0.15 start showing stress peaks that move when the mesh is refined, which is a classic sign of discretization error rather than a real stress concentration. a simple quality filter that flags those elements and excludes them from the stress plot is a temporary fix; a better long-term approach is to remesh the 0.5 isosurface before the final stress pass.
broke
webgl shader for live density visualization — precision loss
the fragment shader that color-maps the density field was using mediump floats. on mobile the isosurface looked stepped and the optimizer appeared to stall. forced highp and the visual stabilized; the underlying floating-point densities were fine the whole time.
mediump on the tested mali gpu effectively gave about 10 bits of mantissa. density values that differed by less than ~0.002 collapsed to the same color band, which made the continuation on β look frozen even though the cpu-side densities were still changing. highp restored smooth gradients; the performance hit was negligible for a full-screen quad.
related: fea playground 2D
experiment
cyberlab — isolation forest baseline on synthetic flows
fit an isolation forest on “normal” lab flow features and scored held-out injected anomalies. detection moved with contamination and feature choice; too aggressive a contamination setting flooded the report with unknown_anomaly noise.
settled on treating anomaly scores as evidence inputs to hypotheses rather than auto-confirmed findings.
related: ai cybersecurity research laboratory
debug
cyberlab — policy bypass via symlink path
a test tried to register a lab path through a symlink that resolved outside the allowlisted directory. path canonicalization was missing on one registration path. fixed by resolving real paths before allowlist comparison and added a regression test.
threat model already listed operator misconfiguration; this was a concrete instance.
related: ai cybersecurity research laboratory
experiment
cyberlab — static ast taint pass v0
first working pass: parse python, mark request-like sources, propagate through simple assignments, flag dangerous sinks. lots of false positives on safe wrappers, but the source→sink evidence objects are structured enough to plug into a later hypothesis engine.
not claiming exploitability — only that untrusted data appears to reach a sensitive call in the ast.
related: ai cybersecurity research laboratory
question
cyberlab — scope: lab-only investigations, never unauthorized targets
starting an ai-assisted cybersecurity research laboratory project. hard requirement: policy allowlists, deliberately vulnerable fixtures only, no capability that makes it easy to scan random hosts. if the policy check fails, the pipeline stops.
research focus is evidence correlation, abstention, and honest reporting — not a red-team framework.
related: ai cybersecurity research laboratory
experiment
climate resilience sim — dc power flow on toy feeder
implemented susceptance-based dc power flow with a fixed slack. verified that removing a branch redistributes flows and that overload flags trip on the expected corridors under inflated demand. this is the electrical core before transformer thermals and cascades.
climate resilience sim — project start: coupled stress, synthetic only
kicking off a c++ infrastructure resilience sandbox. goal is to chain heat → cooling demand → electrical loading → transformer aging/failure → cascade metrics on synthetic networks. explicitly not a climate forecast product and not certified utility software.
if the models cannot stay simple enough to explain, the project has failed its teaching/research purpose.
custom scripts and calculators developed for quick reference during design and prototyping.
these tools bridge core numerics with actual mechanical applications, from inverse kinematics to simple FEA parameter checks.