phys_add_bc
Add boundary or domain conditions to a COMSOL model using interface aliases or raw feature types, with selections and property values.
Instructions
Create a boundary/domain condition through a friendly alias.
Aliases map to the real COMSOL feature type and property names, and pre-set
any required switches (e.g. convection sets HeatFluxType=ConvectiveHeatFlux,
radiation sets epsilon_rad_mat=userdef). If bc is not a known alias it
may still be a raw COMSOL feature type valid for that interface.
Verified aliases by interface type: HeatTransfer: temperature(T0), heat_flux(q0_input), convection(h,Text), radiation(epsilon_rad,Tamb), heat_source(Q0), initial(Tinit), insulation; SolidMechanics: fixed, prescribed_displacement(Direction+U0 vector), roller, initial(u), and three load types: boundary_load with F/load = per-area traction [N/m^2] (ForceArea + forceReferenceArea), total_force/force = total force [N] (TotalForce + force), pressure/p = normal pressure [Pa] (FollowerPressure + pressure); pressure_load(p) = normal pressure shortcut; body_load with F/load = per-volume force [N/m^3] (ForceVolume + forceReferenceVolume) or total_force/force = total force [N]; note: on a COMSOL BoundaryLoad/BodyLoad the property "F" is only the DERIVED resultant force - it does not apply a load, so these aliases write the real input properties instead; LaminarFlow: inlet(U0in), outlet(p0), wall, symmetry, volume_force(F), initial; Electrostatics: ground, electric_potential(V0), surface_charge(rhoqs), space_charge(rhoq), zero_charge, initial(V); ConductiveMedia (electric currents): terminal(TerminalType,V0,I0), ground, electric_potential(V0), normal_current_density(nJ), initial(V2); PressureAcoustics: sound_hard, sound_soft, normal_velocity(nvel), impedance(Zn), pressure(p0), initial(p2); ElectromagneticWavesFrequencyDomain: pec, pmc, port(PortName,Pin), scattering(IncidentField), initial(E); DilutedSpecies: concentration(c0), inflow(c0), outflow, no_flux, reactions(R_c), initial(initc).
Args: interface: interface tag/label/type (e.g. "ht"). bc: alias name (e.g. "temperature") or a raw COMSOL feature type. selection: entity list, "all", or a named-selection tag. named_selection: named selection tag to assign. all_entities: select all entities of the condition's dimension. properties: property values using real COMSOL names or documented aliases, e.g. {"T0": "400[K]"} or {"T": "400[K]"}. tag: new feature tag (None = auto). label: optional display label. entity_dim: override the entity dimension (3=domains, 2=boundaries). model: model name/tag (None = current model).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"interface": "<interface>",
"bc": "<bc>"
},
"name": "phys_add_bc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bc | Yes | ||
| tag | No | ||
| label | No | ||
| model | No | ||
| interface | Yes | ||
| selection | No | ||
| entity_dim | No | ||
| properties | No | ||
| all_entities | No | ||
| named_selection | No |